Version: 9.15.0
YACS::ENGINE::OutputXmlPort Class Reference

Class for XML Output Ports. More...

#include <XMLPorts.hxx>

Inheritance diagram for YACS::ENGINE::OutputXmlPort:
Collaboration diagram for YACS::ENGINE::OutputXmlPort:

Public Member Functions

 OutputXmlPort (const std::string &name, Node *node, TypeCode *type)
 
 OutputXmlPort (const OutputXmlPort &other, Node *newHelder)
 
virtual void put (const void *data)
 
void put (const char *data)
 
virtual const char * get () const
 
OutputPortclone (Node *newHelder) const
 
virtual std::string dump ()
 
virtual std::string valToStr ()
 Gives a string representation of the data, for user interfaces. More...
 
virtual void valFromStr (std::string valstr)
 Allows to set data from a string representation used in user interface. More...
 
- Public Member Functions inherited from YACS::ENGINE::OutputPort
virtual ~OutputPort ()
 
std::set< InPort * > edSetInPort () const
 
bool isAlreadyLinkedWith (InPort *withp) const
 
bool isAlreadyInSet (InputPort *inputPort) const
 
bool isConnected () const
 
std::string getNameOfTypeOfCurrentInstance () const
 
int removeInPort (InPort *inPort, bool forward)
 
virtual bool edAddInputPort (InputPort *phyPort)
 
virtual bool edAddInPropertyPort (InPropertyPort *phyPort)
 
virtual int edRemoveInputPort (InputPort *inputPort, bool forward)
 
bool addInPort (InPort *inPort)
 
void edRemoveAllLinksLinkedWithMe ()
 
virtual void exInit ()
 
virtual void checkBasicConsistency () const
 Check validity of output port. Nothing on base class. More...
 
virtual std::string typeName ()
 
- Public Member Functions inherited from YACS::ENGINE::DataFlowPort
TypeOfChannel getTypeOfChannel () const
 returns type of channel the port will use for data exchange on runtime : DATAFLOW or DATASTREAM. More...
 
virtual ~DataFlowPort ()
 
- Public Member Functions inherited from YACS::ENGINE::DataPort
TypeCodeedGetType () const
 
void edSetType (TypeCode *type)
 
std::string getName () const
 
void setName (std::string theName)
 
bool isDifferentTypeOf (const DataPort *other) const
 
virtual std::string getAsString ()
 returns port value as a string that can be used in a GUI for example More...
 
- Public Member Functions inherited from YACS::ENGINE::Port
virtual ~Port ()
 
NodegetNode () const
 
int getNumId () const
 
void modified ()
 
- Public Member Functions inherited from YACS::ENGINE::OutPort
virtual void checkConsistency (LinkInfo &info) const
 
virtual int edGetNumberOfOutLinks () const
 
virtual void getAllRepresented (std::set< OutPort * > &represented) const
 
virtual ~OutPort ()
 
std::vector< DataPort * > calculateHistoryOfLinkWith (InPort *end)
 

Protected Attributes

std::string _data
 
- Protected Attributes inherited from YACS::ENGINE::OutputPort
std::set< InputPort * > _setOfInputPort
 
- Protected Attributes inherited from YACS::ENGINE::DataPort
TypeCode_type
 
std::string _name
 
- Protected Attributes inherited from YACS::ENGINE::Port
Node_node
 
int _id
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::DataPort
static DataPortisCrossingType (const std::vector< DataPort * > &historyOfLink)
 
- Static Public Attributes inherited from YACS::ENGINE::OutputPort
static const char NAME [] ="OutputPort"
 
- Static Public Attributes inherited from YACS::ENGINE::DataFlowPort
static const char NAME [] ="DataFlowPort"
 
- Static Public Attributes inherited from YACS::ENGINE::DataPort
static const char NAME [] ="DataPort"
 
- Protected Member Functions inherited from YACS::ENGINE::OutputPort
 OutputPort (const OutputPort &other, Node *newHelder)
 
 OutputPort (const std::string &name, Node *node, TypeCode *type)
 
const std::set< InputPort * > & getSetOfPhyLinks () const
 Returns physical links linked to this. Contrary to edSetInPort that returns semantic links. More...
 
- Protected Member Functions inherited from YACS::ENGINE::DataFlowPort
 DataFlowPort (const DataFlowPort &other, Node *newHelder)
 
 DataFlowPort (const std::string &name, Node *node, TypeCode *type)
 
- Protected Member Functions inherited from YACS::ENGINE::DataPort
virtual ~DataPort ()
 
 DataPort (const DataPort &other, Node *newHelder)
 
 DataPort (const std::string &name, Node *node, TypeCode *type)
 
- Protected Member Functions inherited from YACS::ENGINE::Port
 Port (Node *node)
 
 Port (const Port &other, Node *newHelder)
 
