summaryrefslogtreecommitdiffstats
path: root/staging_vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-12-01 12:46:26 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-12-12 02:55:41 +0100
commit9fd8645ac67e0538cb5cf95fe46d8701f3c8535c (patch)
tree7770bbea25a9c10451a4ab5e0e004591d29452c7 /staging_vespalib
parent24cb878af1ec770f075f6ccfd582dcceb146cb14 (diff)
Do not include asciistream everywhere.
Diffstat (limited to 'staging_vespalib')
-rw-r--r--staging_vespalib/src/vespa/vespalib/data/fileheader.cpp8
-rw-r--r--staging_vespalib/src/vespa/vespalib/data/fileheader.h4
-rw-r--r--staging_vespalib/src/vespa/vespalib/objects/asciiserializer.cpp2
-rw-r--r--staging_vespalib/src/vespa/vespalib/objects/asciiserializer.h4
-rw-r--r--staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.cpp4
-rw-r--r--staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.h3
-rw-r--r--staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp4
-rw-r--r--staging_vespalib/src/vespa/vespalib/util/jsonwriter.cpp2
-rw-r--r--staging_vespalib/src/vespa/vespalib/util/jsonwriter.h2
9 files changed, 20 insertions, 13 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/data/fileheader.cpp b/staging_vespalib/src/vespa/vespalib/data/fileheader.cpp
index de3ca9eb1c1..1bddef0830d 100644
--- a/staging_vespalib/src/vespa/vespalib/data/fileheader.cpp
+++ b/staging_vespalib/src/vespa/vespalib/data/fileheader.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 "fileheader.h"
+#include <vespa/vespalib/stllike/asciistream.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".fileheader");
-#include "fileheader.h"
-
namespace vespalib {
VESPA_IMPLEMENT_EXCEPTION(IllegalHeaderException, vespalib::Exception);
@@ -134,6 +134,8 @@ GenericHeader::Tag::Tag(const vespalib::string &name, const vespalib::string &va
// empty
}
+GenericHeader::Tag::~Tag() { }
+
size_t
GenericHeader::Tag::getSize() const
{
diff --git a/staging_vespalib/src/vespa/vespalib/data/fileheader.h b/staging_vespalib/src/vespa/vespalib/data/fileheader.h
index b43af5c5a90..ca9f33714db 100644
--- a/staging_vespalib/src/vespa/vespalib/data/fileheader.h
+++ b/staging_vespalib/src/vespa/vespalib/data/fileheader.h
@@ -5,10 +5,11 @@
#include "databuffer.h"
#include <vespa/fastos/file.h>
#include <vespa/vespalib/util/exception.h>
-#include <vespa/vespalib/stllike/asciistream.h>
namespace vespalib {
+class asciistream;
+
/**
* This exception can be thrown when serializing or deserializing header content.
*/
@@ -58,6 +59,7 @@ public:
Tag(const vespalib::string &name, int64_t val);
Tag(const vespalib::string &name, uint64_t val);
Tag(const vespalib::string &name, const vespalib::string &val);
+ ~Tag();
size_t read(DataBuffer &buf);
size_t write(DataBuffer &buf) const;
diff --git a/staging_vespalib/src/vespa/vespalib/objects/asciiserializer.cpp b/staging_vespalib/src/vespa/vespalib/objects/asciiserializer.cpp
index 10c26eea3cf..e691f7f03e8 100644
--- a/staging_vespalib/src/vespa/vespalib/objects/asciiserializer.cpp
+++ b/staging_vespalib/src/vespa/vespalib/objects/asciiserializer.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/vespalib/objects/asciiserializer.h>
+#include <vespa/vespalib/stllike/asciistream.h>
namespace vespalib {
diff --git a/staging_vespalib/src/vespa/vespalib/objects/asciiserializer.h b/staging_vespalib/src/vespa/vespalib/objects/asciiserializer.h
index 06283ba1b61..cc9a4911384 100644
--- a/staging_vespalib/src/vespa/vespalib/objects/asciiserializer.h
+++ b/staging_vespalib/src/vespa/vespalib/objects/asciiserializer.h
@@ -3,9 +3,11 @@
#include <vespa/vespalib/objects/serializer.h>
#include <vespa/vespalib/objects/deserializer.h>
-#include <vespa/vespalib/stllike/asciistream.h>
namespace vespalib {
+
+class asciistream;
+
class AsciiSerializer : public Serializer {
public:
AsciiSerializer(asciistream &stream) : _stream(stream) { }
diff --git a/staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.cpp b/staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.cpp
index 6d3c93dbb66..3a19894525c 100644
--- a/staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.cpp
+++ b/staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.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/vespalib/objects/floatingpointtype.h>
-#include <iostream>
+#include <vespa/vespalib/stllike/asciistream.h>
+#include <ostream>
namespace vespalib {
diff --git a/staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.h b/staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.h
index 49d13f5e35d..7a910d46d42 100644
--- a/staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.h
+++ b/staging_vespalib/src/vespa/vespalib/objects/floatingpointtype.h
@@ -23,11 +23,12 @@
#pragma once
-#include <vespa/vespalib/stllike/asciistream.h>
#include <iosfwd> // To get std::ostream for output operator
namespace vespalib {
+class asciistream;
+
template<typename Number>
class FloatingPointType {
Number _value;
diff --git a/staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp b/staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp
index b90ce046606..df5921ed48b 100644
--- a/staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp
+++ b/staging_vespalib/src/vespa/vespalib/util/jsonstream.cpp
@@ -3,6 +3,7 @@
#include "jsonstream.h"
#include "jsonexception.h"
#include <vespa/vespalib/util/exceptions.h>
+#include <vespa/vespalib/stllike/asciistream.h>
namespace vespalib {
@@ -14,8 +15,7 @@ JsonStream::getStateName(const State& s) {
case State::ARRAY: return "ArrayExpectingValue";
case State::ROOT: return "RootExpectingArrayOrObjectStart";
}
- throw IllegalStateException("Control should not reach this point",
- VESPA_STRLOC);
+ throw IllegalStateException("Control should not reach this point", VESPA_STRLOC);
}
JsonStream::JsonStream(vespalib::asciistream& as, bool createIndents)
diff --git a/staging_vespalib/src/vespa/vespalib/util/jsonwriter.cpp b/staging_vespalib/src/vespa/vespalib/util/jsonwriter.cpp
index 8306699516d..64affd5318e 100644
--- a/staging_vespalib/src/vespa/vespalib/util/jsonwriter.cpp
+++ b/staging_vespalib/src/vespa/vespalib/util/jsonwriter.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 "jsonwriter.h"
+#include <vespa/vespalib/stllike/asciistream.h>
#include <cmath>
namespace vespalib {
diff --git a/staging_vespalib/src/vespa/vespalib/util/jsonwriter.h b/staging_vespalib/src/vespa/vespalib/util/jsonwriter.h
index 6016ad0a157..60a7a62814b 100644
--- a/staging_vespalib/src/vespa/vespalib/util/jsonwriter.h
+++ b/staging_vespalib/src/vespa/vespalib/util/jsonwriter.h
@@ -2,7 +2,7 @@
#pragma once
#include <vector>
-#include <vespa/vespalib/stllike/asciistream.h>
+#include <vespa/vespalib/stllike/string.h>
namespace vespalib {