summaryrefslogtreecommitdiff
path: root/src/ValueBase.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-06-19 17:54:54 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-06-19 17:54:54 +0000
commitcb4e25e4b4a2cfa6349a25586a44c932022e6841 (patch)
tree15c0713df0ca88784a0c95a466e3a846192f290b /src/ValueBase.h
parent8ba97188ce42be38b5427e9bd70bb7f5ba8238f9 (diff)
2010-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed BDE and bencode
Diffstat (limited to 'src/ValueBase.h')
-rw-r--r--src/ValueBase.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ValueBase.h b/src/ValueBase.h
index 9dbbcf51..3f907923 100644
--- a/src/ValueBase.h
+++ b/src/ValueBase.h
@@ -96,6 +96,8 @@ public:
static SharedHandle<String> g(const ValueType& string);
+ static SharedHandle<String> g(const unsigned char* data, size_t length);
+
virtual void accept(ValueBaseVisitor& visitor) const;
private:
ValueType str_;
@@ -128,12 +130,18 @@ public:
// Appends given v to list.
void append(const SharedHandle<ValueBase>& v);
+ // Appeding string is so common that we provide shortcut function.
+ void append(const String::ValueType& string);
+
// Alias for append()
List& operator<<(const SharedHandle<ValueBase>& v);
// Returns the object at given index.
const SharedHandle<ValueBase>& get(size_t index) const;
+ // Set the object at given index.
+ void set(size_t index, const SharedHandle<ValueBase>& v);
+
// Returns the const reference of the object at the given index.
const SharedHandle<ValueBase>& operator[](size_t index) const;