TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/graph/ProcessVertexData.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_HOST_PROCESSVERTEXDATA_HPP_
00002 #define _TUTTLE_HOST_PROCESSVERTEXDATA_HPP_
00003 
00004 #include <tuttle/host/INode.hpp>
00005 #include <tuttle/host/memory/IMemoryCache.hpp>
00006 
00007 #include <tuttle/host/ofx/OfxhCore.hpp>
00008 
00009 #include <string>
00010 
00011 namespace tuttle {
00012 namespace host {
00013 namespace graph {
00014 
00015 class ProcessVertexData
00016 {
00017 typedef ProcessVertexData This;
00018 
00019 public:
00020         ProcessVertexData( memory::IMemoryCache* internMemoryCache, const INode::ENodeType apiType = INode::eNodeTypeUnknown )
00021                 : _internMemoryCache( internMemoryCache )
00022                 , _apiType( apiType )
00023                 , _step( 1 )
00024                 , _interactive( 0 )
00025                 , _outDegree( 0 )
00026                 , _inDegree( 0 )
00027         {
00028                 _timeDomain.min = kOfxFlagInfiniteMin;
00029                 _timeDomain.max = kOfxFlagInfiniteMax;
00030                 _renderTimeRange.min = kOfxFlagInfiniteMin;
00031                 _renderTimeRange.max = kOfxFlagInfiniteMax;
00032                 _renderScale.x = 1.0;
00033                 _renderScale.y = 1.0;
00034         }
00035 
00036         ProcessVertexData( const ProcessVertexData& other ) { operator=( other ); }
00037         ~ProcessVertexData() {}
00038         
00039         /**
00040          * Clear all time dependant datas.
00041          */
00042         void clearTimeInfo()
00043         {
00044                 _times.clear();
00045         }
00046 
00047 public:
00048         friend std::ostream& operator<<( std::ostream& os, const This& vData );
00049 
00050         // const function that give access to an external non-const object
00051         memory::IMemoryCache& getInternMemoryCache() const { return *_internMemoryCache; }
00052 
00053 public:
00054         memory::IMemoryCache* _internMemoryCache;
00055         
00056         // const GraphProcessData& _data; /// @todo tuttle: graph common datas, like renderScale
00057         OfxPointD _renderScale;
00058 
00059         INode::ENodeType _apiType;
00060         OfxRangeD _renderTimeRange;
00061         OfxRangeD _timeDomain;
00062         OfxTime _step;
00063         bool _interactive;
00064 
00065         std::size_t _outDegree; ///< number of connected input clips
00066         std::size_t _inDegree; ///< number of nodes using the output of this node
00067 
00068         ///@brief All time dependant datas.
00069         ///@{
00070         typedef std::set<OfxTime> TimesSet;
00071         TimesSet _times; ///< times needed for a specific time
00072         ///@}
00073 };
00074 
00075 }
00076 }
00077 }
00078 
00079 #endif
00080