Ignore:
Timestamp:
04/13/11 17:02:25 (13 years ago)
Author:
hozdoba
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/file.cpp

    r173 r174  
    174174         this->enabledFields[i]->solveOperation(); 
    175175   } 
     176    
     177   //--------------------------------------------------------------- 
     178    
     179   void CFile::toBinary  (StdOStream & os) const 
     180   { 
     181      ENodeType genum = CFileGroup::GetType(); 
     182      bool hasVFG = (this->getVirtualFieldGroup().get() != NULL); 
     183      SuperClass::toBinary(os); 
     184       
     185      os.write (reinterpret_cast<const char*>(&genum) , sizeof(ENodeType)); 
     186      os.write (reinterpret_cast<const char*>(&hasVFG) , sizeof(bool)); 
     187       
     188      if (hasVFG)this->getVirtualFieldGroup()->toBinary(os); 
     189          
     190   } 
     191    
     192   void CFile::fromBinary(StdIStream & is) 
     193   { 
     194      ENodeType renum = Unknown; 
     195      bool hasVFG = false; 
     196      SuperClass::fromBinary(is); 
     197       
     198      is.read (reinterpret_cast<char*>(&renum), sizeof(ENodeType)); 
     199      is.read (reinterpret_cast<char*>(&hasVFG), sizeof(bool)); 
     200       
     201      if (renum != CFileGroup::GetType()) 
     202         ERROR("CFile::fromBinary(StdIStream & is)", 
     203               << "[ renum = " << renum << "] Bad type !"); 
     204       
     205      this->setVirtualFieldGroup(this->getId()); 
     206      if (hasVFG)this->getVirtualFieldGroup()->fromBinary(is); 
     207       
     208   } 
    176209 
    177210   ///--------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.