6 #ifndef CHI_STRUCT_TYPE_HPP 7 #define CHI_STRUCT_TYPE_HPP 39 std::vector<NodeInstance*>
setName(std::string newName,
bool updateReferences =
true);
43 const std::string&
name()
const {
return mName; }
47 const std::vector<NamedDataType>&
types()
const {
return mTypes; }
56 void addType(
DataType ty, std::string name,
size_t addBefore,
bool updateReferences =
true);
63 void modifyType(
size_t id,
DataType newTy, std::string newName,
bool updateReferences =
true);
68 void removeType(
size_t id,
bool updateReferences =
true);
75 void updateNodeReferences();
80 std::vector<NamedDataType> mTypes;
88 #endif // CHI_STRUCT_TYPE_HPP std::vector< NodeInstance * > setName(std::string newName, bool updateReferences=true)
Set the name of the struct, and optionally update all references in the context.
const std::string & name() const
Get the name of the type.
Forward declares all the chigraph data types.
A class holding a compound type defined in a GraphModule.
void modifyType(size_t id, DataType newTy, std::string newName, bool updateReferences=true)
Change the type and name of a type.
GraphModule & module() const
Get the module.
GraphStruct(GraphModule &mod, std::string name)
GraphType constructor; don't use this use GraphModule::newStruct.
The class that handles the loading, creation, storing, and compilation of modules It also stores a LL...
Context & context() const
Get the context.
DataType dataType()
Get the DataType of the struct.
void removeType(size_t id, bool updateReferences=true)
Remove a type from a struct.
const std::vector< NamedDataType > & types() const
Get the types the struct contains.
Defines the DataType class.
void addType(DataType ty, std::string name, size_t addBefore, bool updateReferences=true)
Add a new type to the struct.
Module that holds graph functions.
The namespace where chigraph lives.
A type of data Loose wrapper around llvm::Type*, except it knows which ChiModule it's in and it embed...