diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-14 22:58:54 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-15 13:12:36 +0100 |
commit | 2a85dc3fd5af5c33601cf04ead06c7545fa46d75 (patch) | |
tree | f46f355235fd7684a9f8a6bb562797fd985d1180 /vsm | |
parent | d9b45214d28207564329991afe70afc358fe6d12 (diff) |
Split in hash_xxx, array, lru, cache ++ in hpp files. To reduce clinon build
Diffstat (limited to 'vsm')
-rw-r--r-- | vsm/src/vespa/vsm/common/docsum.cpp | 15 | ||||
-rw-r--r-- | vsm/src/vespa/vsm/common/document.cpp | 14 | ||||
-rw-r--r-- | vsm/src/vespa/vsm/common/documenttypemapping.cpp | 19 | ||||
-rw-r--r-- | vsm/src/vespa/vsm/common/documenttypemapping.h | 7 | ||||
-rw-r--r-- | vsm/src/vespa/vsm/common/fieldmodifier.cpp | 16 | ||||
-rw-r--r-- | vsm/src/vespa/vsm/common/fieldmodifier.h | 4 | ||||
-rw-r--r-- | vsm/src/vespa/vsm/vsm/fieldsearchspec.cpp | 7 | ||||
-rw-r--r-- | vsm/src/vespa/vsm/vsm/snippetmodifier.cpp | 7 |
8 files changed, 41 insertions, 48 deletions
diff --git a/vsm/src/vespa/vsm/common/docsum.cpp b/vsm/src/vespa/vsm/common/docsum.cpp index 0d07ab6d236..3d32f30aa87 100644 --- a/vsm/src/vespa/vsm/common/docsum.cpp +++ b/vsm/src/vespa/vsm/common/docsum.cpp @@ -1,17 +1,17 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/vsm/common/docsum.h> + +#include "docsum.h" #include <vespa/document/fieldvalue/fieldvalue.h> #include <vespa/document/fieldvalue/intfieldvalue.h> #include <vespa/document/fieldvalue/longfieldvalue.h> #include <vespa/document/fieldvalue/bytefieldvalue.h> +#include <vespa/vespalib/stllike/hash_map.hpp> #define DEBUGMASK 0x00 using search::DocumentIdT; -namespace vsm -{ +namespace vsm { using document::FieldValue; using document::StringFieldValue; @@ -20,12 +20,9 @@ IMPLEMENT_DUPLICATE(DocSumCache); DocSumCache::DocSumCache() : _list() -{ -} +{ } -DocSumCache::~DocSumCache() -{ -} +DocSumCache::~DocSumCache() { } const Document & DocSumCache::getDocSum(const DocumentIdT & docId) const { diff --git a/vsm/src/vespa/vsm/common/document.cpp b/vsm/src/vespa/vsm/common/document.cpp index b9936188cef..cc7414b8107 100644 --- a/vsm/src/vespa/vsm/common/document.cpp +++ b/vsm/src/vespa/vsm/common/document.cpp @@ -1,6 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "document.h" #include <vespa/vespalib/stllike/asciistream.h> +#include <vespa/vespalib/stllike/hash_map.hpp> using search::DocumentIdT; using search::TimeT; @@ -67,17 +68,16 @@ size_t StringFieldIdTMap::highestFieldNo() const Document::Document(const DocumentIdT & doc, size_t maxField) : _docId(doc), _fieldCount(maxField) -{ -} +{ } Document::Document() : _docId(0), _fieldCount(0) -{ -} +{ } -Document::~Document() -{ -} +Document::~Document() { } } + +VESPALIB_HASH_MAP_INSTANTIATE(vespalib::string, vsm::FieldIdTList); +VESPALIB_HASH_MAP_INSTANTIATE(vespalib::string, vsm::IndexFieldMapT);
\ No newline at end of file diff --git a/vsm/src/vespa/vsm/common/documenttypemapping.cpp b/vsm/src/vespa/vsm/common/documenttypemapping.cpp index ea74f2421e2..389c6608d70 100644 --- a/vsm/src/vespa/vsm/common/documenttypemapping.cpp +++ b/vsm/src/vespa/vsm/common/documenttypemapping.cpp @@ -1,26 +1,23 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> + +#include "documenttypemapping.h" +#include <vespa/vespalib/stllike/hash_map.hpp> + #include <vespa/log/log.h> LOG_SETUP(".vsm.common.documenttypemapping"); -#include <vespa/document/datatype/arraydatatype.h> -#include <vespa/document/datatype/documenttype.h> -#include <vespa/document/repo/documenttyperepo.h> -#include <vespa/vsm/common/documenttypemapping.h> -#include <stdexcept> - #define DEBUGMASK 0x00 -namespace vsm -{ +namespace vsm { DocumentTypeMapping::DocumentTypeMapping() : _fieldMap(), _defaultDocumentTypeName(), _defaultDocumentType(), _documentTypeFreq() -{ -} +{ } + +DocumentTypeMapping::~DocumentTypeMapping() { } namespace { diff --git a/vsm/src/vespa/vsm/common/documenttypemapping.h b/vsm/src/vespa/vsm/common/documenttypemapping.h index 9c94469c58b..5c869f61476 100644 --- a/vsm/src/vespa/vsm/common/documenttypemapping.h +++ b/vsm/src/vespa/vsm/common/documenttypemapping.h @@ -12,6 +12,7 @@ class DocumentTypeMapping { public: DocumentTypeMapping(); + ~DocumentTypeMapping(); /** * Prepares the given document by sharing the field info map @@ -41,10 +42,8 @@ private: void buildFieldMap(const document::DocumentType *docType, const StringFieldIdTMapT & fieldList, const vespalib::string & typeId); - typedef vespalib::hash_map<vespalib::string, FieldPathMapT> - FieldPathMapMapT; - typedef std::multimap<size_t, const document::DocumentType *> - DocumentTypeUsage; + typedef vespalib::hash_map<vespalib::string, FieldPathMapT> FieldPathMapMapT; + typedef std::multimap<size_t, const document::DocumentType *> DocumentTypeUsage; FieldPathMapMapT _fieldMap; vespalib::string _defaultDocumentTypeName; const document::DocumentType *_defaultDocumentType; diff --git a/vsm/src/vespa/vsm/common/fieldmodifier.cpp b/vsm/src/vespa/vsm/common/fieldmodifier.cpp index 21d5cd4b58a..6a619bfc533 100644 --- a/vsm/src/vespa/vsm/common/fieldmodifier.cpp +++ b/vsm/src/vespa/vsm/common/fieldmodifier.cpp @@ -1,13 +1,15 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/vsm/common/fieldmodifier.h> -namespace vsm -{ +#include "fieldmodifier.h" +#include <vespa/vespalib/stllike/hash_map.hpp> + +namespace vsm { + FieldModifierMap::FieldModifierMap() : _map() -{ -} +{ } + +FieldModifierMap::~FieldModifierMap() { } FieldModifier * FieldModifierMap::getModifier(FieldIdT fId) const @@ -19,6 +21,4 @@ FieldModifierMap::getModifier(FieldIdT fId) const return itr->second.get(); } - } - diff --git a/vsm/src/vespa/vsm/common/fieldmodifier.h b/vsm/src/vespa/vsm/common/fieldmodifier.h index f6b8d949e55..e38166bd680 100644 --- a/vsm/src/vespa/vsm/common/fieldmodifier.h +++ b/vsm/src/vespa/vsm/common/fieldmodifier.h @@ -5,8 +5,7 @@ #include <vespa/vespalib/util/linkedptr.h> #include <vespa/vsm/common/document.h> -namespace vsm -{ +namespace vsm { /** * Interface for classes that want to modify a field value. @@ -43,6 +42,7 @@ private: public: FieldModifierMap(); + ~FieldModifierMap(); FieldModifierMapT & map() { return _map; } const FieldModifierMapT & map() const { return _map; } diff --git a/vsm/src/vespa/vsm/vsm/fieldsearchspec.cpp b/vsm/src/vespa/vsm/vsm/fieldsearchspec.cpp index f024cbfb0bc..e2913e01967 100644 --- a/vsm/src/vespa/vsm/vsm/fieldsearchspec.cpp +++ b/vsm/src/vespa/vsm/vsm/fieldsearchspec.cpp @@ -1,6 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/vsm/vsm/fieldsearchspec.h> + +#include "fieldsearchspec.h" #include <vespa/vsm/searcher/utf8flexiblestringfieldsearcher.h> #include <vespa/vsm/searcher/utf8strchrfieldsearcher.h> #include <vespa/vsm/searcher/utf8substringsearcher.h> @@ -151,8 +151,7 @@ FieldSearchSpecMap::FieldSearchSpecMap() : _specMap(), _documentTypeMap(), _nameIdMap() -{ -} +{ } namespace { const vespalib::string _G_empty(""); diff --git a/vsm/src/vespa/vsm/vsm/snippetmodifier.cpp b/vsm/src/vespa/vsm/vsm/snippetmodifier.cpp index bd1904b48ad..ea3e1dc8e91 100644 --- a/vsm/src/vespa/vsm/vsm/snippetmodifier.cpp +++ b/vsm/src/vespa/vsm/vsm/snippetmodifier.cpp @@ -1,10 +1,11 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> + +#include "snippetmodifier.h" +#include <vespa/vespalib/stllike/hash_map.hpp> + #include <vespa/log/log.h> LOG_SETUP(".vsm.snippetmodifier"); -#include <vespa/vsm/vsm/snippetmodifier.h> - using namespace document; using search::QueryTerm; using search::QueryTermList; |