Atoms Crowd  7.0.0
AtomsGraph::PortTemplate< T > Class Template Reference

Generic node port class. More...

#include <PortTemplate.h>

Inheritance diagram for AtomsGraph::PortTemplate< T >:
AtomsGraph::Port

Public Types

typedef T valueType
 
- Public Types inherited from AtomsGraph::Port
typedef std::vector< Port * >::iterator port_iterator
 
typedef std::vector< Port * >::const_iterator const_port_iterator
 

Public Member Functions

 PortTemplate (const std::string &name)
 Constructor.
 
 ~PortTemplate ()
 Destructor.
 
virtual std::string typeStr () const
 Gets the type string of this node.
 
virtual void copyValue (Port *other)
 Copy data from a port.
 
get () const
 Gets data.
 
const T & getRef () const
 Gets a reference of the port data.
 
T & getRef ()
 Gets a reference of the port data.
 
void set (const T &value)
 Sets the port data.
 
void setLink (T *value)
 Set this port in link mode. More...
 
virtual void reset ()
 Reset port to the default value.
 
ATOMS_EXPORT void reset ()
 Reset the port to default value.
 
ATOMS_EXPORT std::string staticTypeStr ()
 
- Public Member Functions inherited from AtomsGraph::Port
 Port (const std::string &name)
 Constructor. More...
 
virtual ~Port ()
 virtual destructor
 
std::string name () const
 Gets the port name.
 
void setNode (Node *node)
 Sets the parent node.
 
Nodenode ()
 Get the parent node.
 
bool connectTo (Port *port)
 Connect a port to another port.
 
bool disconnectFrom (Port *port)
 Breaks connection between ports.
 
const std::vector< Port * > & getConnections () const
 Gets all the connections.
 
std::vector< Port * > & getConnections ()
 
Portinput () const
 Gets the input ports.
 
size_t numConnections () const
 Gets the number of connections.
 
bool isInput () const
 Input port.
 
bool isOutput () const
 Output port.
 
port_iterator begin ()
 begin iterator to the connections vector
 
port_iterator end ()
 end iterator to the connections vector
 
const_port_iterator cbegin () const
 begin const iterator to the connections vector
 
const_port_iterator cend () const
 end const iterator to the connections vector
 

Static Public Member Functions

static std::string staticTypeStr ()
 Gets the type string of this node type.
 

Additional Inherited Members

- Protected Member Functions inherited from AtomsGraph::Port
void setAsInput (bool value)
 set the port as input
 

Detailed Description

template<class T>
class AtomsGraph::PortTemplate< T >

Generic node port class.

Member Function Documentation

◆ setLink()

template<class T >
void AtomsGraph::PortTemplate< T >::setLink ( T *  value)

Set this port in link mode.

When a port is in link mode it acts as a reference to another port


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