diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-11-30 01:10:44 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-12 02:55:41 +0100 |
commit | f1d0f2af6b0bae3042b77f37b2461aa1229eca45 (patch) | |
tree | dc50f83308166f04f79c5e1804d5544de41b060c | |
parent | 848672a85b9a553034e4ff46a52521e3ce681912 (diff) |
Targeted include of header files.
23 files changed, 55 insertions, 42 deletions
diff --git a/document/src/vespa/document/base/testdocman.cpp b/document/src/vespa/document/base/testdocman.cpp index 538f1b04c0e..f7a01761de3 100644 --- a/document/src/vespa/document/base/testdocman.cpp +++ b/document/src/vespa/document/base/testdocman.cpp @@ -6,6 +6,7 @@ #include <boost/random.hpp> #include <vespa/document/base/exceptions.h> #include <vespa/document/datatype/datatypes.h> +#include <sstream> namespace document { diff --git a/document/src/vespa/document/datatype/arraydatatype.cpp b/document/src/vespa/document/datatype/arraydatatype.cpp index 7e851453c78..71fa6acd4b5 100644 --- a/document/src/vespa/document/datatype/arraydatatype.cpp +++ b/document/src/vespa/document/datatype/arraydatatype.cpp @@ -1,9 +1,8 @@ // 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/document/datatype/arraydatatype.h> - #include <vespa/document/fieldvalue/arrayfieldvalue.h> +#include <vespa/vespalib/util/exceptions.h> namespace document { diff --git a/document/src/vespa/document/datatype/primitivedatatype.cpp b/document/src/vespa/document/datatype/primitivedatatype.cpp index b335f3c63e9..3ac20b95b8d 100644 --- a/document/src/vespa/document/datatype/primitivedatatype.cpp +++ b/document/src/vespa/document/datatype/primitivedatatype.cpp @@ -4,6 +4,7 @@ #include <vespa/document/datatype/primitivedatatype.h> #include <vespa/document/fieldvalue/fieldvalues.h> +#include <sstream> namespace document { diff --git a/document/src/vespa/document/fieldvalue/bytefieldvalue.cpp b/document/src/vespa/document/fieldvalue/bytefieldvalue.cpp index c0d6fee9f3b..22b4ea97083 100644 --- a/document/src/vespa/document/fieldvalue/bytefieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/bytefieldvalue.cpp @@ -1,7 +1,7 @@ // 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/document/fieldvalue/bytefieldvalue.h> +#include "bytefieldvalue.h" +#include "numericfieldvalue.hpp" namespace document { diff --git a/document/src/vespa/document/fieldvalue/document.cpp b/document/src/vespa/document/fieldvalue/document.cpp index d849cd6d513..70e872caca9 100644 --- a/document/src/vespa/document/fieldvalue/document.cpp +++ b/document/src/vespa/document/fieldvalue/document.cpp @@ -1,7 +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/document/fieldvalue/document.h> +#include "document.h" #include <memory> #include <vespa/vespalib/util/crc.h> @@ -14,6 +13,7 @@ #include <vespa/document/serialization/vespadocumentserializer.h> #include <vespa/vespalib/objects/nbostream.h> #include <vespa/document/util/serializableexceptions.h> +#include <vespa/vespalib/util/xmlserializable.hpp> #include <sstream> using vespalib::nbostream; diff --git a/document/src/vespa/document/fieldvalue/doublefieldvalue.cpp b/document/src/vespa/document/fieldvalue/doublefieldvalue.cpp index cc5adb763cf..b884380b1a8 100644 --- a/document/src/vespa/document/fieldvalue/doublefieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/doublefieldvalue.cpp @@ -1,7 +1,7 @@ // 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/document/fieldvalue/doublefieldvalue.h> +#include "doublefieldvalue.h" +#include "numericfieldvalue.hpp" namespace document { diff --git a/document/src/vespa/document/fieldvalue/floatfieldvalue.cpp b/document/src/vespa/document/fieldvalue/floatfieldvalue.cpp index a2553dd7f96..e629f80e818 100644 --- a/document/src/vespa/document/fieldvalue/floatfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/floatfieldvalue.cpp @@ -1,7 +1,7 @@ // 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/document/fieldvalue/floatfieldvalue.h> +#include "floatfieldvalue.h" +#include "numericfieldvalue.hpp" namespace document { diff --git a/document/src/vespa/document/fieldvalue/intfieldvalue.cpp b/document/src/vespa/document/fieldvalue/intfieldvalue.cpp index e48d74e1f77..2083c9a7b01 100644 --- a/document/src/vespa/document/fieldvalue/intfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/intfieldvalue.cpp @@ -1,7 +1,7 @@ // 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/document/fieldvalue/intfieldvalue.h> +#include "intfieldvalue.h" +#include "numericfieldvalue.hpp" namespace document { diff --git a/document/src/vespa/document/fieldvalue/literalfieldvalue.cpp b/document/src/vespa/document/fieldvalue/literalfieldvalue.cpp index 0c7395b7d02..4d044219d4c 100644 --- a/document/src/vespa/document/fieldvalue/literalfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/literalfieldvalue.cpp @@ -8,6 +8,17 @@ namespace document { IMPLEMENT_IDENTIFIABLE_ABSTRACT(LiteralFieldValueB, FieldValue); +LiteralFieldValueB::LiteralFieldValueB() : + FieldValue(), + _value(), + _backing(), + _altered(true) +{ + _value = _backing; +} + +LiteralFieldValueB::~LiteralFieldValueB() { } + LiteralFieldValueB::LiteralFieldValueB(const LiteralFieldValueB& other) : FieldValue(other), _value(), diff --git a/document/src/vespa/document/fieldvalue/literalfieldvalue.h b/document/src/vespa/document/fieldvalue/literalfieldvalue.h index c601af88c20..b9bbca0c4c4 100644 --- a/document/src/vespa/document/fieldvalue/literalfieldvalue.h +++ b/document/src/vespa/document/fieldvalue/literalfieldvalue.h @@ -29,6 +29,7 @@ public: typedef string value_type; LiteralFieldValueB(); + ~LiteralFieldValueB(); LiteralFieldValueB(const LiteralFieldValueB &); LiteralFieldValueB(const string& value); diff --git a/document/src/vespa/document/fieldvalue/longfieldvalue.cpp b/document/src/vespa/document/fieldvalue/longfieldvalue.cpp index ee0cea2f5a3..b0ea818ca8e 100644 --- a/document/src/vespa/document/fieldvalue/longfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/longfieldvalue.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/document/fieldvalue/longfieldvalue.h> +#include "longfieldvalue.h" +#include "numericfieldvalue.hpp" namespace document { diff --git a/document/src/vespa/document/fieldvalue/numericfieldvalue.hpp b/document/src/vespa/document/fieldvalue/numericfieldvalue.hpp index ff4da5f4722..9b9c4e35471 100644 --- a/document/src/vespa/document/fieldvalue/numericfieldvalue.hpp +++ b/document/src/vespa/document/fieldvalue/numericfieldvalue.hpp @@ -9,6 +9,7 @@ #include <boost/cast.hpp> #include <boost/lexical_cast.hpp> #include <boost/numeric/conversion/cast.hpp> +#include <vespa/vespalib/util/exceptions.h> namespace document { diff --git a/document/src/vespa/document/fieldvalue/rawfieldvalue.cpp b/document/src/vespa/document/fieldvalue/rawfieldvalue.cpp index 46731d16cb6..96701832b5e 100644 --- a/document/src/vespa/document/fieldvalue/rawfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/rawfieldvalue.cpp @@ -1,8 +1,7 @@ // 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/document/fieldvalue/rawfieldvalue.h> - +#include "rawfieldvalue.h" +#include "literalfieldvalue.hpp" #include <vespa/document/util/stringutil.h> namespace document { diff --git a/document/src/vespa/document/fieldvalue/shortfieldvalue.cpp b/document/src/vespa/document/fieldvalue/shortfieldvalue.cpp index 465233719de..fa70903740b 100644 --- a/document/src/vespa/document/fieldvalue/shortfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/shortfieldvalue.cpp @@ -1,7 +1,7 @@ // 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/document/fieldvalue/shortfieldvalue.h> +#include "shortfieldvalue.h" +#include "numericfieldvalue.hpp" namespace document { diff --git a/document/src/vespa/document/fieldvalue/stringfieldvalue.cpp b/document/src/vespa/document/fieldvalue/stringfieldvalue.cpp index cb705def1aa..b7a209d6f78 100644 --- a/document/src/vespa/document/fieldvalue/stringfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/stringfieldvalue.cpp @@ -1,7 +1,7 @@ // 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/document/fieldvalue/stringfieldvalue.h> +#include "stringfieldvalue.h" +#include "literalfieldvalue.hpp" #include <vespa/document/annotation/spantree.h> #include <vespa/document/serialization/annotationserializer.h> diff --git a/document/src/vespa/document/serialization/vespadocumentdeserializer.cpp b/document/src/vespa/document/serialization/vespadocumentdeserializer.cpp index 416fcf4d909..26a7e40ff95 100644 --- a/document/src/vespa/document/serialization/vespadocumentdeserializer.cpp +++ b/document/src/vespa/document/serialization/vespadocumentdeserializer.cpp @@ -1,11 +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/log/log.h> -LOG_SETUP(".vespadocumentdeserializer"); - -#include <vespa/document/serialization/vespadocumentdeserializer.h> - +#include "vespadocumentdeserializer.h" #include "annotationdeserializer.h" #include "util.h" #include <vespa/document/annotation/spantree.h> @@ -34,7 +29,10 @@ LOG_SETUP(".vespadocumentdeserializer"); #include <vespa/vespalib/util/backtrace.h> #include <vespa/vespalib/tensor/tensor.h> #include <vespa/vespalib/tensor/serialization/typed_binary_format.h> -#include <vector> +#include <vespa/document/util/serializableexceptions.h> + +#include <vespa/log/log.h> +LOG_SETUP(".vespadocumentdeserializer"); using std::vector; using vespalib::Slime; diff --git a/document/src/vespa/document/update/addvalueupdate.cpp b/document/src/vespa/document/update/addvalueupdate.cpp index 090f4ea1eb6..3bcb3c12839 100644 --- a/document/src/vespa/document/update/addvalueupdate.cpp +++ b/document/src/vespa/document/update/addvalueupdate.cpp @@ -1,14 +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 "addvalueupdate.h" #include <vespa/document/base/field.h> #include <vespa/document/datatype/arraydatatype.h> #include <vespa/document/datatype/weightedsetdatatype.h> #include <vespa/document/fieldvalue/fieldvalues.h> #include <vespa/document/repo/fixedtyperepo.h> #include <vespa/document/serialization/vespadocumentdeserializer.h> -#include <vespa/document/update/addvalueupdate.h> #include <vespa/document/util/serializable.h> +#include <vespa/document/util/serializableexceptions.h> #include <vespa/vespalib/objects/nbostream.h> +#include <vespa/vespalib/util/xmlserializable.hpp> using vespalib::IllegalArgumentException; using vespalib::IllegalStateException; diff --git a/document/src/vespa/document/update/arithmeticvalueupdate.cpp b/document/src/vespa/document/update/arithmeticvalueupdate.cpp index d01a85a5e70..915ab4042e4 100644 --- a/document/src/vespa/document/update/arithmeticvalueupdate.cpp +++ b/document/src/vespa/document/update/arithmeticvalueupdate.cpp @@ -1,8 +1,8 @@ // 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 "arithmeticvalueupdate.h" #include <vespa/document/base/field.h> -#include <vespa/document/update/arithmeticvalueupdate.h> #include <vespa/document/fieldvalue/fieldvalues.h> +#include <vespa/vespalib/util/xmlserializable.hpp> using vespalib::IllegalArgumentException; using vespalib::IllegalStateException; diff --git a/document/src/vespa/document/update/assignfieldpathupdate.cpp b/document/src/vespa/document/update/assignfieldpathupdate.cpp index ed008494df0..a17bb6b83ed 100644 --- a/document/src/vespa/document/update/assignfieldpathupdate.cpp +++ b/document/src/vespa/document/update/assignfieldpathupdate.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/document/fieldvalue/fieldvalues.h> #include <vespa/document/repo/fixedtyperepo.h> #include <vespa/document/select/parser.h> #include <vespa/document/serialization/vespadocumentdeserializer.h> #include <vespa/document/update/assignfieldpathupdate.h> -#include <vespa/log/log.h> #include <vespa/vespalib/objects/nbostream.h> +#include <boost/numeric/conversion/cast.hpp> -using vespalib::nbostream; - +#include <vespa/log/log.h> LOG_SETUP(".document.update.fieldpathupdate"); +using vespalib::nbostream; + namespace document { IMPLEMENT_IDENTIFIABLE(AssignFieldPathUpdate, FieldPathUpdate); @@ -23,8 +23,7 @@ AssignFieldPathUpdate::AssignFieldPathUpdate() _expression(), _removeIfZero(false), _createMissingPath(false) -{ -} +{ } AssignFieldPathUpdate::AssignFieldPathUpdate( diff --git a/document/src/vespa/document/update/documentupdate.cpp b/document/src/vespa/document/update/documentupdate.cpp index 8b411e2c94d..823d32584e1 100644 --- a/document/src/vespa/document/update/documentupdate.cpp +++ b/document/src/vespa/document/update/documentupdate.cpp @@ -1,5 +1,4 @@ // 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/document/update/documentupdate.h> #include <vespa/document/datatype/arraydatatype.h> #include <vespa/document/datatype/datatype.h> @@ -10,7 +9,10 @@ #include <vespa/document/update/documentupdateflags.h> #include <vespa/document/update/fieldupdate.h> #include <vespa/document/update/valueupdate.h> +#include <vespa/document/util/serializableexceptions.h> #include <vespa/vespalib/objects/nbostream.h> +#include <vespa/document/util/bufferexceptions.h> +#include <vespa/vespalib/util/xmlserializable.hpp> using vespalib::IllegalArgumentException; using vespalib::IllegalStateException; diff --git a/document/src/vespa/document/update/fieldpathupdate.cpp b/document/src/vespa/document/update/fieldpathupdate.cpp index 7c222a38c29..35ddfea4ed9 100644 --- a/document/src/vespa/document/update/fieldpathupdate.cpp +++ b/document/src/vespa/document/update/fieldpathupdate.cpp @@ -1,8 +1,8 @@ // 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/document/fieldvalue/fieldvalues.h> #include <vespa/document/select/parser.h> #include <vespa/document/update/fieldpathupdates.h> +#include <vespa/document/util/serializableexceptions.h> #include <vespa/log/log.h> LOG_SETUP(".document.update.fieldpathupdate"); diff --git a/document/src/vespa/document/update/mapvalueupdate.cpp b/document/src/vespa/document/update/mapvalueupdate.cpp index c7aef3e8f98..56657491124 100644 --- a/document/src/vespa/document/update/mapvalueupdate.cpp +++ b/document/src/vespa/document/update/mapvalueupdate.cpp @@ -1,5 +1,4 @@ // 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/document/base/field.h> #include <vespa/document/datatype/arraydatatype.h> #include <vespa/document/datatype/weightedsetdatatype.h> @@ -8,6 +7,7 @@ #include <vespa/document/serialization/vespadocumentdeserializer.h> #include <vespa/document/update/mapvalueupdate.h> #include <vespa/vespalib/objects/nbostream.h> +#include <vespa/document/util/serializableexceptions.h> using vespalib::IllegalArgumentException; using vespalib::IllegalStateException; diff --git a/document/src/vespa/document/update/removevalueupdate.cpp b/document/src/vespa/document/update/removevalueupdate.cpp index d5f357131d3..19e72e71e8a 100644 --- a/document/src/vespa/document/update/removevalueupdate.cpp +++ b/document/src/vespa/document/update/removevalueupdate.cpp @@ -1,5 +1,4 @@ // 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/document/base/field.h> #include <vespa/document/datatype/arraydatatype.h> #include <vespa/document/datatype/weightedsetdatatype.h> @@ -8,6 +7,7 @@ #include <vespa/document/serialization/vespadocumentdeserializer.h> #include <vespa/document/update/removevalueupdate.h> #include <vespa/vespalib/objects/nbostream.h> +#include <vespa/document/util/serializableexceptions.h> using vespalib::IllegalArgumentException; using vespalib::IllegalStateException; |