farm-ng-core
farm_ng::Output< TArg > Class Template Reference

A class that represents an Output type to be used in a Component. More...

#include <context.h>

Public Member Functions

 Output (Component const *component, std::string const &name)
 Default constructor, takes its component, and its name. More...
 
 ~Output ()
 Default destructor. More...
 
void send (TArg const &out)
 Call the actual function and send the result through the signal. More...
 
boost::signals2::signal< void(TArg)> & signal ()
 Return the signal to the output function signature. More...
 
void connect (Input< TArg > &input)
 Create a connection between the current signal and the receiving input. More...
 
Uri const & uri () const
 Returns the unique uri of the output. More...
 

Detailed Description

template<class TArg>
class farm_ng::Output< TArg >

A class that represents an Output type to be used in a Component.

Constructor & Destructor Documentation

◆ Output()

template<class TArg >
farm_ng::Output< TArg >::Output ( Component const *  component,
std::string const &  name 
)
inline

Default constructor, takes its component, and its name.

Convention: If the variable name of the output is out_foo_, then name shall be foo.

◆ ~Output()

template<class TArg >
farm_ng::Output< TArg >::~Output ( )
inline

Default destructor.

Member Function Documentation

◆ connect()

template<class TArg >
void farm_ng::Output< TArg >::connect ( Input< TArg > &  input)
inline

Create a connection between the current signal and the receiving input.

◆ send()

template<class TArg >
void farm_ng::Output< TArg >::send ( TArg const &  out)
inline

Call the actual function and send the result through the signal.

◆ signal()

template<class TArg >
boost::signals2::signal<void(TArg)>& farm_ng::Output< TArg >::signal ( )
inline

Return the signal to the output function signature.

◆ uri()

template<class TArg >
Uri const& farm_ng::Output< TArg >::uri ( ) const
inline

Returns the unique uri of the output.


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