blob: d179ad06ec5bf80daa1697475573db9d06b25d42 (
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
29
30
31
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "bucket.h"
#include <ostream>
#include <vespa/vespalib/stllike/asciistream.h>
namespace storage::spi {
vespalib::string
Bucket::toString() const {
vespalib::asciistream ost;
ost << *this;
return ost.str();
}
vespalib::asciistream&
operator<<(vespalib::asciistream& os, const Bucket& bucket)
{
return os << "Bucket(0x"
<< vespalib::hex << vespalib::setw(sizeof(document::BucketId::Type)*2) << vespalib::setfill('0')
<< bucket.getBucketId().getId()
<< vespalib::dec
<< ")";
}
std::ostream&
operator<<(std::ostream& os, const Bucket& bucket) {
return os << bucket.toString();
}
}
|