Atoms Crowd  4.1.0
AtomsGraph::Port Class Reference

BasePort class. More...

#include <Port.h>

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

Public Types

typedef std::vector< Port * >::iterator port_iterator
 
typedef std::vector< Port * >::const_iterator const_port_iterator
 

Public Member Functions

virtual std::string typeStr () const
 Class type string. More...
 
 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
 
virtual void copyValue (Port *other)
 Copy the data from another port.
 
virtual void reset ()
 Reset the port to default value.
 

Protected Member Functions

void setAsInput (bool value)
 set the port as input
 

Friends

class Node
 friend class
 

Detailed Description

BasePort class.

Constructor & Destructor Documentation

◆ Port()

AtomsGraph::Port::Port ( const std::string &  name)
explicit

Constructor.

Parameters
nameport name

Member Function Documentation

◆ typeStr()

virtual std::string AtomsGraph::Port::typeStr ( ) const
virtual

Class type string.

Returns the port type name

Returns
class type

Reimplemented in AtomsGraph::PortTemplate< T >.


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