[591] | 1 | #ifndef __XIOS_CGrid__ |
---|
| 2 | #define __XIOS_CGrid__ |
---|
[219] | 3 | |
---|
[591] | 4 | /// XIOS headers /// |
---|
| 5 | #include "xios_spl.hpp" |
---|
[219] | 6 | #include "group_factory.hpp" |
---|
| 7 | |
---|
| 8 | #include "declare_group.hpp" |
---|
| 9 | #include "domain.hpp" |
---|
| 10 | #include "axis.hpp" |
---|
[887] | 11 | #include "scalar.hpp" |
---|
[369] | 12 | #include "array_new.hpp" |
---|
| 13 | #include "attribute_array.hpp" |
---|
[552] | 14 | #include "distribution_server.hpp" |
---|
[553] | 15 | #include "client_server_mapping.hpp" |
---|
[567] | 16 | #include "utils.hpp" |
---|
[619] | 17 | #include "transformation_enum.hpp" |
---|
[1918] | 18 | #include "grid_local_connector.hpp" |
---|
| 19 | #include "grid_elements.hpp" |
---|
[1930] | 20 | #include "grid_scatterer_connector.hpp" |
---|
| 21 | #include "grid_gatherer_connector.hpp" |
---|
[1984] | 22 | #include "transformation_path.hpp" |
---|
| 23 | #include "filter.hpp" |
---|
[219] | 24 | |
---|
[1930] | 25 | |
---|
[335] | 26 | namespace xios { |
---|
[509] | 27 | |
---|
[1564] | 28 | /// ////////////////////// Declarations ////////////////////// /// |
---|
[219] | 29 | |
---|
| 30 | class CGridGroup; |
---|
| 31 | class CGridAttributes; |
---|
[540] | 32 | class CDomainGroup; |
---|
| 33 | class CAxisGroup; |
---|
[887] | 34 | class CScalarGroup; |
---|
[219] | 35 | class CGrid; |
---|
[551] | 36 | class CDistributionClient; |
---|
[552] | 37 | class CDistributionServer; |
---|
[553] | 38 | class CServerDistributionDescription; |
---|
| 39 | class CClientServerMapping; |
---|
[620] | 40 | class CGridTransformation; |
---|
[219] | 41 | |
---|
| 42 | ///-------------------------------------------------------------- |
---|
| 43 | |
---|
| 44 | // Declare/Define CGridAttribute |
---|
| 45 | BEGIN_DECLARE_ATTRIBUTE_MAP(CGrid) |
---|
| 46 | # include "grid_attribute.conf" |
---|
| 47 | END_DECLARE_ATTRIBUTE_MAP(CGrid) |
---|
| 48 | |
---|
| 49 | ///-------------------------------------------------------------- |
---|
| 50 | |
---|
| 51 | class CGrid |
---|
| 52 | : public CObjectTemplate<CGrid> |
---|
| 53 | , public CGridAttributes |
---|
| 54 | { |
---|
| 55 | /// typedef /// |
---|
| 56 | typedef CObjectTemplate<CGrid> SuperClass; |
---|
| 57 | typedef CGridAttributes SuperClassAttribute; |
---|
| 58 | |
---|
[1930] | 59 | private: |
---|
| 60 | |
---|
| 61 | // define a structure to store elements (CDomain, CAxis, CScalar) using a void* and a type to cast the pointer |
---|
| 62 | enum EElementType { TYPE_SCALAR, TYPE_AXIS, TYPE_DOMAIN } ; |
---|
| 63 | struct SElement {void* ptr ; EElementType type ; CScalar* scalar ; CAxis* axis ; CDomain* domain ; } ; |
---|
| 64 | vector<SElement> elements_ ; |
---|
| 65 | bool elementsComputed_ = false ; |
---|
| 66 | /** retrieve the vector of elements as a structure containing a void* and the type of pointer */ |
---|
| 67 | vector<SElement>& getElements(void) { if (!elementsComputed_) computeElements() ; return elements_ ; } |
---|
| 68 | void computeElements(void) ; |
---|
| 69 | /** List order of axis and domain in a grid, if there is a domain, it will take value 2, axis 1, scalar 0 */ |
---|
| 70 | std::vector<int> order_; |
---|
| 71 | |
---|
[676] | 72 | public: |
---|
[219] | 73 | |
---|
| 74 | typedef CGridAttributes RelAttributes; |
---|
| 75 | typedef CGridGroup RelGroup; |
---|
| 76 | |
---|
[300] | 77 | enum EEventId |
---|
| 78 | { |
---|
[1973] | 79 | EVENT_ID_ADD_DOMAIN, EVENT_ID_ADD_AXIS, EVENT_ID_ADD_SCALAR, |
---|
[1943] | 80 | EVENT_ID_SEND_MASK, |
---|
| 81 | |
---|
[650] | 82 | }; |
---|
[509] | 83 | |
---|
[219] | 84 | /// Constructeurs /// |
---|
| 85 | CGrid(void); |
---|
[650] | 86 | explicit CGrid(const StdString& id); |
---|
| 87 | CGrid(const CGrid& grid); // Not implemented yet. |
---|
| 88 | CGrid(const CGrid* const grid); // Not implemented yet. |
---|
[219] | 89 | |
---|
| 90 | /// Traitements /// |
---|
[509] | 91 | // void solveReference(void); |
---|
[219] | 92 | |
---|
[676] | 93 | void checkEligibilityForCompressedOutput(); |
---|
[1930] | 94 | |
---|
[676] | 95 | |
---|
[509] | 96 | |
---|
| 97 | void checkMaskIndex(bool doCalculateIndex); |
---|
| 98 | |
---|
[650] | 99 | // virtual void toBinary (StdOStream& os) const; |
---|
| 100 | // virtual void fromBinary(StdIStream& is); |
---|
[219] | 101 | |
---|
[676] | 102 | void addRelFileCompressed(const StdString& filename); |
---|
| 103 | |
---|
[219] | 104 | /// Tests /// |
---|
[676] | 105 | bool isCompressible(void) const; |
---|
| 106 | bool isWrittenCompressed(const StdString& filename) const; |
---|
[219] | 107 | |
---|
[676] | 108 | public: |
---|
[219] | 109 | |
---|
| 110 | /// Accesseurs /// |
---|
[1158] | 111 | StdSize getDimension(void); |
---|
[509] | 112 | |
---|
[1869] | 113 | StdSize getDataSize(void) ; |
---|
[219] | 114 | |
---|
[1875] | 115 | /** |
---|
| 116 | * Get the local data grid size, ie the size of the compressed grid (inside the workflow) |
---|
| 117 | * \return The size od the compressed grid |
---|
| 118 | */ |
---|
| 119 | StdSize getLocalDataSize(void) ; |
---|
| 120 | |
---|
[1973] | 121 | |
---|
[650] | 122 | virtual void parse(xml::CXMLNode& node); |
---|
[540] | 123 | |
---|
[219] | 124 | /// Destructeur /// |
---|
| 125 | virtual ~CGrid(void); |
---|
| 126 | |
---|
[676] | 127 | public: |
---|
[219] | 128 | |
---|
| 129 | /// Accesseurs statiques /// |
---|
| 130 | static StdString GetName(void); |
---|
| 131 | static StdString GetDefName(void); |
---|
[509] | 132 | |
---|
[219] | 133 | static ENodeType GetType(void); |
---|
| 134 | |
---|
| 135 | /// Instanciateurs Statiques /// |
---|
[347] | 136 | static CGrid* createGrid(CDomain* domain); |
---|
| 137 | static CGrid* createGrid(CDomain* domain, CAxis* axis); |
---|
[745] | 138 | static CGrid* createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, |
---|
[887] | 139 | const CArray<int,1>& axisDomainOrder = CArray<int,1>()); |
---|
[745] | 140 | static CGrid* createGrid(StdString id, const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, |
---|
[887] | 141 | const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder = CArray<int,1>()); |
---|
| 142 | static CGrid* createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, |
---|
| 143 | const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder); |
---|
[745] | 144 | static StdString generateId(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, |
---|
[887] | 145 | const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder = CArray<int,1>()); |
---|
[823] | 146 | static StdString generateId(const CGrid* gridSrc, const CGrid* gridDest); |
---|
| 147 | static CGrid* cloneGrid(const StdString& idNewGrid, CGrid* gridSrc); |
---|
[219] | 148 | |
---|
[1144] | 149 | public: |
---|
[219] | 150 | void computeIndex(void); |
---|
[586] | 151 | void computeIndexScalarGrid(); |
---|
[1869] | 152 | void solveDomainAxisRef(bool areAttributesChecked); |
---|
| 153 | void checkElementsAttributes(void) ; |
---|
[219] | 154 | |
---|
[509] | 155 | void solveDomainRef(bool checkAtt); |
---|
| 156 | void solveAxisRef(bool checkAtt); |
---|
[887] | 157 | void solveScalarRef(bool checkAtt); |
---|
[1869] | 158 | void solveElementsRefInheritance(bool apply = true); |
---|
| 159 | // void solveTransformations(); |
---|
[775] | 160 | void solveDomainAxisBaseRef(); |
---|
[509] | 161 | |
---|
[835] | 162 | CDomain* addDomain(const std::string& id=StdString()); |
---|
| 163 | CAxis* addAxis(const std::string& id=StdString()); |
---|
[887] | 164 | CScalar* addScalar(const std::string& id=StdString()); |
---|
[1870] | 165 | |
---|
| 166 | public: |
---|
| 167 | void sendGridToFileServer(CContextClient* client) ; |
---|
| 168 | private: |
---|
| 169 | std::set<CContextClient*> sendGridToFileServer_done_ ; |
---|
[1875] | 170 | |
---|
[1870] | 171 | public: |
---|
[1875] | 172 | void sendGridToCouplerOut(CContextClient* client, const string& fieldId) ; |
---|
| 173 | private: |
---|
| 174 | std::set<CContextClient*> sendGridToCouplerOut_done_ ; |
---|
| 175 | |
---|
| 176 | public: |
---|
| 177 | void makeAliasForCoupling(const string& fieldId) ; |
---|
| 178 | |
---|
| 179 | public: |
---|
[1784] | 180 | void sendAddDomain(const std::string& id,CContextClient* contextClient); |
---|
| 181 | void sendAddAxis(const std::string& id,CContextClient* contextClient); |
---|
| 182 | void sendAddScalar(const std::string& id,CContextClient* contextClient); |
---|
[1974] | 183 | |
---|
[650] | 184 | static void recvAddDomain(CEventServer& event); |
---|
| 185 | void recvAddDomain(CBufferIn& buffer); |
---|
| 186 | static void recvAddAxis(CEventServer& event); |
---|
| 187 | void recvAddAxis(CBufferIn& buffer); |
---|
[887] | 188 | static void recvAddScalar(CEventServer& event); |
---|
| 189 | void recvAddScalar(CBufferIn& buffer); |
---|
[540] | 190 | |
---|
[650] | 191 | static bool dispatchEvent(CEventServer& event); |
---|
[1875] | 192 | |
---|
| 193 | public: |
---|
[1294] | 194 | void setContextClient(CContextClient* contextClient); |
---|
| 195 | |
---|
[1330] | 196 | std::map<int, StdSize> getAttributesBufferSize(CContextClient* client, bool bufferForWriting = false); |
---|
| 197 | std::map<int, StdSize> getDataBufferSize(CContextClient* client, const std::string& id = "", bool bufferForWriting = false); |
---|
[540] | 198 | std::vector<StdString> getDomainList(); |
---|
| 199 | std::vector<StdString> getAxisList(); |
---|
[887] | 200 | std::vector<StdString> getScalarList(); |
---|
[540] | 201 | std::vector<CDomain*> getDomains(); |
---|
| 202 | std::vector<CAxis*> getAxis(); |
---|
[887] | 203 | std::vector<CScalar*> getScalars(); |
---|
[943] | 204 | CDomain* getDomain(int domainIndex); |
---|
| 205 | CAxis* getAxis(int axisIndex); |
---|
| 206 | CScalar* getScalar(int scalarIndex); |
---|
[551] | 207 | std::vector<int> getAxisOrder(); |
---|
[567] | 208 | std::vector<int> getGlobalDimension(); |
---|
[1236] | 209 | bool isScalarGrid() const; |
---|
[540] | 210 | |
---|
[567] | 211 | bool doGridHaveDataToWrite(); |
---|
[1235] | 212 | bool doGridHaveDataDistributed(CContextClient* client = 0); |
---|
[567] | 213 | |
---|
[1984] | 214 | /////////////////////////////////////////// |
---|
| 215 | //////// TRANSFORMATIONS ///// |
---|
| 216 | /////////////////////////////////////////// |
---|
| 217 | public: |
---|
[620] | 218 | CGridTransformation* getTransformations(); |
---|
[567] | 219 | |
---|
[632] | 220 | void transformGrid(CGrid* transformGridSrc); |
---|
[1869] | 221 | |
---|
| 222 | void prepareTransformGrid(CGrid* transformGridSrc); |
---|
| 223 | bool prepareTransformGrid_done_ = false ; |
---|
| 224 | |
---|
| 225 | void makeTransformGrid(void); |
---|
| 226 | bool makeTransformGrid_done_ = false ; |
---|
| 227 | |
---|
| 228 | std::vector<std::string> getAuxInputTransformGrid(void) ; |
---|
[1984] | 229 | std::map<CGrid*, std::pair<bool,StdString> >& getTransGridSource(); |
---|
| 230 | bool hasTransform(); |
---|
| 231 | void addTransGridSource(CGrid* gridSrc); |
---|
[775] | 232 | void completeGrid(CGrid* transformGridSrc = 0); |
---|
[619] | 233 | bool isTransformed(); |
---|
| 234 | void setTransformed(); |
---|
[890] | 235 | bool isGenerated(); |
---|
| 236 | void setGenerated(); |
---|
[1984] | 237 | void setTransformationAlgorithms(); |
---|
| 238 | pair<shared_ptr<CFilter>, shared_ptr<CFilter> > buildTransformationGraph(CGarbageCollector& gc, CGrid* gridSrc, double detectMissingValues, |
---|
| 239 | double defaultValue, CGrid*& newGrid) ; |
---|
| 240 | private: |
---|
| 241 | bool isTransformed_, isGenerated_; |
---|
| 242 | CGridTransformation* transformations_; |
---|
| 243 | bool hasTransform_; |
---|
| 244 | |
---|
| 245 | /////////////////////////////////////////// |
---|
| 246 | public: |
---|
| 247 | |
---|
| 248 | size_t getGlobalWrittenSize(void) ; |
---|
[1875] | 249 | |
---|
| 250 | bool isCompleted(void) ; |
---|
| 251 | void setCompleted(void) ; |
---|
| 252 | void unsetCompleted(void) ; |
---|
[509] | 253 | |
---|
[1869] | 254 | |
---|
[1637] | 255 | bool hasMask(void) const; |
---|
[1918] | 256 | /** get mask pointer stored in mask_1d, or mask_2d, or..., or mask_7d */ |
---|
| 257 | CArray<bool,1> mask_ ; |
---|
| 258 | CArray<bool,1>& getMask(void) ; |
---|
[509] | 259 | |
---|
[1973] | 260 | private: |
---|
[1870] | 261 | /** Client-like distribution calculated based on the knowledge of the entire grid */ |
---|
| 262 | CDistributionClient* clientDistribution_; |
---|
| 263 | public: |
---|
[1869] | 264 | void computeClientDistribution(void) ; |
---|
[1870] | 265 | private: |
---|
[1869] | 266 | bool computeClientDistribution_done_ = false ; |
---|
[1870] | 267 | public: |
---|
| 268 | CDistributionClient* getClientDistribution(void); |
---|
[1869] | 269 | |
---|
[1871] | 270 | private: |
---|
[540] | 271 | void setVirtualDomainGroup(CDomainGroup* newVDomainGroup); |
---|
| 272 | void setVirtualAxisGroup(CAxisGroup* newVAxisGroup); |
---|
[887] | 273 | void setVirtualScalarGroup(CScalarGroup* newVScalarGroup); |
---|
[567] | 274 | |
---|
[887] | 275 | void setDomainList(const std::vector<CDomain*> domains = std::vector<CDomain*>()); |
---|
[540] | 276 | void setAxisList(const std::vector<CAxis*> axis = std::vector<CAxis*>()); |
---|
[887] | 277 | void setScalarList(const std::vector<CScalar*> scalars = std::vector<CScalar*>()); |
---|
[540] | 278 | |
---|
[887] | 279 | CDomainGroup* getVirtualDomainGroup() const; |
---|
[540] | 280 | CAxisGroup* getVirtualAxisGroup() const; |
---|
[887] | 281 | CScalarGroup* getVirtualScalarGroup() const; |
---|
[619] | 282 | |
---|
[1158] | 283 | int computeGridGlobalDimension(std::vector<int>& globalDim, |
---|
| 284 | const std::vector<CDomain*> domains, |
---|
| 285 | const std::vector<CAxis*> axis, |
---|
| 286 | const std::vector<CScalar*> scalars, |
---|
| 287 | const CArray<int,1>& axisDomainOrder); |
---|
| 288 | int getDistributedDimension(); |
---|
[1794] | 289 | public: |
---|
| 290 | |
---|
[1870] | 291 | bool isDataDistributed(void) ; |
---|
[540] | 292 | private: |
---|
[1236] | 293 | |
---|
[1294] | 294 | /** Clients that have to send a grid. There can be multiple clients in case of secondary server, otherwise only one client. */ |
---|
[1353] | 295 | std::list<CContextClient*> clients; |
---|
| 296 | std::set<CContextClient*> clientsSet; |
---|
[1294] | 297 | |
---|
[1870] | 298 | private: |
---|
[1294] | 299 | bool isChecked; |
---|
| 300 | bool isDomainAxisChecked; |
---|
| 301 | bool isIndexSent; |
---|
| 302 | |
---|
[540] | 303 | CDomainGroup* vDomainGroup_; |
---|
| 304 | CAxisGroup* vAxisGroup_; |
---|
[887] | 305 | CScalarGroup* vScalarGroup_; |
---|
| 306 | std::vector<std::string> axisList_, domList_, scalarList_; |
---|
| 307 | bool isAxisListSet, isDomListSet, isScalarListSet; |
---|
[567] | 308 | |
---|
[1330] | 309 | /** Map storing local ranks of connected receivers. Key = size of receiver's intracomm. |
---|
| 310 | * It is calculated in computeConnectedClients(). */ |
---|
[1263] | 311 | std::map<int, std::vector<int> > connectedServerRank_; |
---|
[1243] | 312 | |
---|
[1330] | 313 | /** Map storing the size of data to be send. Key = size of receiver's intracomm |
---|
| 314 | * It is calculated in computeConnectedClients(). */ |
---|
[1263] | 315 | std::map<int, std::map<int,size_t> > connectedDataSize_; |
---|
[1243] | 316 | |
---|
[1330] | 317 | /** Ranks of connected receivers in case of reading. It is calculated in recvIndex(). */ |
---|
| 318 | std::vector<int> connectedServerRankRead_; |
---|
| 319 | |
---|
| 320 | /** Size of data to be send in case of reading. It is calculated in recvIndex(). */ |
---|
| 321 | std::map<int,size_t> connectedDataSizeRead_; |
---|
[1870] | 322 | |
---|
[676] | 323 | //! True if and only if the data defined on the grid can be outputted in a compressed way |
---|
| 324 | bool isCompressible_; |
---|
| 325 | std::set<std::string> relFilesCompressed; |
---|
[619] | 326 | |
---|
[1870] | 327 | |
---|
[620] | 328 | std::vector<int> axisPositionInGrid_; |
---|
[1870] | 329 | void computeAxisPositionInGrid(void) ; |
---|
| 330 | bool computeAxisPositionInGrid_done_ = false ; |
---|
| 331 | std::vector<int>& getAxisPositionInGrid(void) { if (!computeAxisPositionInGrid_done_) computeAxisPositionInGrid() ; return axisPositionInGrid_ ;} |
---|
| 332 | |
---|
[1158] | 333 | bool hasDomainAxisBaseRef_; |
---|
[823] | 334 | std::map<CGrid*, std::pair<bool,StdString> > gridSrc_; |
---|
[1243] | 335 | |
---|
[1930] | 336 | ////////////////////////////////////////////////////////////////////////////////////// |
---|
| 337 | // this part is related to distribution, element definition, views and connectors // |
---|
| 338 | ////////////////////////////////////////////////////////////////////////////////////// |
---|
[1984] | 339 | public: |
---|
| 340 | CGrid* duplicateSentGrid(void) ; |
---|
[1943] | 341 | private: |
---|
| 342 | static void recvMask(CEventServer& event) ; |
---|
| 343 | void receiveMask(CEventServer& event) ; |
---|
[1243] | 344 | |
---|
[1918] | 345 | private: |
---|
| 346 | CGridLocalElements* gridLocalElements_= nullptr ; |
---|
| 347 | void computeGridLocalElements(void) ; |
---|
| 348 | public: |
---|
| 349 | CGridLocalElements* getGridLocalElements(void) { if (gridLocalElements_==nullptr) computeGridLocalElements() ; return gridLocalElements_ ;} |
---|
| 350 | |
---|
| 351 | private: |
---|
[1984] | 352 | CGridLocalConnector* modelToWorkflowConnector_ = nullptr ; |
---|
[1918] | 353 | public: |
---|
| 354 | void computeModelToWorkflowConnector(void) ; |
---|
| 355 | CGridLocalConnector* getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_;} |
---|
| 356 | |
---|
[1930] | 357 | private: |
---|
| 358 | CGridLocalConnector* workflowToModelConnector_ ; |
---|
| 359 | public: |
---|
| 360 | void computeWorkflowToModelConnector(void) ; |
---|
| 361 | CGridLocalConnector* getWorkflowToModelConnector(void) { if (workflowToModelConnector_==nullptr) computeWorkflowToModelConnector() ; return workflowToModelConnector_;} |
---|
| 362 | |
---|
| 363 | public: //? |
---|
| 364 | void distributeGridToFileServer(CContextClient* client); |
---|
| 365 | |
---|
[1934] | 366 | |
---|
[1930] | 367 | private: |
---|
| 368 | CGridLocalConnector* workflowToFullConnector_ = nullptr; |
---|
| 369 | public: |
---|
| 370 | void computeWorkflowToFullConnector(void) ; |
---|
| 371 | CGridLocalConnector* getWorkflowToFullConnector(void) { if (workflowToFullConnector_==nullptr) computeWorkflowToFullConnector() ; return workflowToFullConnector_;} |
---|
| 372 | |
---|
| 373 | private: |
---|
| 374 | CGridLocalConnector* fullToWorkflowConnector_ = nullptr; |
---|
| 375 | public: |
---|
| 376 | void computeFullToWorkflowConnector(void) ; |
---|
| 377 | CGridLocalConnector* getFullToWorkflowConnector(void) { if (fullToWorkflowConnector_==nullptr) computeFullToWorkflowConnector() ; return fullToWorkflowConnector_;} |
---|
| 378 | |
---|
[1934] | 379 | |
---|
| 380 | |
---|
[1930] | 381 | private: |
---|
| 382 | CGridGathererConnector* clientFromClientConnector_ = nullptr ; |
---|
| 383 | public: |
---|
| 384 | CGridGathererConnector* getClientFromClientConnector(void) { if (clientFromClientConnector_==nullptr) computeClientFromClientConnector() ; return clientFromClientConnector_;} |
---|
| 385 | void computeClientFromClientConnector(void) ; |
---|
| 386 | |
---|
| 387 | private: |
---|
| 388 | map<CContextClient*, CGridScattererConnector*> clientToClientConnector_ ; |
---|
| 389 | public: |
---|
| 390 | CGridScattererConnector* getClientToClientConnector(CContextClient* client) { return clientToClientConnector_[client] ;} // make some test to see if connector exits for the given client |
---|
| 391 | |
---|
| 392 | |
---|
| 393 | private: |
---|
[1934] | 394 | map<CContextClient*,CGridGathererConnector*> clientFromServerConnector_ ; |
---|
[1930] | 395 | public: |
---|
[1934] | 396 | CGridGathererConnector* getClientFromServerConnector(CContextClient* client) { return clientFromServerConnector_[client];} |
---|
[1930] | 397 | void computeClientFromServerConnector(void) ; |
---|
| 398 | |
---|
[1934] | 399 | private: |
---|
| 400 | CGridScattererConnector* serverToClientConnector_=nullptr ; |
---|
| 401 | public: |
---|
| 402 | CGridScattererConnector* getServerToClientConnector(void) { if (serverToClientConnector_==nullptr) computeServerToClientConnector() ; return serverToClientConnector_;} |
---|
| 403 | void computeServerToClientConnector(void) ; |
---|
| 404 | private: |
---|
| 405 | map<CContextClient*, CGridScattererConnector*> clientToServerConnector_ ; |
---|
| 406 | public: |
---|
| 407 | CGridScattererConnector* getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;} // make some test to see if connector exits for the given client |
---|
| 408 | |
---|
| 409 | private: |
---|
| 410 | CGridGathererConnector* serverFromClientConnector_ = nullptr ; |
---|
| 411 | public: |
---|
| 412 | CGridGathererConnector* getServerFromClientConnector(void) { if (serverFromClientConnector_==nullptr) computeServerFromClientConnector() ; return serverFromClientConnector_;} |
---|
| 413 | void computeServerFromClientConnector(void) ; |
---|
| 414 | |
---|
[219] | 415 | }; // class CGrid |
---|
| 416 | |
---|
| 417 | // Declare/Define CGridGroup and CGridDefinition |
---|
| 418 | DECLARE_GROUP(CGrid); |
---|
| 419 | |
---|
| 420 | ///-------------------------------------------------------------- |
---|
| 421 | |
---|
[335] | 422 | } // namespace xios |
---|
[219] | 423 | |
---|
[591] | 424 | #endif // __XIOS_CGrid__ |
---|