nicer description file

This commit is contained in:
Max-Wilhelm Bruker 2009-10-26 16:01:26 +01:00
parent ad47988d91
commit 3461b60183
3 changed files with 35 additions and 33 deletions

View file

@ -17,6 +17,8 @@ while (<file>) {
@line = split(/:/);
$type = shift(@line);
$name1 = shift(@line);
($name2 = $name1) =~ s/_(.)/\U$1\E/g;
$name2 =~ s/^(.)/\U$1\E/;
if ($type == 0) {
$baseClass = 'Command';
$parentConstructorCall = "$baseClass(\"$name1\")";
@ -34,7 +36,7 @@ while (<file>) {
$constructorParamsCpp = "int _gameId";
}
$className = 'Command_' . shift(@line);
$className = 'Command_' . $name2;
print headerfile "class $className : public $baseClass {\n"
. "\tQ_OBJECT\n"
. "private:\n";