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