7 #include "fwData/registry/macros.hpp" 8 #include "fwData/Exception.hpp" 9 #include "fwData/Edge.hpp" 16 std::string Edge::NATURE_FLOW =
"flow";
17 std::string Edge::NATURE_DATA =
"data";
22 m_fromPortIdentifier(
"not defined"),
23 m_toPortIdentifier(
"not defined"),
24 m_nature(
"not defined")
40 m_fromPortIdentifier = fromPortIndentifier;
41 m_toPortIdentifier = toPortIndentifier;
48 return make_pair(m_fromPortIdentifier, m_toPortIdentifier);
55 return m_fromPortIdentifier;
62 return m_toPortIdentifier;
70 return upStream ? m_fromPortIdentifier : m_toPortIdentifier;
90 Edge::csptr other = Edge::dynamicConstCast(_source);
92 "Unable to copy" + (_source ? _source->getClassname() : std::string(
"<NULL>"))
96 m_fromPortIdentifier = other->m_fromPortIdentifier;
97 m_toPortIdentifier = other->m_toPortIdentifier;
98 m_nature = other->m_nature;
105 Edge::csptr other = Edge::dynamicConstCast(_source);
107 "Unable to copy" + (_source ? _source->getClassname() : std::string(
"<NULL>"))
110 m_fromPortIdentifier = other->m_fromPortIdentifier;
111 m_toPortIdentifier = other->m_toPortIdentifier;
112 m_nature = other->m_nature;
#define SLM_TRACE_FUNC()
Trace contextual function signature.
FWDATA_API Edge(::fwData::Object::Key key)
Constructor.
FWDATA_API std::string getFromPortID() const
return "from" identifier
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Implements data exception class.
FWDATA_API const std::string & getNature() const
Get edge nature ("FLOW" , "FWDATA")
FWDATA_API void setNature(std::string nature)
Set edge nature ("FLOW" , "FWDATA")
virtual FWDATA_API ~Edge()
Destructor.
FWDATA_API void cachedDeepCopy(const Object::csptr &_source, DeepCopyCacheType &cache) override
do a deep copy of edge
FWDATA_API void fieldDeepCopy(const ::fwData::Object::csptr &source)
A deep copy of fields (objects in m_children)
FWDATA_API std::string getToPortID() const
return "to" identifier
FWDATA_API std::pair< std::string, std::string > getIdentifiers() const
Get the edge identifier.
FWDATA_API std::string getPortID(bool upStream) const
return "to or from" identifier according to upStream
FWDATA_API void shallowCopy(const Object::csptr &_source) override
do a shallow copy of edge
virtual const std::string & getClassname() const override
return full object's classname with its namespace, i.e. fwCore::BaseObject
Contains the representation of the data objects used in the framework.
FWDATA_API void fieldShallowCopy(const ::fwData::Object::csptr &source)
A shallow copy of fields (objects in m_children)
FWDATA_API void setIdentifiers(const std::string &_fromPortIndentifier, const std::string &_toPortIndentifier)
Set the edge identifier ("ID_SIZEX" , ...)
This class defines an edge object.