TuttleOFX  1
ProcessVertex.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_HOST_PROCESSVERTEX_HPP_
00002 #define _TUTTLE_HOST_PROCESSVERTEX_HPP_
00003 
00004 #include "IVertex.hpp"
00005 #include "UVertex.hpp"
00006 #include "ProcessVertexData.hpp"
00007 
00008 namespace tuttle {
00009 namespace host {
00010 namespace graph {
00011 
00012 class ProcessVertex : public IVertex
00013 {
00014 public:
00015         typedef std::string Key;
00016 public:
00017         ProcessVertex( const std::string& name = "Undefined" );
00018         ProcessVertex( const UVertex& v );
00019         ProcessVertex( const ProcessVertex& v );
00020 
00021         ProcessVertex& operator=( const ProcessVertex& v )
00022         {
00023                 IVertex::operator=(v);
00024                 _data           = v._data;
00025                 return *this;
00026         }
00027 
00028         ProcessVertex& operator=( const UVertex& v )
00029         {
00030                 IVertex::operator=(v);
00031                 _data._apiType = v.getProcessNode().getNodeType();
00032                 return *this;
00033         }
00034 
00035         Key getKey() const { return getName(); }
00036 
00037         void clearTimeInfo() { _data.clearTimeInfo(); }
00038         
00039         void setProcessData( const ProcessVertexData& d ) { _data = d; }
00040 
00041         ProcessVertexData&       getProcessData()       { return _data; }
00042         const ProcessVertexData& getProcessData() const { return _data; }
00043         
00044         std::ostream& exportDotDebug( std::ostream& os ) const;
00045         friend std::ostream& operator<<( std::ostream& os, const ProcessVertex& v );
00046 
00047 public:
00048         ProcessVertexData _data;
00049 };
00050 
00051 }
00052 }
00053 }
00054 
00055 #endif
00056