blob: 0c1aecfeb6e8c0b5ab960bde49641f0e35b41308 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "bucketspace.h"
#include <vespa/vespalib/stllike/asciistream.h>
namespace document {
vespalib::string BucketSpace::toString() const
{
vespalib::asciistream os;
os << *this;
return os.str();
}
vespalib::asciistream& operator<<(vespalib::asciistream& os, const BucketSpace& id)
{
vespalib::asciistream::StateSaver stateSaver(os);
return os << "BucketSpace(0x"
<< vespalib::hex << vespalib::setw(sizeof(BucketSpace::Type)*2) << vespalib::setfill('0')
<< id.getId()
<< ")";
}
std::ostream& operator<<(std::ostream& os, const BucketSpace& bucketSpace)
{
return os << bucketSpace.toString();
}
}
|