summaryrefslogtreecommitdiffstats
path: root/persistencetypes
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-11-23 22:20:08 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-11-24 19:16:26 +0000
commit0d55267cb15d08241423e4396327174bc2560da1 (patch)
treea59529b6fae86c3408b74c73ac47d978a6e35de4 /persistencetypes
parent25324c6a0b036e1cd5d2a514e4657dd53749ef92 (diff)
Avoid including everything in document in every file we compile.
Diffstat (limited to 'persistencetypes')
-rw-r--r--persistencetypes/src/persistence/spi/types.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/persistencetypes/src/persistence/spi/types.h b/persistencetypes/src/persistence/spi/types.h
index 89b59782ba9..5f93935dc2b 100644
--- a/persistencetypes/src/persistence/spi/types.h
+++ b/persistencetypes/src/persistence/spi/types.h
@@ -2,14 +2,18 @@
#pragma once
-#include <vespa/document/document.h>
-#include <vespa/document/base/globalid.h>
+#include <vector>
+#include <vespa/vespalib/stllike/string.h>
-namespace vespalib
-{
-
-class nbostream;
+namespace vespalib {
+ class nbostream;
+}
+namespace document {
+ class GlobalId;
+ class Document;
+ class DocumentId;
+ class DocumentUpdate;
}
/**
@@ -85,12 +89,16 @@ DEFINE_PRIMITIVE_WRAPPER(uint32_t, BucketChecksum);
// Import critical dependencies into SPI namespace. This makes interface look
// cleaner, and makes it easy to exchange actual implementation.
-typedef document::Document Document;
-typedef document::DocumentUpdate DocumentUpdate;
-typedef document::DocumentId DocumentId;
-typedef document::GlobalId GlobalId;
-typedef std::vector<Timestamp> TimestampList;
-typedef vespalib::string string;
+using Document = document::Document;
+using DocumentUpdate = document::DocumentUpdate;
+using DocumentId = document::DocumentId;
+using GlobalId = document::GlobalId;
+using TimestampList = std::vector<Timestamp>;
+using string = vespalib::string;
+using DocumentUP = std::unique_ptr<Document>;
+using DocumentIdUP = std::unique_ptr<DocumentId>;
+using DocumentSP = std::shared_ptr<Document>;
+using DocumentUpdateSP = std::shared_ptr<DocumentUpdate>;
enum IncludedVersions {
NEWEST_DOCUMENT_ONLY,