|
-
June 19th, 2012, 03:49 PM
#1
Code Generation
Hi everyone,
I'm looking for some existing solution to automate class code generation.
As an example, suppose I provide an XML:
HTML Code:
<Class name="X">
<Field name="x" type="string" />
</Class>
then I should produce a class like
Code:
class X {
string _x;
string get_x() { return _x; };
void set_x(string x) { _x = x; };
}
It should be something like Eclipse code generation tools that automatically generate getters / setters for a given field.
Nevertheless, it should be something I can use via command line, in order to have scripts that can generate code / compile it / execute it.
Two more comments:
I'm aware of solutions like XSD to C++ compilers, the problem I see is that I don't need the created class to read or write XML objects.
I know I can write my own class to generate C++ code, but I guess something exists, and maybe it has good functionalities like including stuff, namespaces, and generation of function from given patterns, not only getters and setters.
Can you help me?
Thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|