43 ADOfstream(
const char* filename,
44 const char* description,
45 const char* sourceFile,
46 const char* mnemonic )
48 std::ofstream( filename )
52 " " << filename <<
"\t" << description << std::endl <<
53 " This file is part of gstlibs.\n"
55 " Copyright (C) 2011 Christophe Prud'homme\n"
57 " gstlibs is free software; you can redistribute it and/or modify\n"
58 " it under the terms of the GNU Lesser General Public License as published by\n"
59 " the Free Software Foundation; either version 2 of the License, or\n"
60 " (at your option) any later version.\n"
62 " gstlibs is distributed in the hope that it will be useful,\n"
63 " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
64 " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
65 " GNU Lesser General Public License for more details.\n"
67 " You should have received a copy of the GNU Lesser General Public License\n"
68 " along with gstlibs; if not, write to the Free Software\n"
69 " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"
71 << std::endl << std::endl
72 <<
"// Generated source file. Do not edit. " << std::endl
73 <<
"// " << sourceFile <<
" " << __DATE__ <<
" " << __TIME__
74 << std::endl << std::endl
75 <<
"#ifndef " << mnemonic << std::endl
76 <<
"#define " << mnemonic << std::endl << std::endl;
79 void include(
const char* filename )
81 ( *this ) <<
"#include <" << filename <<
">" << std::endl;
84 void beginNamespace( std::string
const& __ns )
86 ( *this ) <<
"namespace " << __ns <<
"\n"
96 ( *this ) << std::endl <<
"#endif" << std::endl;