initial checkin of C++ port (in progress)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@2 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-01 14:08:07 +00:00
parent f5c0071da6
commit ddfb1a5089
56 changed files with 8781 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
# Generate a header and source file
$file = $ARGV[0];
$macro = uc $file;
$macro =~ s@/@_@g;
# read templates
open F, "../src/code_template.hpp";
$hpp = join('',<F>);
close F;
open F, "../src/code_template.cpp";
$cpp = join('',<F>);
close F;
# insert stuff
$hpp =~ s/_\n/_$macro\n/g;
$cpp =~ s@<util/prec.hpp>@<$file.hpp>@g;
# write files
open F, "> ../src/$file.hpp";
print F $hpp;
close F;
open F, "> ../src/$file.cpp";
print F $cpp;
close F;