response codes

This commit is contained in:
Max-Wilhelm Bruker 2009-10-26 17:05:08 +01:00
parent 3461b60183
commit bd2855cb95
7 changed files with 186 additions and 92 deletions

View file

@ -78,7 +78,7 @@ while (<file>) {
print headerfile "public:\n"
. "\t$className($constructorParamsH);\n"
. $paramStr4
. "\tstatic Command *newCommand() { return new $className; }\n"
. "\tstatic ProtocolItem *newItem() { return new $className; }\n"
. ($paramStr5 eq '' ? '' : "protected:\n\tvoid extractParameters();\n")
. "};\n";
print cppfile $className . "::$className($constructorParamsCpp)\n"
@ -93,14 +93,14 @@ while (<file>) {
. $paramStr5
. "}\n";
}
$initializeHash .= "\tcommandHash.insert(\"$name1\", $className" . "::newCommand);\n";
$initializeHash .= "\titemNameHash.insert(\"cmd$name1\", $className" . "::newItem);\n";
}
close(file);
print headerfile "\n#endif\n";
close(headerfile);
print cppfile "void Command::initializeHash()\n"
print cppfile "void ProtocolItem::initializeHashAuto()\n"
. "{\n"
. $initializeHash
. "}\n";