TuttleOFX  1
ProcessEdge.cpp
Go to the documentation of this file.
00001 #include "ProcessEdge.hpp"
00002 #include "GraphExporter.hpp"
00003 
00004 namespace tuttle {
00005 namespace host {
00006 namespace graph {
00007 
00008 ProcessEdge::ProcessEdge()
00009 {}
00010 
00011 ProcessEdge::ProcessEdge( const ProcessVertex::Key& out, const ProcessVertex::Key& in, const std::string& inAttrName )
00012 : IEdge( out, in, inAttrName )
00013 {
00014 }
00015 
00016 ProcessEdge::ProcessEdge( const ProcessEdge& e )
00017 : IEdge( e )
00018 {}
00019 
00020 ProcessEdge::~ProcessEdge()
00021 {}
00022 
00023 
00024 std::ostream& ProcessEdge::exportDotDebug( std::ostream& os ) const
00025 {
00026         std::ostringstream s;
00027         s << subDotEntry( "label", getName() );
00028         s << subDotEntry( "id", _localId );
00029         std::ostringstream timesNeeded;
00030         BOOST_FOREACH( const TimeMap::value_type& m, _timesNeeded )
00031         {
00032                 timesNeeded << "(" << m.first << ":";
00033                 std::copy(
00034                         m.second.begin(),
00035                         m.second.end(),
00036                         std::ostream_iterator<OfxTime>(timesNeeded, "," ) );
00037                 timesNeeded << ")";
00038         }
00039         s << subDotEntry( "timesNeeded", timesNeeded.str() );
00040 
00041         os << "[" << std::endl;
00042         os << dotEntry( "type", "Edge" ) << ", " << std::endl;
00043         os << dotEntry( "label", s.str() ) << std::endl;
00044         os << "]" << std::endl;
00045         return os;
00046 }
00047 
00048 }
00049 }
00050 }