Mercurial > projects > qtd
comparison generator/dgenerator.h @ 257:17b5e13364b7 lifetime
(none)
author | maxter |
---|---|
date | Wed, 16 Sep 2009 13:56:02 +0000 |
parents | 073b9153ed8a |
children | 515d6e1c7b10 |
comparison
equal
deleted
inserted
replaced
256:b1abe7f57321 | 257:17b5e13364b7 |
---|---|
43 #define DGENERATOR_H | 43 #define DGENERATOR_H |
44 | 44 |
45 #include "generator.h" | 45 #include "generator.h" |
46 #include "metajava.h" | 46 #include "metajava.h" |
47 #include "cppimplgenerator.h" | 47 #include "cppimplgenerator.h" |
48 #include "fileout.h" | |
48 | 49 |
49 #include <QTextStream> | 50 #include <QTextStream> |
50 | 51 |
51 class DocParser; | 52 class DocParser; |
52 | 53 |
135 inline bool nativeJumpTable() const { return m_native_jump_table; } | 136 inline bool nativeJumpTable() const { return m_native_jump_table; } |
136 inline void setNativeJumpTable(bool n) { m_native_jump_table = n; } | 137 inline void setNativeJumpTable(bool n) { m_native_jump_table = n; } |
137 | 138 |
138 void writeShellVirtualFunction(QTextStream &s, const AbstractMetaFunction *function, | 139 void writeShellVirtualFunction(QTextStream &s, const AbstractMetaFunction *function, |
139 const AbstractMetaClass *implementor, int id); | 140 const AbstractMetaClass *implementor, int id); |
140 void marshallFromCppToD(QTextStream &s, const ComplexTypeEntry* ctype); | 141 |
142 enum MarshalFlags | |
143 { | |
144 MarhsalScope = 0x1 | |
145 } | |
146 | |
147 void marshalToD(QTextStream &s, const ComplexTypeEntry* ctype); | |
141 | 148 |
142 private: | 149 private: |
143 QString subDirectoryForPackage(const QString &package) const { return QString(package).replace(".", "/"); } | 150 QString subDirectoryForPackage(const QString &package) const { return QString(package).replace(".", "/"); } |
144 void writeInstantiatedType(QTextStream &s, const AbstractMetaType *abstractMetaType) const; | 151 void writeInstantiatedType(QTextStream &s, const AbstractMetaType *abstractMetaType) const; |
145 | 152 |
149 void addInstantiations(const AbstractMetaType* d_type); | 156 void addInstantiations(const AbstractMetaType* d_type); |
150 void writeRequiredImports(QTextStream &s, const AbstractMetaClass *d_class); | 157 void writeRequiredImports(QTextStream &s, const AbstractMetaClass *d_class); |
151 const TypeEntry* fixedTypeEntry(const TypeEntry *type); | 158 const TypeEntry* fixedTypeEntry(const TypeEntry *type); |
152 | 159 |
153 void writeDestructor(QTextStream &s, const AbstractMetaClass *d_class); | 160 void writeDestructor(QTextStream &s, const AbstractMetaClass *d_class); |
154 void writeFlagsSetter(QTextStream &s, const AbstractMetaClass *d_class); | 161 void writeOwnershipSetter(QTextStream &s, const AbstractMetaClass *d_class); |
155 void writeSignalHandlers(QTextStream &s, const AbstractMetaClass *d_class); | 162 void writeSignalHandlers(QTextStream &s, const AbstractMetaClass *d_class); |
156 void writeEnumAlias(QTextStream &s, const AbstractMetaEnum *d_enum); | 163 void writeEnumAlias(QTextStream &s, const AbstractMetaEnum *d_enum); |
157 void writeSignalSignatures(QTextStream &s, const AbstractMetaClass *d_class, AbstractMetaFunctionList signal_funcs); | 164 void writeSignalSignatures(QTextStream &s, const AbstractMetaClass *d_class, AbstractMetaFunctionList signal_funcs); |
158 void writeQObjectFunctions(QTextStream &s, const AbstractMetaClass *d_class); | 165 void writeQObjectFunctions(QTextStream &s, const AbstractMetaClass *d_class); |
166 void writeObjectFunctions(QTextStream &s, const AbstractMetaClass *d_class); | |
159 void writeConversionFunction(QTextStream &s, const AbstractMetaClass *d_class); | 167 void writeConversionFunction(QTextStream &s, const AbstractMetaClass *d_class); |
160 | 168 |
161 // void writeMarshallFunction(QTextStream &s, const AbstractMetaClass *d_class); | 169 // void writeMarshallFunction(QTextStream &s, const AbstractMetaClass *d_class); |
162 | 170 |
163 int m_recursive; | 171 int m_recursive; |
176 bool m_docs_enabled; | 184 bool m_docs_enabled; |
177 bool m_native_jump_table; | 185 bool m_native_jump_table; |
178 QList<const AbstractMetaFunction *> m_nativepointer_functions; | 186 QList<const AbstractMetaFunction *> m_nativepointer_functions; |
179 QList<const AbstractMetaFunction *> m_resettable_object_functions; | 187 QList<const AbstractMetaFunction *> m_resettable_object_functions; |
180 QList<const AbstractMetaFunction *> m_reference_count_candidate_functions; | 188 QList<const AbstractMetaFunction *> m_reference_count_candidate_functions; |
189 QFile *log; | |
190 QTextStream *logstream; | |
181 }; | 191 }; |
182 | 192 |
183 class ClassFromEntry : Generator | 193 class ClassFromEntry : Generator |
184 { | 194 { |
185 Q_OBJECT | 195 Q_OBJECT |