diff options
author | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-04-08 14:52:54 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:09:59 -0300 |
commit | d75aeacd396691d5b26af1ac2a9669e407639155 (patch) | |
tree | 738bc7d31d00e39a55dfbac153160e4fae80b785 /typesystem.cpp | |
parent | 6acf826b4b2eab32237845f98228171bb8be213c (diff) |
Added ContainerTypeEntry::typeName() method.
With this method we can get the string used in typesystem to declare the
container type (list, set, map, pair, etc).
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
Diffstat (limited to 'typesystem.cpp')
-rw-r--r-- | typesystem.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/typesystem.cpp b/typesystem.cpp index fa9329a3e..837a0e0d0 100644 --- a/typesystem.cpp +++ b/typesystem.cpp @@ -2206,6 +2206,39 @@ QString VariantTypeEntry::targetLangPackage() const return QString(); } +QString ContainerTypeEntry::typeName() const +{ + switch(m_type) { + case LinkedListContainer: + return "linked-list"; + case ListContainer: + return "list"; + case StringListContainer: + return "string-list"; + case VectorContainer: + return "vector"; + case StackContainer: + return "stack"; + case QueueContainer: + return "queue"; + case SetContainer: + return "set"; + case MapContainer: + return "map"; + case MultiMapContainer: + return "multi-map"; + case HashContainer: + return "hash"; + case MultiHashContainer: + return "multi-hash"; + case PairContainer: + return "pair"; + case NoContainer: + default: + return "?"; + } +} + /* static void injectCode(ComplexTypeEntry *e, const char *signature, |