|
AndroMeta
2.0.0
|
00001 /* 00002 * Copyright 2009-2012 AndroMeta LLC. All rights reserved. 00003 * 00004 * AndroMeta LLC retains all intellectual property and proprietary 00005 * rights to this software and related documentation and any modifications 00006 * thereto. Any use, reproduction, disclosure, or distribution of this 00007 * software and related documentation without an express license agreement 00008 * from AndroMeta LLC is strictly prohibited. 00009 * 00010 */ 00011 00020 #ifndef ANDROMETA_MML_ROOT_H 00021 #define ANDROMETA_MML_ROOT_H 00022 00023 #include <AndroMeta/MMLEntity.h> 00024 00025 namespace Meta{ 00026 00027 class MProcTask; 00028 00044 class MMLRoot : public MMLEntity{ 00045 public: 00046 00053 MMLRoot(MProcTask* task=0); 00054 00058 MMLRoot(const mvar& v, RestoreOpt opt, MProcTask* task=0); 00059 00063 virtual ~MMLRoot(); 00064 00068 virtual void store(mvar& v) const; 00069 00073 virtual mnode process(mnode n, uint32_t flags=0); 00074 00084 static MMLRoot* ptr(const mvar& v, bool dynamic=false); 00085 00089 void setTime(const mvar& time); 00090 00095 void setInterval(const mvar& dt); 00096 00101 void setAutoEdges(bool flag); 00102 00106 void stopRunCycle(); 00107 00115 void scheduleHalt(const mvar& time, bool before=false); 00116 00120 void scheduleHalt(); 00121 00125 virtual void exit(int status=0); 00126 00138 bool unicast(int peerId, 00139 const mvar& evt, 00140 const mvar& delay=0, 00141 bool block=false); 00142 00154 bool broadcast(const mvar& evt, 00155 const mvar& delay=0, 00156 bool block=false); 00157 00162 void barrier(); 00163 00167 mvec peers(); 00168 00173 void reclaim(); 00174 00180 static const int RunActive = 0; 00181 static const int RunHalted = 1; 00182 static const int RunEnded = 2; 00183 00187 int runTask(); 00188 00193 int runTask(const mtime& timeout); 00194 00198 MProcTask* task(); 00199 00203 virtual mvar endRun(); 00204 00205 friend class MMLRoot_; 00206 friend class MMLEntity_; 00207 00208 private: 00209 MMLRoot& operator=(const MMLRoot&); 00210 MMLRoot(const MMLRoot&); 00211 00212 class MMLRoot_* x_; 00213 }; 00214 00215 } // end namespace Meta 00216 00217 #endif // ANDROMETA_MML_ROOT_H
1.7.6.1