mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
cloop: put version #define for each interface in the C++ generator.
This commit is contained in:
parent
89087e0e10
commit
5b98953343
11
extern/cloop/src/cloop/Generator.cpp
vendored
11
extern/cloop/src/cloop/Generator.cpp
vendored
@ -21,12 +21,14 @@
|
||||
|
||||
#include "Generator.h"
|
||||
#include "Expr.h"
|
||||
#include <algorithm>
|
||||
#include <deque>
|
||||
#include <set>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using std::transform;
|
||||
using std::deque;
|
||||
using std::runtime_error;
|
||||
using std::set;
|
||||
@ -147,6 +149,9 @@ CppGenerator::CppGenerator(const string& filename, const string& prefix, Parser*
|
||||
|
||||
void CppGenerator::generate()
|
||||
{
|
||||
string nameSpaceUpper = nameSpace;
|
||||
transform(nameSpaceUpper.begin(), nameSpaceUpper.end(), nameSpaceUpper.begin(), toupper);
|
||||
|
||||
fprintf(out, "// %s\n\n", AUTOGEN_MSG);
|
||||
|
||||
fprintf(out, "#ifndef %s\n", headerGuard.c_str());
|
||||
@ -415,6 +420,12 @@ void CppGenerator::generate()
|
||||
}
|
||||
|
||||
fprintf(out, "\t};\n\n");
|
||||
|
||||
fprintf(out, "#define %s_%s%s_VERSION %u\n\n",
|
||||
nameSpaceUpper.c_str(),
|
||||
prefix.c_str(),
|
||||
interface->name.c_str(),
|
||||
interface->version);
|
||||
}
|
||||
|
||||
fprintf(out, "\t// Interfaces implementations\n");
|
||||
|
Loading…
Reference in New Issue
Block a user