38 #ifndef H_GOM_CODEGEN_CODEGEN_H
39 #define H_GOM_CODEGEN_CODEGEN_H
57 class MetaBuiltinType;
61 class MetaConstructor;
62 class MetaInformation;
63 class CustomAttributes;
97 std::ostream& out, std::vector<MetaClass*> classes,
98 const std::string& package_name
261 std::set<std::string> pass_by_value_;
262 std::set<MetaClass*> to_generate_;
263 std::vector<MetaClass*> sorted_;
264 std::string package_name_;
Stores a set of custom attributes, i.e. name-value pairs attached to the objects.
Generates C++ code to create the GOM meta information.
std::string factory_name(MetaConstructor *constructor)
Generates a C++ name for a factory from a MetaMethod.
void generate_attributes(const CustomAttributes *info, const std::string &variable_name, bool is_pointer=true)
Generates C++ code that creates the CustomAttributes associated with a language construct.
GomCodeGenerator()
GomCodeGenerator constructor.
std::string stringify_default_value(const MetaArg *marg)
Generates the code that computes an object that represents a default value.
void generate_method_adapter(MetaMethod *method)
Generates a method adapter.
std::string colons_to_underscores(const std::string &s)
Replaces all colons (":") with underscores ("_") in a string.
void generate_enum(MetaEnum *menum)
Generates C++ code that creates the meta information associated with an enum.
void generate_class(MetaClass *mclass)
Generates C++ code that creates the meta information associated with a class.
std::string method_adapter_name(MetaMethod *method)
Generates a C++ name for a method adapter from a MetaMethod.
void generate(std::ostream &out, std::vector< MetaClass * > classes, const std::string &package_name)
Generates C++ code to create the Meta information and adapters.
void generate_signal_adapter(MetaSignal *signal)
Generates a signal adapter.
std::string stringify(const std::string &s)
Adds double quotes to a string.
void generate(MetaClass *type)
Generates C++ code that creates the meta information associated with a class.
std::ostream & out()
Gets a reference to the output stream, where the generated C++ code is sent.
void generate_factory(MetaConstructor *constructor)
Generates a factory from a MetaConstructor.
bool pass_by_value(const std::string &type_name)
Tests whether objects of a given type should be passed by value or by reference.
void generate_method_adapter_arglist(MetaMethod *method)
Generates a method adapter.
void generate_builtin(MetaBuiltinType *mbuiltin)
Generates C++ code that creates the meta information associated with a builtin type.
Global Graphite namespace.
Definitions common to all include files in the gom library.