Changeset 273


Ignore:
Timestamp:
09/15/11 10:08:53 (13 years ago)
Author:
hozdoba
Message:

correction classe CVariable

Location:
XMLIO_V2/dev/dev_rv
Files:
2 deleted
2 edited

Legend:

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

    r272 r273  
    6262   } 
    6363 
     64   void CVariable::toBinary(StdOStream & os) const 
     65   { 
     66     const StdString & content = this->content; 
     67     const StdSize size        =  content.size(); 
     68     SuperClass::toBinary(os); 
     69 
     70     os.write (reinterpret_cast<const char*>(&size), sizeof(StdSize)); 
     71     os.write (content.data(), size * sizeof(char)); 
     72   } 
     73 
     74   void CVariable::fromBinary(StdIStream & is) 
     75   { 
     76      SuperClass::fromBinary(is); 
     77      StdSize size  = 0; 
     78      is.read (reinterpret_cast<char*>(&size), sizeof(StdSize)); 
     79      this->content.assign(size, ' '); 
     80      is.read (const_cast<char *>(this->content.data()), size * sizeof(char)); 
     81   } 
     82 
    6483   void CVariableGroup::parse(xml::CXMLNode & node, bool withAttr) 
    6584   { 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/variable.hpp

    r272 r273  
    5757            virtual StdString toString(void) const; 
    5858 
    59             //virtual void toBinary  (StdOStream & os) const; 
    60             //virtual void fromBinary(StdIStream & is); 
     59            virtual void toBinary  (StdOStream & os) const; 
     60            virtual void fromBinary(StdIStream & is); 
    6161 
    6262            /// Accesseur /// 
Note: See TracChangeset for help on using the changeset viewer.