Ignore:
Timestamp:
05/26/15 16:13:45 (9 years ago)
Author:
rlacroix
Message:

Add a new interface xios_recv_field to get local instant data from a field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/context.cpp

    r591 r593  
    350350      this->solveAllRefOfEnabledFields(true); 
    351351      this->buildAllExpressionOfEnabledFields(); 
     352      buildAllExpressionOfFieldsWithReadAccess(); 
    352353    } 
    353354 
     
    382383     } 
    383384   } 
     385 
     386  void CContext::findFieldsWithReadAccess(void) 
     387  { 
     388    fieldsWithReadAccess.clear(); 
     389    const vector<CField*> allFields = CField::getAll(); 
     390    for (size_t i = 0; i < allFields.size(); ++i) 
     391    { 
     392      if (!allFields[i]->read_access.isEmpty() && allFields[i]->read_access.getValue()) 
     393        fieldsWithReadAccess.push_back(allFields[i]); 
     394    } 
     395  } 
     396 
     397  void CContext::solveAllRefOfFieldsWithReadAccess() 
     398  { 
     399    for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i) 
     400    { 
     401      fieldsWithReadAccess[i]->solveAllReferenceEnabledField(false); 
     402      // Ensure that the instant data will be properly saved 
     403      fieldsWithReadAccess[i]->getInstantData(); 
     404    } 
     405  } 
     406 
     407  void CContext::buildAllExpressionOfFieldsWithReadAccess() 
     408  { 
     409    for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i) 
     410      fieldsWithReadAccess[i]->buildAllExpressionEnabledField(); 
     411  } 
    384412 
    385413   void CContext::solveAllInheritance(bool apply) 
     
    638666      // Search and rebuild all reference object of enabled fields 
    639667      this->solveAllRefOfEnabledFields(false); 
     668 
     669      // Find all fields with read access from the public API 
     670      findFieldsWithReadAccess(); 
     671      // and solve the all reference for them 
     672      solveAllRefOfFieldsWithReadAccess(); 
     673 
    640674      isPostProcessed = true; 
    641675   } 
Note: See TracChangeset for help on using the changeset viewer.