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

Represents the parameter of a forbcc::method, each associated with a direction between either input, output or both. More...

#include <parameter.hpp>

Public Member Functions

 parameter ()
 Empty parameter, used to preallocate variables in arrays or to use later assignment operator.
 
 parameter (const direction &dir, const variable &var)
 Constructs a parameter.
 
 ~parameter ()=default
 This class is not virtual, so it does not require a virtual destructor.
 
 parameter (parameter &&)=default
 This class supports moving.
 
parameteroperator= (parameter &&)=default
 This class supports moving.
 
 parameter (const parameter &)=default
 This class supports copying.
 
parameteroperator= (const parameter &)=default
 This class supports copying.
 
direction dir () const
 Returns the direction of the parameter.
 
const variablevar () const
 Returns a reference to the variable used to express the parameter.
 
std::string name () const
 Returns the name of the parameter.
 
void print_declaration (code_ostream &out) const
 Prints the declaration, which may change whether the parameter is IN or OUT/INOUT. More...
 

Detailed Description

Represents the parameter of a forbcc::method, each associated with a direction between either input, output or both.

Member Function Documentation

§ print_declaration()

void forbcc::parameter::print_declaration ( code_ostream out) const
inline

Prints the declaration, which may change whether the parameter is IN or OUT/INOUT.

Basically parameters which are used as output are passed by reference. NOTICE that also arrays are always passed by reference and they may be modified even if they are only input parameters, depending whether the adopted stream requires marshalling or not. Never use an array after passing it to a method declared in this way. This is because the library operates an in-place marshalling when required (usually when sending data over the network).


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