|
forb
|
Defines a method of a forbcc::interface, which can have an arbitrary number of input, output or inout parameters. More...
#include <method.hpp>
Public Member Functions | |
| method () | |
| Empty method, used to preallocate variables in arrays or to use later assignment operator. | |
| method (const std::shared_ptr< interface > &parent, const std::string &name, const std::shared_ptr< const type > &return_type) | |
| Constructs a new method for the given parent interface with a name and a return type. | |
| ~method () override=default | |
| This class is virtual, so it requires a virtual destructor. | |
| method (method &&)=default | |
| This class supports moving. | |
| method & | operator= (method &&)=default |
| This class supports moving. | |
| method (const method &)=default | |
| This class supports copying. | |
| method & | operator= (const method &)=default |
| This class supports copying. | |
| void | print_declaration (code_ostream &out) const override |
| Prints the method declaration. | |
| void | print_definition (code_ostream &) const override |
| THIS FUNCTION DOES NOTHING, use the print_stub_definition and print_skeleton_definition methods respectively according to requirements! The function was defined only because this class is a subclass of the forbcc::entity class, which has a pure virtual print_definition method. More... | |
| void | print_virtual_declaration (code_ostream &out) const |
| Prints the virtual declaration of a method. | |
| void | print_stub_definition (code_ostream &out, const std::string &scope, const std::string &enumname) const |
| Prints the definition of the method of the stub. | |
| void | print_skeleton_definition (code_ostream &out) const |
| Prints the definition of the skeleton code wrapping the virtual call to the method, defined by subclasses of the generated skeleton class. More... | |
| bool | insert (std::string key, const parameter ¶m) override |
| Proxy to ordered_unique_list<forbcc::parameter>, which counts the number of parameters of each successfully insterted type. More... | |
| std::string | id () const |
| Returns the method id, which will be stored within an enum class defined for each interface. More... | |
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 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... | |
Public Member Functions inherited from forbcc::ordered_unique_list< parameter > | |
| const list_t & | list () const |
| Returns a const reference to the list of the elements. | |
| bool | contains (std::string key) const |
| Returns true if the given key is present within the set of keys. | |
| parameter & | operator[] (std::string key) |
| Returns a reference to an element from its key. More... | |
| const_T & | operator[] (std::string key) const |
| Same as operator[](std::string), but returns a const_T instead, when used on a const reference to the list object. More... | |
Additional Inherited Members | |
Public Types inherited from forbcc::ordered_unique_list< parameter > | |
| using | set_t = std::map< std::string, int > |
| The type of the set of keys, used to access the list. | |
| using | list_t = std::vector< parameter > |
| The type of the list. | |
| using | const_T = typename std::add_const< parameter >::type |
| Alias of the const version of the template type T. | |
Defines a method of a forbcc::interface, which can have an arbitrary number of input, output or inout parameters.
| std::string forbcc::method::id | ( | ) | const |
Returns the method id, which will be stored within an enum class defined for each interface.
Method id is obtained as a combination of the method name and its parameters, so that methods overloading is possible for remote objects.
|
inlineoverridevirtual |
Proxy to ordered_unique_list<forbcc::parameter>, which counts the number of parameters of each successfully insterted type.
Reimplemented from forbcc::ordered_unique_list< parameter >.
|
inlineoverridevirtual |
THIS FUNCTION DOES NOTHING, use the print_stub_definition and print_skeleton_definition methods respectively according to requirements! The function was defined only because this class is a subclass of the forbcc::entity class, which has a pure virtual print_definition method.
Implements forbcc::entity.
| void forbcc::method::print_skeleton_definition | ( | forbcc::code_ostream & | out | ) | const |
Prints the definition of the skeleton code wrapping the virtual call to the method, defined by subclasses of the generated skeleton class.
1.8.12