diff --git a/protocolparser.cpp b/protocolparser.cpp index e9cd6aa..2d51684 100644 --- a/protocolparser.cpp +++ b/protocolparser.cpp @@ -16,7 +16,7 @@ #include // The version of the protocol generator is set here -const QString ProtocolParser::genVersion = "1.4.5.a"; +const QString ProtocolParser::genVersion = "1.4.5.b"; // A static list of parsed structures QList ProtocolParser::structures; diff --git a/protocolstructuremodule.cpp b/protocolstructuremodule.cpp index 77315b3..5f949e8 100644 --- a/protocolstructuremodule.cpp +++ b/protocolstructuremodule.cpp @@ -182,10 +182,13 @@ void ProtocolStructureModule::parse(const QDomElement& e) header.makeLineSeparator(); // The encoded size of this structure as a macro that others can access - header.write("#define getMinLengthOf" + typeName + "() (" + encodedLength.minEncodedLength + ")\n"); + if((encode != false) || (decode != false)) + { + header.write("#define getMinLengthOf" + typeName + "() (" + encodedLength.minEncodedLength + ")\n"); - // White space is good - header.makeLineSeparator(); + // White space is good + header.makeLineSeparator(); + } // Write to disk header.flush(); @@ -273,9 +276,6 @@ void ProtocolStructureModule::createTopLevelStructureFunctions(void) header.makeLineSeparator(); source.makeLineSeparator(); - header.write(getPrototypeDecodeString(isBigEndian, false)); - header.makeLineSeparator(); - }// ProtocolStructureModule::createTopLevelStructureFunctions