mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Addition to prev. revision [#CLICKHOUSE-2].
This commit is contained in:
parent
db984d92a8
commit
fd5ac57b8e
@ -50,22 +50,27 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class StringHolder {
|
namespace detail
|
||||||
protected:
|
{
|
||||||
std::string ss;
|
/// For correct order of initialization.
|
||||||
};
|
class StringHolder
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
std::string value;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates the string by itself and allows to get it.
|
/// Creates the string by itself and allows to get it.
|
||||||
class WriteBufferFromOwnString : public StringHolder, public WriteBufferFromString
|
class WriteBufferFromOwnString : public detail::StringHolder, public WriteBufferFromString
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WriteBufferFromOwnString() : WriteBufferFromString(ss) {}
|
WriteBufferFromOwnString() : WriteBufferFromString(value) {}
|
||||||
|
|
||||||
std::string & str()
|
std::string & str()
|
||||||
{
|
{
|
||||||
finish();
|
finish();
|
||||||
return ss;
|
return value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user