X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=tools%2Fminiswig%2Fcreate_wrapper.cpp;h=826a9aba88138a079fb8d92ce8a2f43aaa28283e;hb=08813a74da6ac1fd045a105e4e8105f1d7f716f0;hp=d5912e22d3d4cae3b69c0d1db29e0df8369d4dc7;hpb=f406067af6cbeb0a638078fe1d386d092583909c;p=supertux.git diff --git a/tools/miniswig/create_wrapper.cpp b/tools/miniswig/create_wrapper.cpp index d5912e22d..826a9aba8 100644 --- a/tools/miniswig/create_wrapper.cpp +++ b/tools/miniswig/create_wrapper.cpp @@ -4,10 +4,10 @@ #include "create_wrapper.hpp" #include "globals.hpp" -#include #include #include #include +#include void WrapperCreator::create_wrapper(Namespace* ns) @@ -26,13 +26,10 @@ WrapperCreator::create_wrapper(Namespace* ns) << " * '" << fromfile << "'\n" << " * DO NOT CHANGE\n" << " */\n" - << "#ifndef __" << modulename << "_WRAPPER_H__\n" - << "#define __" << modulename << "_WRAPPER_H__\n" - << "\n" - << "#include \n" + << "#ifndef HEADER_SUPERTUX_SCRIPTING_WRAPPER_HPP\n" //TODO avoid hardcoding + << "#define HEADER_SUPERTUX_SCRIPTING_WRAPPER_HPP\n" << "\n" - << "namespace Scripting\n" - << "{\n" + << "namespace Scripting {\n" << "\n"; hppout << "void register_" << modulename << "_wrapper(HSQUIRRELVM v);\n" @@ -53,7 +50,9 @@ WrapperCreator::create_wrapper(Namespace* ns) hppout <<"\n" << "}\n" << "\n" - << "#endif\n"; + << "#endif\n" + << "\n" + << "/* EOF */\n"; // cpp header out << "/**\n" @@ -61,20 +60,14 @@ WrapperCreator::create_wrapper(Namespace* ns) << " * '" << fromfile << "'\n" << " * DO NOT CHANGE\n" << " */\n" - << "#include \n" << "\n" - << "#include \n" - << "#include \n" - << "#include \n" << "#include \n" - << "#include \n" - << "#include \"squirrel_error.hpp\"\n" - << "#include \"wrapper.interface.hpp\"\n" << "\n" - << "namespace Scripting\n" - << "{\n" - << "namespace Wrapper\n" - << "{\n" + << "#include \"scripting/squirrel_error.hpp\"\n" + << "#include \"scripting/wrapper.interface.hpp\"\n" + << "\n" + << "namespace Scripting {\n" + << "namespace Wrapper {\n" << "\n"; for(std::vector::iterator i = ns->types.begin(); @@ -110,7 +103,9 @@ WrapperCreator::create_wrapper(Namespace* ns) out << "}\n" << "\n" - << "} // end of namespace Scripting\n"; + << "} // end of namespace Scripting\n" + << "\n" + << "/* EOF */\n"; } void