summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/amqp/CharSequence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/amqp/CharSequence.cpp')
-rw-r--r--cpp/src/qpid/amqp/CharSequence.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpp/src/qpid/amqp/CharSequence.cpp b/cpp/src/qpid/amqp/CharSequence.cpp
index 857ec7e587..7e433bd26e 100644
--- a/cpp/src/qpid/amqp/CharSequence.cpp
+++ b/cpp/src/qpid/amqp/CharSequence.cpp
@@ -38,10 +38,28 @@ std::string CharSequence::str() const
return std::string(data, size);
}
+CharSequence CharSequence::create()
+{
+ CharSequence c = {0, 0};
+ return c;
+}
+
+CharSequence CharSequence::create(const std::string& str)
+{
+ CharSequence c = {str.data(), str.size()};
+ return c;
+}
+
CharSequence CharSequence::create(const char* data, size_t size)
{
CharSequence c = {data, size};
return c;
}
+CharSequence CharSequence::create(const unsigned char* data, size_t size)
+{
+ CharSequence c = {reinterpret_cast<const char*>(data), size};
+ return c;
+}
+
}} // namespace qpid::amqp