diff options
| author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-03-30 20:09:59 +0000 |
|---|---|---|
| committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-03-30 20:09:59 +0000 |
| commit | feed6024a260189ed210f7a04049a44d2a2e9937 (patch) | |
| tree | 8033c7eb7c04e90efb1d0d54e9a5b404695b4e71 /qpid/cpp/src/qmf/engine/ValueImpl.h | |
| parent | 7b39205d3938dcdf87e78d99caa7d69f02212bf8 (diff) | |
| download | qpid-python-feed6024a260189ed210f7a04049a44d2a2e9937.tar.gz | |
add support for QMF TYPE_LIST in engine, ruby and python wrappers
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@929244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qmf/engine/ValueImpl.h')
| -rw-r--r-- | qpid/cpp/src/qmf/engine/ValueImpl.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/qpid/cpp/src/qmf/engine/ValueImpl.h b/qpid/cpp/src/qmf/engine/ValueImpl.h index 84b0e768e6..3b535834fd 100644 --- a/qpid/cpp/src/qmf/engine/ValueImpl.h +++ b/qpid/cpp/src/qmf/engine/ValueImpl.h @@ -33,6 +33,7 @@ namespace qpid { namespace framing { class FieldTable; + class List; } } @@ -138,13 +139,14 @@ namespace engine { bool isList() const { return typecode == TYPE_LIST; } uint32_t listItemCount() const { return vectorVal.size(); } - Value* listItem(uint32_t idx); - void appendToList(Value* val); - void deleteListItem(uint32_t idx); + Value* listItem(uint32_t idx) { return idx < listItemCount() ? &vectorVal[idx] : 0; } + const Value* listItem(uint32_t idx) const { return idx < listItemCount() ? &vectorVal[idx] : 0; } + void appendToList(Value* val) { vectorVal.push_back(*val); } + void deleteListItem(uint32_t idx) { if (idx < listItemCount()) vectorVal.erase(vectorVal.begin()+idx); } bool isArray() const { return typecode == TYPE_ARRAY; } Typecode arrayType() const { return arrayTypecode; } - uint32_t arrayItemCount() const { return vectorVal.size(); } + uint32_t arrayItemCount() const { return 0; } Value* arrayItem(uint32_t idx); void appendToArray(Value* val); void deleteArrayItem(uint32_t idx); @@ -152,6 +154,9 @@ namespace engine { private: void mapToFieldTable(qpid::framing::FieldTable& ft) const; void initMap(const qpid::framing::FieldTable& ft); + + void listToFramingList(qpid::framing::List& fl) const; + void initList(const qpid::framing::List& fl); }; } } |
