diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-02-03 20:15:51 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-02-10 08:42:22 -0300 |
commit | ec2b9250a03e0aa5778938ff7fc2441350cefc65 (patch) | |
tree | 6a95a117704c47fb2a142be23a20bba20bb8f2ef /cppgenerator.h | |
parent | 67c9c92f80b83f60b1a5572f82ad5230c5e7201c (diff) |
Shiboken now generates code for public class variable members.
Whenever a class has AbstractMetaField objects, which represent
class member's of the likes of variables, the generator produces
get/set functions for the Python class wrapper.
Diffstat (limited to 'cppgenerator.h')
-rw-r--r-- | cppgenerator.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cppgenerator.h b/cppgenerator.h index a9cf51549..de0396f20 100644 --- a/cppgenerator.h +++ b/cppgenerator.h @@ -127,6 +127,9 @@ private: void writeTypeAsSequenceDefinition(QTextStream& s, const AbstractMetaClass* metaClass); void writeTypeAsNumberDefinition(QTextStream& s, const AbstractMetaClass* metaClass); + void writeGetterFunction(QTextStream& s, const AbstractMetaField* metaField); + void writeSetterFunction(QTextStream& s, const AbstractMetaField* metaField); + void writeRichCompareFunction(QTextStream& s, const AbstractMetaClass* metaClass); void writeFlagsNewMethod(QTextStream& s, const FlagsTypeEntry* cppFlags); @@ -163,6 +166,10 @@ private: /// Returns true if the given class supports the python sequence protocol bool supportsSequenceProtocol(const AbstractMetaClass* metaClass); + + /// Returns true if generator should produce getters and setters for the given class. + bool shouldGenerateGetSetList(const AbstractMetaClass* metaClass); + // Maps special function names to function parameters and return types // used by CPython API in the sequence protocol. QHash<QString, QPair<QString, QString> > m_sequenceProtocol; |