TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/graph/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         timesNeeded << "{";
00031         BOOST_FOREACH( const TimeMap::value_type& m, _timesNeeded )
00032         {
00033                 timesNeeded << m.first << ": (";
00034                 std::copy(
00035                         m.second.begin(),
00036                         m.second.end(),
00037                         std::ostream_iterator<OfxTime>(timesNeeded, "," ) );
00038                 timesNeeded << "), ";
00039         }
00040         timesNeeded << "}";
00041         s << subDotEntry( "timesNeeded", timesNeeded.str() );
00042 
00043         os << "[" << std::endl;
00044         os << dotEntry( "type", "Edge" ) << ", " << std::endl;
00045         os << dotEntry( "label", s.str() ) << std::endl;
00046         os << "]" << std::endl;
00047         return os;
00048 }
00049 
00050 }
00051 }
00052 }