Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
Description
We may add the generator option, as an experimental and with no BiC promise that allows generating the protobuf messages that reuse the QProtobufMessage dptr. This will save some memory in the generated code and can be useful in low-memory applications.
Prototype:
// dptr based on QProtobufMessage dptr: class $classname$_QtProtobufData : private QProtobufMessagePrivate { $classname$_QtProtobufData(const QMetaObject *metaObject, const QtProtobufPrivate::QProtobufPropertyOrdering *ordering); }; $classname$_QtProtobufData::$classname$_QtProtobufData(const QMetaObject *metaObject, const QtProtobufPrivate::QProtobufPropertyOrdering *ordering) : QProtobufMessagePrivate(metaObject, ordering) {} $classname$::$classname$ : QProtobufMessage(*new $classname$_QtProtobufData(&$classname$::staticMetaObject, &$classname$::staticPropertyOrdering)) {}