forb
Public Member Functions | List of all members
forbcc::interface Class Reference

Defines an interface, which will be converted to stub and skeleton pairs upon generation. More...

#include <interface.hpp>

Inheritance diagram for forbcc::interface:
forbcc::entity forbcc::shareable< interface > forbcc::ordered_unique_list< method >

Public Member Functions

 interface ()
 Empty interface, used to preallocate variables in arrays or to use later assignment operator.
 
 interface (const std::shared_ptr< module > &parent, const std::string &name)
 Using constructors from superclass.
 
 ~interface () override=default
 This class is virtual, so it requires a virtual destructor.
 
 interface (interface &&)=default
 This class supports moving.
 
interfaceoperator= (interface &&)=default
 This class supports moving.
 
 interface (const interface &)=default
 This class supports copying.
 
interfaceoperator= (const interface &)=default
 This class supports copying.
 
void print_declaration (code_ostream &out) const override
 Prints both stub and skeletons declarations.
 
void print_definition (code_ostream &out) const override
 Prints both stub and skeletons definitions, among other utilities.
 
- 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.
 
entityoperator= (entity &&)=default
 This class supports moving.
 
 entity (const entity &)=default
 This class supports copying.
 
entityoperator= (const entity &)=default
 This class supports copying.
 
std::shared_ptr< entityparent () 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< method >
virtual bool insert (std::string key, const method &value)
 Inserts a new value within the list if the corrisponding key is not present. More...
 
const list_tlist () 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.
 
methodoperator[] (std::string key)
 Returns a reference to an element from its key. More...
 
const_Toperator[] (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::shareable< interface >
using const_T = typename std::add_const< interface >::type
 Alias to the same type T, but with const qualifier.
 
using ptr_t = std::shared_ptr< interface >
 Alias to std::shared_ptr<T>
 
using ptr_const_t = std::shared_ptr< const_T >
 Alias to std::shared_ptr<const T>
 
- Public Types inherited from forbcc::ordered_unique_list< method >
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< method >
 The type of the list.
 
using const_T = typename std::add_const< method >::type
 Alias of the const version of the template type T.
 
- Static Public Member Functions inherited from forbcc::shareable< interface >
static ptr_t new_ptr (Args &&... args)
 Calls the constructor of the class with the given arguments to create a shared_pointer to T. More...
 
static ptr_const_t new_ptr_const (Args &&... args)
 Calls the constructor of the class with the given arguments to create a shared_pointer to a const T. More...
 

Detailed Description

Defines an interface, which will be converted to stub and skeleton pairs upon generation.


The documentation for this class was generated from the following files: