Changeset 549 for XIOS/trunk/src/node/context.hpp
- Timestamp:
- 01/26/15 14:39:26 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/context.hpp
r511 r549 5 5 #include "xmlioserver_spl.hpp" 6 6 //#include "node_type.hpp" 7 #include "calendar .hpp"7 #include "calendar_wrapper.hpp" 8 8 9 9 #include "declare_group.hpp" … … 16 16 17 17 namespace xios { 18 class CContextClient 19 class CContextServer 18 class CContextClient; 19 class CContextServer; 20 20 21 21 … … 51 51 EVENT_ID_CREATE_FILE_HEADER,EVENT_ID_CONTEXT_FINALIZE, 52 52 EVENT_ID_POST_PROCESS 53 } 53 }; 54 54 55 55 /// typedef /// … … 87 87 public : 88 88 // Initialize server or client 89 void initServer(MPI_Comm intraComm, MPI_Comm interComm) 90 void initClient(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtServer=0) 91 bool isInitialized(void) 89 void initServer(MPI_Comm intraComm, MPI_Comm interComm); 90 void initClient(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtServer=0); 91 bool isInitialized(void); 92 92 93 93 // Put sever or client into loop state 94 bool eventLoop(void) ; 95 bool serverLoop(void) ; 96 void clientLoop(void) ; 97 98 // Process all information of calendar 99 void solveCalendar(void); 94 bool eventLoop(void); 95 bool serverLoop(void); 96 void clientLoop(void); 100 97 101 98 // Finalize a context 102 void finalize(void) 103 void closeDefinition(void) 99 void finalize(void); 100 void closeDefinition(void); 104 101 105 102 // Some functions to process context 106 103 void findAllEnabledFields(void); 107 void processEnabledFiles(void) 108 void solveAllInheritance(bool apply=true) 104 void processEnabledFiles(void); 105 void solveAllInheritance(bool apply=true); 109 106 void findEnabledFiles(void); 110 void closeAllFile(void) 111 void updateCalendar(int step) 112 void createFileHeader(void ) 107 void closeAllFile(void); 108 void updateCalendar(int step); 109 void createFileHeader(void ); 113 110 void solveAllRefOfEnabledFields(bool sendToServer); 114 111 void buildAllExpressionOfEnabledFields(); … … 119 116 120 117 // Send context close definition 121 void sendCloseDefinition(void) 118 void sendCloseDefinition(void); 122 119 // There are something to send on closing context defintion 123 void sendUpdateCalendar(int step) 124 void sendCreateFileHeader(void) 120 void sendUpdateCalendar(int step); 121 void sendCreateFileHeader(void); 125 122 void sendEnabledFiles(); 126 123 void sendEnabledFields(); … … 132 129 133 130 // Client side: Receive and process messages 134 static void recvUpdateCalendar(CEventServer& event) 135 void recvUpdateCalendar(CBufferIn& buffer) 136 static void recvCloseDefinition(CEventServer& event) 137 static void recvCreateFileHeader(CEventServer& event) 138 void recvCreateFileHeader(CBufferIn& buffer) 131 static void recvUpdateCalendar(CEventServer& event); 132 void recvUpdateCalendar(CBufferIn& buffer); 133 static void recvCloseDefinition(CEventServer& event); 134 static void recvCreateFileHeader(CEventServer& event); 135 void recvCreateFileHeader(CBufferIn& buffer); 139 136 static void recvSolveInheritanceContext(CEventServer& event); 140 137 void recvSolveInheritanceContext(CBufferIn& buffer); … … 143 140 144 141 // dispatch event 145 static bool dispatchEvent(CEventServer& event) 142 static bool dispatchEvent(CEventServer& event); 146 143 147 144 public: … … 191 188 192 189 // Context root 193 static shared_ptr<CContextGroup> root 190 static shared_ptr<CContextGroup> root; 194 191 195 192 // Determine context on client or not 196 bool hasClient 193 bool hasClient; 197 194 198 195 // Determine context on server or not 199 bool hasServer 196 bool hasServer; 200 197 201 198 // Concrete context server 202 CContextServer* server 199 CContextServer* server; 203 200 204 201 // Concrete contex client 205 CContextClient* client 202 CContextClient* client; 206 203 207 204 private:
Note: See TracChangeset
for help on using the changeset viewer.