diff options
24 files changed, 86 insertions, 58 deletions
diff --git a/config/src/tests/configgen/value_converter.cpp b/config/src/tests/configgen/value_converter.cpp index 467075354f2..de16478a121 100644 --- a/config/src/tests/configgen/value_converter.cpp +++ b/config/src/tests/configgen/value_converter.cpp @@ -1,10 +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/log/log.h> -LOG_SETUP("value_converter"); #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/config/configgen/value_converter.h> #include <vespa/config/common/exceptions.h> +#include <vespa/vespalib/data/slime/slime.h> using namespace config; using namespace config::internal; diff --git a/config/src/vespa/config/common/configvalue.cpp b/config/src/vespa/config/common/configvalue.cpp index 97706d25401..ce6f0a47cbd 100644 --- a/config/src/vespa/config/common/configvalue.cpp +++ b/config/src/vespa/config/common/configvalue.cpp @@ -2,6 +2,7 @@ #include "configvalue.h" #include "payload_converter.h" #include "misc.h" +#include <vespa/vespalib/data/slime/slime.h> namespace config { @@ -9,20 +10,19 @@ ConfigValue::ConfigValue(const std::vector<vespalib::string> & lines, const vesp : _payload(), _lines(lines), _md5sum(md5sum) -{} +{ } ConfigValue::ConfigValue() : _payload(), _lines(), _md5sum() -{} +{ } ConfigValue::ConfigValue(const PayloadPtr & payload, const vespalib::string & md5) : _payload(payload), _lines(), _md5sum(md5) -{ -} +{ } ConfigValue::~ConfigValue() { } diff --git a/config/src/vespa/config/common/configvalue.h b/config/src/vespa/config/common/configvalue.h index ee877352c69..b148528d6b8 100644 --- a/config/src/vespa/config/common/configvalue.h +++ b/config/src/vespa/config/common/configvalue.h @@ -4,10 +4,15 @@ #include <vespa/vespalib/stllike/string.h> #include <vector> #include <memory> -#include <vespa/vespalib/data/slime/slime.h> #include <vespa/config/frt/protocol.h> #include <vespa/config/configgen/configpayload.h> +namespace vespalib { + namespace slime { + class Cursor; + } +} + namespace config { typedef std::shared_ptr<const protocol::Payload> PayloadPtr; diff --git a/config/src/vespa/config/configgen/configpayload.h b/config/src/vespa/config/configgen/configpayload.h index 411fdc0d443..47b904ed665 100644 --- a/config/src/vespa/config/configgen/configpayload.h +++ b/config/src/vespa/config/configgen/configpayload.h @@ -1,7 +1,11 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/vespalib/data/slime/slime.h> +namespace vespalib { + namespace slime { + class Inspector; + } +} namespace config { diff --git a/config/src/vespa/config/configgen/value_converter.h b/config/src/vespa/config/configgen/value_converter.h index c951f558781..6778017a6e7 100644 --- a/config/src/vespa/config/configgen/value_converter.h +++ b/config/src/vespa/config/configgen/value_converter.h @@ -1,8 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/vespalib/stllike/string.h> #include "configpayload.h" +#include <vespa/vespalib/stllike/string.h> +#include <vespa/vespalib/data/slime/inspector.h> namespace config { diff --git a/config/src/vespa/config/frt/compressioninfo.cpp b/config/src/vespa/config/frt/compressioninfo.cpp index 270d335b7ae..17766325573 100644 --- a/config/src/vespa/config/frt/compressioninfo.cpp +++ b/config/src/vespa/config/frt/compressioninfo.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 <vespa/config/frt/protocol.h> #include "compressioninfo.h" +#include <vespa/config/frt/protocol.h> +#include <vespa/vespalib/data/slime/inspector.h> using namespace vespalib; using namespace vespalib::slime; diff --git a/config/src/vespa/config/frt/protocol.cpp b/config/src/vespa/config/frt/protocol.cpp index 43eba571083..ccc56fd51b9 100644 --- a/config/src/vespa/config/frt/protocol.cpp +++ b/config/src/vespa/config/frt/protocol.cpp @@ -1,9 +1,11 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/log/log.h> -LOG_SETUP(".config.frt.protocol"); #include "protocol.h" #include <lz4.h> #include <vespa/vespalib/util/stringfmt.h> +#include <vespa/vespalib/data/slime/slime.h> + +#include <vespa/log/log.h> +LOG_SETUP(".config.frt.protocol"); using namespace vespalib; using vespalib::alloc::Alloc; diff --git a/config/src/vespa/config/frt/protocol.h b/config/src/vespa/config/frt/protocol.h index 6d1c2b8226c..6334d78ceea 100644 --- a/config/src/vespa/config/frt/protocol.h +++ b/config/src/vespa/config/frt/protocol.h @@ -1,11 +1,18 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/vespalib/data/slime/slime.h> +#include <vespa/vespalib/data/slime/memory.h> #include <vespa/vespalib/stllike/string.h> #include <vespa/config/common/compressiontype.h> #include <vespa/vespalib/util/alloc.h> +namespace vespalib { + class Slime; + namespace slime { + class Inspector; + } +} + namespace config { namespace protocol { diff --git a/config/src/vespa/config/print/CMakeLists.txt b/config/src/vespa/config/print/CMakeLists.txt index 469ec46f0a8..5c8d6eb573c 100644 --- a/config/src/vespa/config/print/CMakeLists.txt +++ b/config/src/vespa/config/print/CMakeLists.txt @@ -10,5 +10,6 @@ vespa_add_library(config_print OBJECT fileconfigsnapshotreader.cpp asciiconfigsnapshotwriter.cpp asciiconfigsnapshotreader.cpp + configdatabuffer.cpp DEPENDS ) diff --git a/config/src/vespa/config/print/configdatabuffer.cpp b/config/src/vespa/config/print/configdatabuffer.cpp new file mode 100644 index 00000000000..b81274790c2 --- /dev/null +++ b/config/src/vespa/config/print/configdatabuffer.cpp @@ -0,0 +1,14 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "configdatabuffer.h" +#include <vespa/vespalib/data/slime/slime.h> + +namespace config { + +ConfigDataBuffer::ConfigDataBuffer() : + _slime(std::make_unique<vespalib::Slime>()) +{ } + +ConfigDataBuffer::~ConfigDataBuffer() { } + +} // namespace config diff --git a/config/src/vespa/config/print/configdatabuffer.h b/config/src/vespa/config/print/configdatabuffer.h index ff485a19058..1f70833a515 100644 --- a/config/src/vespa/config/print/configdatabuffer.h +++ b/config/src/vespa/config/print/configdatabuffer.h @@ -1,9 +1,12 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/vespalib/data/slime/slime.h> #include <vespa/vespalib/stllike/string.h> +namespace vespalib { + class Slime; +} + namespace config { /** @@ -12,12 +15,18 @@ namespace config { class ConfigDataBuffer { public: - vespalib::Slime & slimeObject() { return _slime; } - const vespalib::Slime & slimeObject() const { return _slime; } + ConfigDataBuffer(const ConfigDataBuffer &) = delete; + ConfigDataBuffer & operator = (const ConfigDataBuffer &) = delete; + ConfigDataBuffer(ConfigDataBuffer &&) = default; + ConfigDataBuffer & operator = (ConfigDataBuffer &&) = default; + ConfigDataBuffer(); + ~ConfigDataBuffer(); + vespalib::Slime & slimeObject() { return *_slime; } + const vespalib::Slime & slimeObject() const { return *_slime; } const vespalib::string & getEncodedString() const { return _encoded; } void setEncodedString(const vespalib::string & encoded) { _encoded = encoded; } private: - vespalib::Slime _slime; + std::unique_ptr<vespalib::Slime> _slime; vespalib::string _encoded; }; diff --git a/config/src/vespa/config/print/fileconfigformatter.cpp b/config/src/vespa/config/print/fileconfigformatter.cpp index 4c9c96f06c4..64421e2bbc8 100644 --- a/config/src/vespa/config/print/fileconfigformatter.cpp +++ b/config/src/vespa/config/print/fileconfigformatter.cpp @@ -1,12 +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 <cmath> -#include <stack> -#include <vector> #include "fileconfigformatter.h" #include <vespa/vespalib/stllike/asciistream.h> #include <vespa/vespalib/util/exceptions.h> +#include <vespa/vespalib/data/slime/slime.h> +#include <cmath> +#include <vector> using namespace vespalib::slime::convenience; diff --git a/config/src/vespa/config/print/jsonconfigformatter.cpp b/config/src/vespa/config/print/jsonconfigformatter.cpp index 998895eeac4..ad6e41be756 100644 --- a/config/src/vespa/config/print/jsonconfigformatter.cpp +++ b/config/src/vespa/config/print/jsonconfigformatter.cpp @@ -1,14 +1,9 @@ // 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 <cmath> -#include <stack> -#include <vector> #include "jsonconfigformatter.h" #include <vespa/vespalib/stllike/asciistream.h> #include <vespa/vespalib/data/slime/json_format.h> - -using namespace vespalib::slime::convenience; +#include <vespa/vespalib/data/slime/simple_buffer.h> using vespalib::slime::SimpleBuffer; using vespalib::slime::Output; diff --git a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp index 292f0e2e787..e9496093cfe 100644 --- a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp +++ b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp @@ -1,10 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Unit tests for summaryfieldconverter. -#include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> -LOG_SETUP("summaryfieldconverter_test"); - #include <vespa/document/annotation/annotation.h> #include <vespa/document/annotation/span.h> #include <vespa/document/annotation/spanlist.h> @@ -50,6 +46,7 @@ LOG_SETUP("summaryfieldconverter_test"); #include <vespa/vespalib/tensor/types.h> #include <vespa/vespalib/tensor/default_tensor.h> #include <vespa/vespalib/tensor/tensor_factory.h> +#include <vespa/vespalib/data/slime/slime.h> using vespa::config::search::SummarymapConfig; using vespa::config::search::SummarymapConfigBuilder; diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp index 711e1391c05..f14072cf2ce 100644 --- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp +++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp @@ -1,7 +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/log/log.h> -LOG_SETUP("maintenancecontroller_test"); #include <vespa/searchcore/proton/test/test.h> #include <vespa/searchlib/index/docbuilder.h> #include <vespa/vespalib/testkit/testapp.h> @@ -28,6 +25,10 @@ LOG_SETUP("maintenancecontroller_test"); #include <vespa/searchcore/proton/test/buckethandler.h> #include <vespa/searchcore/proton/test/disk_mem_usage_notifier.h> #include <vespa/vespalib/util/threadstackexecutor.h> +#include <vespa/vespalib/data/slime/slime.h> + +#include <vespa/log/log.h> +LOG_SETUP("maintenancecontroller_test"); using namespace proton; using namespace vespalib::slime; diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp index d89d96f94e0..e1ba72ac710 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp +++ b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp @@ -1,10 +1,10 @@ // 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 "docsumcontext.h" #include <vespa/document/datatype/positiondatatype.h> #include <vespa/searchlib/attribute/iattributemanager.h> #include <vespa/searchlib/common/location.h> #include <vespa/searchlib/common/transport.h> +#include <vespa/vespalib/data/slime/slime.h> #include <vespa/log/log.h> LOG_SETUP(".proton.docsummary.docsumcontext"); diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h index ebfab9dd7e0..80f32e3f046 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h +++ b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h @@ -28,7 +28,7 @@ private: void initState(); search::engine::DocsumReply::UP createReply(); - vespalib::Slime::UP createSlimeReply(); + std::unique_ptr<vespalib::Slime> createSlimeReply(); public: typedef std::unique_ptr<DocsumContext> UP; diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/document_store_explorer.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/document_store_explorer.cpp index 1efda376848..e5cc548e92c 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/document_store_explorer.cpp +++ b/searchcore/src/vespa/searchcore/proton/docsummary/document_store_explorer.cpp @@ -1,9 +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/log/log.h> -LOG_SETUP(".proton.docsummary.document_store_explorer"); #include "document_store_explorer.h" +#include <vespa/vespalib/data/slime/cursor.h> using vespalib::slime::Cursor; using vespalib::slime::Inserter; diff --git a/searchlib/src/vespa/searchlib/index/docbuilder.cpp b/searchlib/src/vespa/searchlib/index/docbuilder.cpp index d88d56be958..8dd37530175 100644 --- a/searchlib/src/vespa/searchlib/index/docbuilder.cpp +++ b/searchlib/src/vespa/searchlib/index/docbuilder.cpp @@ -1,6 +1,5 @@ // 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 "docbuilder.h" #include "doctypebuilder.h" #include <vespa/document/datatype/annotationtype.h> @@ -12,6 +11,7 @@ #include <vespa/vespalib/geo/zcurve.h> #include <vespa/vespalib/text/utf8.h> #include <vespa/vespalib/tensor/tensor.h> +#include <vespa/vespalib/data/slime/slime.h> using namespace document; using namespace search::index; diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp index 5059e859e41..b0704b2d148 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp @@ -1,7 +1,5 @@ // 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> #include <vespa/searchlib/attribute/stringbase.h> #include <vespa/searchlib/attribute/integerbase.h> #include <vespa/searchlib/attribute/floatbase.h> @@ -11,7 +9,9 @@ #include "docsumstate.h" #include <vespa/vespalib/tensor/tensor.h> #include <vespa/vespalib/tensor/serialization/slime_binary_format.h> +#include <vespa/vespalib/data/slime/slime.h> +#include <vespa/log/log.h> LOG_SETUP(".searchlib.docsummary.attributedfw"); using namespace search; diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp index f3272b2f574..f790d38e70e 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp @@ -9,6 +9,7 @@ #include <vespa/searchlib/common/transport.h> #include <vespa/searchlib/util/slime_output_raw_buf_adapter.h> #include <vespa/searchlib/attribute/iattributemanager.h> +#include <vespa/vespalib/data/slime/slime.h> #include <vespa/log/log.h> LOG_SETUP(".searchlib.docsummary.docsumwriter"); diff --git a/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp index e15f0b8c986..efc6af32396 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp @@ -1,13 +1,14 @@ // 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(".searchlib.docsummary.geoposdfw"); #include "geoposdfw.h" #include <vespa/searchlib/attribute/iattributemanager.h> #include <vespa/searchlib/common/documentlocations.h> #include <vespa/searchlib/common/location.h> #include <vespa/vespalib/util/jsonwriter.h> +#include <vespa/vespalib/data/slime/cursor.h> + +#include <vespa/log/log.h> +LOG_SETUP(".searchlib.docsummary.geoposdfw"); namespace search { namespace docsummary { @@ -17,8 +18,7 @@ using attribute::IAttributeContext; GeoPositionDFW::GeoPositionDFW(const vespalib::string & attrName) : AttrDFW(attrName) -{ -} +{ } namespace { diff --git a/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp index 0d397c97a63..b81b1cc231d 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp @@ -1,27 +1,21 @@ // 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> #include <vespa/searchlib/common/featureset.h> #include <vespa/searchlib/common/packets.h> #include "rankfeaturesdfw.h" #include <vespa/searchlib/common/feature.h> #include "docsumformat.h" #include "docsumstate.h" - -LOG_SETUP(".searchlib.docsummary.rankfeaturesdfw"); +#include <vespa/vespalib/data/slime/cursor.h> namespace search { namespace docsummary { RankFeaturesDFW::RankFeaturesDFW() : _env(NULL) -{ -} +{ } -RankFeaturesDFW::~RankFeaturesDFW() -{ -} +RankFeaturesDFW::~RankFeaturesDFW() { } void RankFeaturesDFW::init(IDocsumEnvironment * env) diff --git a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp index e2e03131e91..14a4383009b 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp @@ -1,12 +1,13 @@ // 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/searchlib/common/featureset.h> #include <vespa/searchlib/common/packets.h> #include "docsumformat.h" #include "summaryfeaturesdfw.h" #include "docsumstate.h" +#include <vespa/vespalib/data/slime/cursor.h> #include <cmath> + #include <vespa/log/log.h> LOG_SETUP(".searchlib.docsummary.summaryfeaturesdfw"); |