- Protected Member Functions inherited from YACS::ENGINE::OutPort
 OutPort (const OutPort &other, Node *newHelder)
 
 OutPort (const std::string &name, Node *node, TypeCode *type)
 
- Static Protected Attributes inherited from YACS::ENGINE::Port
static int _total = 0
 
static const char NAME [] ="Port"
 

Detailed Description

Class for XML Output Ports.

See also
XmlNode

Definition at line 67 of file XMLPorts.hxx.

Constructor & Destructor Documentation

◆ OutputXmlPort() [1/2]

OutputXmlPort::OutputXmlPort ( const std::string &  name,
Node node,
TypeCode type 
)

Definition at line 122 of file XMLPorts.cxx.

123  : OutputPort(name, node, type), DataPort(name, node, type), Port(node)
124 {
125 }
DataPort(const DataPort &other, Node *newHelder)
Definition: DataPort.cxx:41
OutputPort(const OutputPort &other, Node *newHelder)
Definition: OutputPort.cxx:38
Port(Node *node)
Definition: Port.cxx:34

Referenced by clone().

◆ OutputXmlPort() [2/2]

OutputXmlPort::OutputXmlPort ( const OutputXmlPort other,
Node newHelder 
)

Definition at line 127 of file XMLPorts.cxx.

127  :OutputPort(other,newHelder),DataPort(other,newHelder),
128  Port(other,newHelder),_data(other._data)
129 {
130 }

Member Function Documentation

◆ clone()

OutputPort * OutputXmlPort::clone ( Node newHelder) const
virtual

Implements YACS::ENGINE::OutputPort.

Definition at line 150 of file XMLPorts.cxx.

151 {
152  return new OutputXmlPort(*this,newHelder);
153 }
OutputXmlPort(const std::string &name, Node *node, TypeCode *type)
Definition: XMLPorts.cxx:122

References OutputXmlPort().

◆ dump()

std::string OutputXmlPort::dump ( )
virtual

Reimplemented from YACS::ENGINE::OutputPort.

Reimplemented in YACS::ENGINE::OutputStudyPort, and YACS::ENGINE::OutputPresetPort.

Definition at line 155 of file XMLPorts.cxx.

156 {
157  return _data;
158 }

References _data.

◆ get()

const char * OutputXmlPort::get ( ) const
virtual

Definition at line 132 of file XMLPorts.cxx.

133 {
134  return _data.c_str();
135 }

References _data.

◆ put() [1/2]

void OutputXmlPort::put ( const char *  data)

Definition at line 142 of file XMLPorts.cxx.

143 {
144  DEBTRACE(data);
145  InputPort *p;
146  _data=data;
147  OutputPort::put(data);
148 }
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
Base class for Input Ports.
Definition: InputPort.hxx:44
virtual void put(const void *data)
Definition: OutputPort.cxx:66
Proc * p
Definition: driver.cxx:216

References _data, DEBTRACE, p, and YACS::ENGINE::OutputPort::put().

◆ put() [2/2]

void OutputXmlPort::put ( const void *  data)
virtual

Reimplemented from YACS::ENGINE::OutputPort.

Definition at line 137 of file XMLPorts.cxx.

138 {
139  put((const char*)data);
140 }
virtual void put(const void *data)
Definition: XMLPorts.cxx:137

Referenced by YACS::ENGINE::PresetNode::execute(), YACS::ENGINE::OutputStudyPort::getDataFromStudy(), and YACS::ENGINE::OutputStudyPort::putIOR().

◆ valFromStr()

void OutputXmlPort::valFromStr ( std::string  valstr)
virtual

Allows to set data from a string representation used in user interface.

Implemented in derived classes, depending on runtime, to set the data from its user interface representation. Typical use, a Python string representation that can be used in edition or restitution.

Reimplemented from YACS::ENGINE::DataFlowPort.

Definition at line 165 of file XMLPorts.cxx.

166 {
167  _data = valstr;
168 }

References _data.

◆ valToStr()

std::string OutputXmlPort::valToStr ( )
virtual

Gives a string representation of the data, for user interfaces.

Implemented in derived classes, depending on runtime, to provide the data representation for user interfaces. Typical use, a Python string representation that can be used in edition or restitution.

Reimplemented from YACS::ENGINE::DataFlowPort.

Definition at line 160 of file XMLPorts.cxx.

161 {
162  return _data;
163 }

References _data.

Member Data Documentation

◆ _data

std::string YACS::ENGINE::OutputXmlPort::_data
protected

Definition at line 80 of file XMLPorts.hxx.

Referenced by YACS::ENGINE::OutputStudyPort::dump(), dump(), get(), put(), valFromStr(), and valToStr().


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