TuttleOFX
1
|
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(); 00018 ProcessVertex( const ProcessVertexData& defaultVertexData, const std::string& name = "Undefined" ); 00019 ProcessVertex( const ProcessVertex& v ); 00020 00021 public: 00022 ProcessVertex& operator=( const ProcessVertex& v ) 00023 { 00024 IVertex::operator=(v); 00025 _data = v._data; 00026 return *this; 00027 } 00028 00029 ProcessVertex& operator=( const UVertex& v ) 00030 { 00031 IVertex::operator=(v); 00032 _data._apiType = v.getProcessNode().getNodeType(); 00033 return *this; 00034 } 00035 00036 Key getKey() const { return getName(); } 00037 00038 void clearTimeInfo() { _data.clearTimeInfo(); } 00039 00040 void setProcessData( const ProcessVertexData& d ) { _data = d; } 00041 00042 ProcessVertexData& getProcessData() { return _data; } 00043 const ProcessVertexData& getProcessData() const { return _data; } 00044 00045 std::ostream& exportDotDebug( std::ostream& os ) const; 00046 friend std::ostream& operator<<( std::ostream& os, const ProcessVertex& v ); 00047 00048 public: 00049 ProcessVertexData _data; 00050 }; 00051 00052 } 00053 } 00054 } 00055 00056 #endif 00057