1#ifndef Rosebud_CxxGenerator_H 
    2#define Rosebud_CxxGenerator_H 
    3#include <Rosebud/Generator.h> 
   10    size_t outputWidth = 130;                           
 
 
Base class for generators that produce C++ code.
 
virtual void genInitProperties(std::ostream &header, std::ostream &impl, const Ast::ClassPtr &)
Emit code that initializes all local properties.
 
virtual std::string initialValue(const Ast::PropertyPtr &)
Initial value expression for the property.
 
virtual void genDefaultConstructor(std::ostream &header, std::ostream &impl, const Ast::ClassPtr &, Access)
Emit code for the class default constructor.
 
virtual std::string propertyMutatorArgumentType(const Ast::PropertyPtr &)
Type for the argument for a property mutator.
 
virtual std::string ctorInitializerExpression(const Ast::PropertyPtr &, const std::string &expr)
Expression for initializing a property in a constructor, or empty.
 
virtual void genConstructorBody(std::ostream &, const Ast::ClassPtr &)
Emit code for the constructor body.
 
virtual std::string valueType(const Ast::PropertyPtr &)
Type of value for initializing a property.
 
virtual std::string machineGenerated(char commentType='/')
Return a title comment that says the file is machine generated.
 
virtual bool genArgsConstructor(std::ostream &header, std::ostream &impl, const Ast::ClassPtr &, const Hierarchy &, Access)
Emit code for the constructor with ctor_args property arguments.
 
virtual void genDestructor(std::ostream &header, std::ostream &impl, const Ast::ClassPtr &)
Emit code for the class destructor.
 
virtual std::string propertyDataMemberType(const Ast::PropertyPtr &)
Type for the data member for a property.
 
virtual std::string removePointer(const std::string &) const
Given a type name, remove the outer pointer if present.
 
virtual std::string resetStatement(const Ast::PropertyPtr &)
Statement to initialize a property.
 
virtual std::string propertyAccessorReturnType(const Ast::PropertyPtr &)
Type for the return value for a property accessor.
 
Base class for backend code generators.
 
Graph containing user-defined vertices and edges.
 
std::shared_ptr< Class > ClassPtr
Shared-ownership pointer to a Class.
 
std::shared_ptr< Property > PropertyPtr
Shared-ownership pointer to a Property.
 
Rosebud is a tool to generate abstract syntax trees.