TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/graph/ProcessVertexAtTimeData.cpp
Go to the documentation of this file.
00001 #include "ProcessVertexAtTimeData.hpp"
00002 #include "tuttle/host/INode.hpp"
00003 
00004 #include <boost/foreach.hpp>
00005 
00006 #include <iomanip>
00007 #include <sstream>
00008 
00009 namespace tuttle {
00010 namespace host {
00011 namespace graph {
00012 
00013 std::ostream& operator<<( std::ostream& os, const ProcessVertexAtTimeInfo& infos )
00014 {
00015         os << "nodes:" << infos._nodes << std::endl;
00016         std::ostringstream s;
00017         s << "memory:" << std::setprecision( 2 ) << infos._memory * 1e-6 << "Mo (" << infos._memory << ")" << std::endl;
00018         os << s.str();
00019         return os;
00020 }
00021 
00022 std::ostream& operator<<( std::ostream& os, const ProcessVertexAtTimeData& vData )
00023 {
00024         os << "time:" << vData._time << std::endl;
00025 
00026         os << "out degree:" << vData._outDegree << std::endl;
00027         os << "in degree:" << vData._inDegree << std::endl;
00028 
00029         os << "__________" << std::endl;
00030         os << "localInfos:" << std::endl << vData._localInfos;
00031         os << "__________" << std::endl;
00032         os << "inputsInfos:" << std::endl << vData._inputsInfos;
00033         os << "__________" << std::endl;
00034         os << "globalInfos:" << std::endl << vData._globalInfos;
00035         os << "__________" << std::endl;
00036 
00037         // imageEffect specific options
00038         switch( vData._nodeData->_apiType )
00039         {
00040                 case INode::eNodeTypeImageEffect:
00041                         os << "api: Image effect" << std::endl;
00042                         os << "field:" << vData._apiImageEffect._field << std::endl;
00043                         os << "renderRoI:" << vData._apiImageEffect._renderRoI << std::endl;
00044                         os << "renderScale:" << vData._nodeData->_renderScale << std::endl;
00045 
00046                         os << "clips:" << vData._apiImageEffect._inputsRoI.size() << std::endl;
00047                         BOOST_FOREACH( const ProcessVertexAtTimeData::ImageEffect::MapClipImageRod::value_type & item, vData._apiImageEffect._inputsRoI )
00048                         {
00049                                 if( item.first )
00050                                 {
00051                                         os << "  clip:" << item.first->getName() << std::endl;
00052                                         os << "  roi:" << item.second << std::endl;
00053                                 }
00054                         }
00055                         break;
00056                 case INode::eNodeTypeGraph:
00057                         os << "api: Graph" << std::endl;
00058                         break;
00059                 case INode::eNodeTypeParam:
00060                         os << "api: Param" << std::endl;
00061                         break;
00062                 case INode::eNodeTypeBuffer:
00063                         os << "api: Input Buffer" << std::endl;
00064                         break;
00065                 case INode::eNodeTypeUnknown:
00066                         os << "api: Unknown" << std::endl;
00067                         break;
00068         }
00069         return os;
00070 }
00071 
00072 }
00073 }
00074 }
00075