1 #ifndef FORBCC_CUSTOM_TYPE_H 2 #define FORBCC_CUSTOM_TYPE_H 7 #include <templates/ordered_unique_list.hpp> 8 #include <templates/shareable.hpp> 10 #include <types/type.hpp> 12 #include <variable.hpp> 23 size_t _alignment = 0;
82 #endif //FORBCC_CUSTOM_TYPE_H bool insert(std::string key, const variable &value) override
Wraps odered_unique_list::insert method adding a few operations to calculate structure size and align...
Definition: type_struct.cpp:57
size_t alignment() const override
Returns the alignment of the given type.
Definition: type_struct.hpp:73
size_t size_of() const override
Returns the size of the given type.
Definition: type_struct.hpp:68
Structure types are basically structures defined by the user that can be transferred between library ...
Definition: type_struct.hpp:16
A template that can be used to declare a list of unique ordered items.
Definition: ordered_unique_list.hpp:16
void print_definition(code_ostream &out) const override
Custom types define a partial specialization of the marshal/unmarshal templates.
Definition: type_struct.cpp:27
type_struct(const std::shared_ptr< module > &parent, const std::string &name)
Using constructors from superclass.
Definition: type_struct.hpp:31
A template that can be used to ease the declaration of a shared_pointer of a given type...
Definition: shareable.hpp:13
std::shared_ptr< entity > parent() const
Returns the parent of the given entity.
Definition: entity.hpp:63
void print_declaration(code_ostream &out) const override
Custom types require a declaration of course.
Definition: type_struct.cpp:8
std::string name() const
Returns the name of the given entity.
Definition: entity.hpp:68
This output stream supports indentation of code lines, which are formatted at each std::endl...
Definition: code_ostream.hpp:14
type_struct & operator=(type_struct &&)=default
This class supports moving.
Definition: code_ostream.hpp:11
Represents either an attribute of a forbcc::type_struct class or an automatic variable declared withi...
Definition: variable.hpp:13
~type_struct() override=default
This class is virtual, so it requires a virtual destructor.
type_struct()
Empty structure type, used to preallocate variables in arrays or to use later assignment operator...
Definition: type_struct.hpp:28
Base class used to define primitive types, custom types (structures) and arrays.
Definition: type.hpp:22