diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-06 20:47:39 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-07 09:50:24 +0200 |
commit | 0b37a1b9eecf9b38310bde4a11c01a7962234450 (patch) | |
tree | 1f6b1836d69fe2e72d800397167f5b5ff02ed90a /document | |
parent | a9ba7645226f200148de44a19aff204dd0841493 (diff) |
Hide BucketId::List
Diffstat (limited to 'document')
-rw-r--r-- | document/src/vespa/document/bucket/CMakeLists.txt | 1 | ||||
-rw-r--r-- | document/src/vespa/document/bucket/bucketid.h | 5 | ||||
-rw-r--r-- | document/src/vespa/document/bucket/bucketidlist.cpp | 12 | ||||
-rw-r--r-- | document/src/vespa/document/bucket/bucketidlist.h | 22 |
4 files changed, 38 insertions, 2 deletions
diff --git a/document/src/vespa/document/bucket/CMakeLists.txt b/document/src/vespa/document/bucket/CMakeLists.txt index 757884f0050..7dfeaa1920f 100644 --- a/document/src/vespa/document/bucket/CMakeLists.txt +++ b/document/src/vespa/document/bucket/CMakeLists.txt @@ -5,6 +5,7 @@ vespa_add_library(document_bucket OBJECT bucketdistribution.cpp bucketid.cpp bucketidfactory.cpp + bucketidlist.cpp bucketselector.cpp bucketspace.cpp DEPENDS diff --git a/document/src/vespa/document/bucket/bucketid.h b/document/src/vespa/document/bucket/bucketid.h index 63b513dd5a2..79da6c2d11b 100644 --- a/document/src/vespa/document/bucket/bucketid.h +++ b/document/src/vespa/document/bucket/bucketid.h @@ -22,7 +22,6 @@ #pragma once #include <vespa/vespalib/stllike/string.h> -#include <vespa/vespalib/util/array.h> namespace vespalib { class nbostream; @@ -33,6 +32,8 @@ namespace document { extern const unsigned char reverseBitTable[256]; +namespace bucket { class BucketIdList; } + class BucketId { public: @@ -47,7 +48,7 @@ public: * typedef when needed we can alter this later with less code changes. */ using Type = uint64_t; - using List = vespalib::Array<BucketId>; + using List = bucket::BucketIdList; /** Create an initially unset bucket id. */ BucketId() : _id(0) {} /** Create a bucket id with the given raw unchecked content. */ diff --git a/document/src/vespa/document/bucket/bucketidlist.cpp b/document/src/vespa/document/bucket/bucketidlist.cpp new file mode 100644 index 00000000000..6c9f7250b8e --- /dev/null +++ b/document/src/vespa/document/bucket/bucketidlist.cpp @@ -0,0 +1,12 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "bucketidlist.h" + +namespace document::bucket { + +BucketIdList::BucketIdList() { } +BucketIdList::BucketIdList(const BucketIdList & rhs) = default; +BucketIdList & BucketIdList::operator = (const BucketIdList &) = default; +BucketIdList::~BucketIdList() { } + +} diff --git a/document/src/vespa/document/bucket/bucketidlist.h b/document/src/vespa/document/bucket/bucketidlist.h new file mode 100644 index 00000000000..f53301d1b44 --- /dev/null +++ b/document/src/vespa/document/bucket/bucketidlist.h @@ -0,0 +1,22 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#pragma once + +#include "bucketid.h" +#include <vespa/vespalib/util/array.h> + +namespace document::bucket { + +using BucketIdListT = vespalib::Array<BucketId>; + +class BucketIdList : public BucketIdListT { +public: + BucketIdList(); + BucketIdList(BucketIdList && rhs) = default; + BucketIdList & operator = (BucketIdList &&) = default; + BucketIdList(const BucketIdList & rhs); + BucketIdList & operator = (const BucketIdList &); + ~BucketIdList(); +}; + +} |