TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/graph/IEdge.cpp
Go to the documentation of this file.
00001 #include "IEdge.hpp"
00002 #include "GraphExporter.hpp"
00003 
00004 namespace tuttle {
00005 namespace host {
00006 namespace graph {
00007 
00008 IEdge::IEdge()
00009         : _localId( 0 )
00010 {
00011 }
00012 
00013 IEdge::IEdge( const std::string& out, const std::string& in, const std::string& inAttrName )
00014         : _out( out )
00015         , _in( in )
00016         , _inAttrName( inAttrName )
00017         , _name( std::string( out ) + "." + kOfxOutputAttributeName + "-->" + in + "." + inAttrName )
00018         , _localId( 0 )
00019 {
00020 }
00021 
00022 IEdge::IEdge( const IEdge& e )
00023 {
00024         this->operator=( e );
00025         //_id = _count++;
00026 }
00027 
00028 IEdge::~IEdge()
00029 {
00030 }
00031 
00032 
00033 std::ostream& IEdge::exportDotDebug( std::ostream& os ) const
00034 {
00035         std::ostringstream s;
00036         s << subDotEntry( "label", getName() );
00037         s << subDotEntry( "id", _localId );
00038 
00039         os << "[" << std::endl;
00040         os << dotEntry( "type", "Edge" ) << ", " << std::endl;
00041         os << dotEntry( "label", s.str() ) << std::endl;
00042         os << "]" << std::endl;
00043         return os;
00044 }
00045 
00046 std::ostream& operator<<( std::ostream& os, const IEdge& v )
00047 {
00048         os << v.getName() ;
00049         return os;
00050 }
00051 
00052 }
00053 }
00054 }