#ifndef CGENERATOR_H #define CGENERATOR_H #include #include #include #include "NodeTree.h" #include "ASTData.h" #include "Type.h" #include "util.h" #include "Poset.h" class CGenerator { public: CGenerator(); ~CGenerator(); void generateCompSet(std::map*> ASTs, std::string outputName); std::string generate(NodeTree* from, NodeTree* enclosingObject = NULL); static std::string ValueTypeToCType(Type *type); static std::string ValueTypeToCTypeDecoration(Type *type); static std::string CifyName(std::string name); std::string generateObjectMethod(NodeTree* enclosingObject, NodeTree* from); NodeTree* getMethodsObjectType(NodeTree* scope, std::string functionName); std::string generatorString; private: std::string tabs(); int tabLevel; }; #endif