|
forb
|
Base class used to define primitive types, custom types (structures) and arrays. More...
#include <type.hpp>
Public Member Functions | |
| type () | |
| Empty type, used to preallocate types in arrays or to use later assignment operator. | |
| type (const std::shared_ptr< module > &parent, const std::string &name) | |
| Using constructors from superclass. | |
| ~type () override=default | |
| This class is virtual, so it requires a virtual destructor. | |
| type (type &&)=default | |
| This class supports moving. | |
| type & | operator= (type &&)=default |
| This class supports moving. | |
| type (const type &)=default | |
| This class supports copying. | |
| type & | operator= (const type &)=default |
| This class supports copying. | |
| virtual void | print_var_declaration (code_ostream &out, const std::string &var_name) const |
| Print the declaration of a variable of this type. | |
| virtual void | print_var_definition (code_ostream &out, const std::string &var_name, bool force_stack) const |
| Print the definition of a variable of this type. | |
| virtual void | print_var_lvalue (code_ostream &out, const std::string &var_name, bool force_stack) const |
| Print the acquisition of the value of a variable of this type. | |
| void | print_var_lvalue (code_ostream &out, const std::string &var_name) const |
| Print the acquisition of the value of a variable of this type. | |
| virtual void | print_var_reference (code_ostream &out, const std::string &var_name) const |
| Print the declaration of a reference to a variable of this type. | |
| virtual void | print_var_marshal (code_ostream &out, const std::string &var_name, const marshal &do_undo, bool force_stack) const |
| Print the actions needed to either marshal or unmarshal a variable of this type. | |
| void | print_var_marshal (code_ostream &out, const std::string &var_name, const marshal &do_undo) const |
| Print the actions needed to either marshal or unmarshal a variable of this type. | |
| virtual void | print_var_serialize (code_ostream &out, const std::string &var_name, const serialize &do_undo, bool force_stack) const |
| Print the actions needed to either serialize or deserialize a variable of this type. | |
| void | print_var_serialize (code_ostream &out, const std::string &var_name, const serialize &do_undo) const |
| Print the actions needed to either serialize or deserialize a variable of this type. | |
| virtual size_t | size_of () const =0 |
| Returns the size of the given type. | |
| virtual size_t | alignment () const =0 |
| Returns the alignment of the given type. | |
Public Member Functions inherited from forbcc::entity | |
| entity () | |
| Constructs an empty entity, used to preallocate entity variables (like in arrays) and to later use the assignment operator to overwrite its content. | |
| entity (const std::shared_ptr< entity > &parent, const std::string &name) | |
| Constructs an entity within a given parent. | |
| virtual | ~entity ()=default |
| Does nothing because the destructor of the shared_ptr handles all the stuff It's necessary for the destructor to be virtual because share_ptrs to subclasses shall be able to correctly destruct objects of the subclasses. More... | |
| entity (entity &&)=default | |
| This class supports moving. | |
| entity & | operator= (entity &&)=default |
| This class supports moving. | |
| entity (const entity &)=default | |
| This class supports copying. | |
| entity & | operator= (const entity &)=default |
| This class supports copying. | |
| std::shared_ptr< entity > | parent () const |
| Returns the parent of the given entity. | |
| std::string | name () const |
| Returns the name of the given entity. | |
| virtual void | print_declaration (code_ostream &out) const =0 |
| Prints the declaration of the given entity, if required. | |
| virtual void | print_definition (code_ostream &out) const =0 |
| Prints the definition of the given entity, if required. | |
| virtual std::string | codename () const |
| Returns the codename of the given entity, which is the name of the entity as seen from the global scope. More... | |
Base class used to define primitive types, custom types (structures) and arrays.
1.8.12