TuttleOFX
1
|
00001 #include "ProcessEdgeAtTime.hpp" 00002 #include "GraphExporter.hpp" 00003 00004 namespace tuttle { 00005 namespace host { 00006 namespace graph { 00007 00008 ProcessEdgeAtTime::ProcessEdgeAtTime() 00009 : _inTime( 0.0 ) 00010 , _outTime( 0.0 ) 00011 { 00012 } 00013 00014 ProcessEdgeAtTime::ProcessEdgeAtTime( const ProcessVertexAtTime::Key& out, const ProcessVertexAtTime::Key& in, const std::string& inAttrName ) 00015 : IEdge( out.getName(), in.getName(), inAttrName ) 00016 , _inTime( in.getTime() ) 00017 , _outTime( out.getTime() ) 00018 { 00019 } 00020 00021 ProcessEdgeAtTime::ProcessEdgeAtTime( const ProcessEdge& e ) 00022 : IEdge( e ) 00023 , _inTime( 0.0 ) 00024 , _outTime( 0.0 ) 00025 { 00026 } 00027 00028 ProcessEdgeAtTime::ProcessEdgeAtTime( const ProcessEdgeAtTime& other ) 00029 : IEdge( other ) 00030 , _inTime( other._inTime ) 00031 , _outTime( other._outTime ) 00032 { 00033 } 00034 00035 ProcessEdgeAtTime::~ProcessEdgeAtTime() 00036 { 00037 } 00038 00039 std::ostream& ProcessEdgeAtTime::exportDotDebug( std::ostream& os ) const 00040 { 00041 std::ostringstream s; 00042 s << subDotEntry( "label", getName() ); 00043 s << subDotEntry( "id", _localId ); 00044 00045 00046 std::ostringstream times; 00047 times << "(in:" << _inTime << ", out:" << _outTime << ")"; 00048 s << subDotEntry( "times", times.str() ); 00049 00050 os << "[" << std::endl; 00051 os << dotEntry( "type", "Edge" ) << ", " << std::endl; 00052 os << dotEntry( "label", s.str() ) << std::endl; 00053 os << "]" << std::endl; 00054 return os; 00055 } 00056 00057 00058 } 00059 } 00060 }