PCMCluster.h
Go to the documentation of this file.00001 00002 // 00003 // This source file is a part of ParCompMark 00004 // Parallel Compositing Benchmark Framework 00005 // 00006 // for latest info see http://parcompmark.sourceforge.net 00007 00008 // 00009 // Copyright (C) 2006 IT2 ParCompMark Dev. Team 00010 // 00011 // This program is free software; you can redistribute it and/or 00012 // modify it under the terms of the GNU General Public License 00013 // as published by the Free Software Foundation; either version 2 00014 // of the License, or (at your option) any later version. 00015 // 00016 // This program is distributed in the hope that it will be useful, 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 // GNU General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU General Public License 00022 // along with this program; if not, write to the Free Software 00023 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00024 00027 00028 #ifndef __PCM_CLUSTER_H__ 00029 # define __PCM_CLUSTER_H__ 00030 00031 // 00032 // Inner includes 00033 // 00034 00035 # include "PCMPremeditations.h" 00036 00037 # include "PCMSingleton.h" 00038 00039 # include "PCMLogger.h" 00040 00041 # include "PCMException.h" 00042 00043 # include "PCMHostInfo.h" 00044 00045 # include "PCMContainer.h" 00046 00047 # include "PCMPointer.h" 00048 00049 # include "PCMSingleton.h" 00050 00051 // 00052 // Outer includes 00053 // 00054 00055 # include <string> 00056 00057 namespace ParCompMark 00058 { 00059 00064 class Cluster:public Singleton < Cluster > 00065 { 00066 00067 // 00068 // Unit test class 00069 // 00070 # ifdef PARCOMPMARK_TEST 00071 friend class ParCompMarkTest::TestCluster; 00072 # endif 00073 00074 // 00075 // Variables 00076 // 00077 00079 00080 00081 protected: 00082 00088 Container < HostInfo, Mutex >::Pointer mHosts; 00089 00095 OutputNode::Pointer mClusterDescription; 00096 00098 00099 // 00100 // Constructors & destructor 00101 // 00102 00104 00105 00106 public: 00107 00111 Cluster(); 00112 00116 virtual ~ Cluster(); 00117 00119 00120 // 00121 // Getters & setters 00122 // 00123 00125 00126 00127 public: 00128 00134 Container < HostInfo, Mutex >::Pointer & getHosts(); 00135 00141 OutputNode::Pointer & getClusterDescription(); 00142 00144 00145 // 00146 // Class methods 00147 // 00148 00150 00151 00152 public: 00153 00159 static Cluster *parseXML(const std::string & strXml); 00160 00162 00163 // 00164 // Methods 00165 // 00166 00168 00169 00170 public: 00171 00175 virtual void refreshData(); 00176 00181 virtual std::string serialize2Squirrel(); 00182 00187 virtual std::string serialize2XML(); 00188 00190 00191 }; 00192 00193 // 00194 // Include header implementation 00195 // 00196 00197 # include "PCMCluster_impl.h" 00198 00199 } 00200 00201 #endif