Changeset 2477 in Sophya


Ignore:
Timestamp:
Dec 7, 2003, 12:56:36 AM (22 years ago)
Author:
ansari
Message:

Suite et presque fin de l'extension des fonctionalites de la persistence PPF - fonctionalite pour le swap en particulier - Reza 7 Dec 2003

Location:
trunk/SophyaLib/BaseTools
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/dvlist.h

    r2322 r2477  
    105105/*! Reads the object from the PInPersist stream \b is */
    106106inline PInPersist& operator >> (PInPersist& is, DVList & obj)
    107 { ObjFileIO<DVList> fio(&obj);  fio.Read(is); return(is); }
     107{ ObjFileIO<DVList> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); }
    108108
    109109// Classe pour la gestion de persistance
  • trunk/SophyaLib/BaseTools/fiondblock.h

    r2322 r2477  
    4242template <class T>
    4343inline PInPersist& operator >> (PInPersist& is, NDataBlock<T> & obj)
    44 { FIO_NDataBlock<T> fio(&obj);  fio.Read(is); return(is); }
     44{ FIO_NDataBlock<T> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); }
    4545
    4646} // Fin du namespace
  • trunk/SophyaLib/BaseTools/objfio.h

    r1981 r2477  
    5656template <class T>
    5757inline PInPersist& operator >> (PInPersist& is, T & obj)
    58 { ObjFileIO<T> fio(&obj);  fio.Read(is); return(is); } 
     58{ ObjFileIO<T> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); } 
    5959*/
    6060
  • trunk/SophyaLib/BaseTools/ppersist.cc

    r2476 r2477  
    560560//      ou PPersist::PPS_BIG_ENDIAN.
    561561//--
     562POutPersist::POutPersist(RawInOutStream* os, bool ad, int endianness)
     563  : PPFBinaryOutputStream(os, ad, endianness)
     564{
     565  pps_OId = 0;
     566  wobj_level = 0;
     567}
     568
    562569POutPersist::POutPersist(string const& flnm, int endianness)
    563570  : PPFBinaryOutputStream(flnm, endianness)
     
    565572  // PPS (POutPersist stream) Object Id initialisation
    566573  pps_OId = 0;
     574  wobj_level = 0;
    567575}
    568576
     
    599607  uint_8 oid = assignObjectId(obj);       // We assing a PPS Object Id
    600608  PutRawUByte(PPS_OBJECT);         // We write the Object Tag
     609  wobj_level++;  // Niveau d'imbrication d'ecriture d'objets
    601610  PutRawU8(getPPClassId(*obj));    // Writing the PPersist ClassId
    602611  PutRawU8(oid);                   // Write the PPS Object Id
    603612  obj->WriteSelf(*this);
     613  //  Comptage d'objets ecrits
     614  _nbobjs++;
     615  if (wobj_level == 1) _nbtlobjs++;
     616  wobj_level--; 
    604617  PutRawUByte(PPS_ENDOBJECT);      // We write the End-Of-Object Tag
    605618  PutRawU8(oid);                   // and again its PPS Object Id
  • trunk/SophyaLib/BaseTools/ppersist.h

    r2475 r2477  
    109109  class PInPersist : public PPFBinaryInputStream, public PIOPersist  {
    110110  public:
     111    PInPersist(RawInOutStream * is, bool ad, bool scan=false);
    111112    PInPersist(string const& flnm, bool scan=true);
    112113    virtual ~PInPersist();
     
    137138  class POutPersist : public PPFBinaryOutputStream, public PIOPersist  {
    138139  public:
     140    POutPersist(RawInOutStream* os, bool ad, int endianness = PPS_NATIVE);
    139141    POutPersist(string const& flnm, int endianness = PPS_NATIVE);
    140142    virtual ~POutPersist();
     
    161163    ObjList objList;
    162164    uint_8 pps_OId;    // PPS Object Id
     165    int    wobj_level; // Niveau d'imbrication lors de l'ecriture d'objet
    163166  };
    164167 
  • trunk/SophyaLib/BaseTools/ppfbinstream.cc

    r2476 r2477  
    4949}
    5050
     51//-------------------------------------------------------------------------
     52//----------------------  Classe PPFBinaryIOStream ------------------------
     53//-------------------------------------------------------------------------
     54
     55
     56PPFBinaryIOStream::PPFBinaryIOStream()
     57{
     58  version = 0;     // PPersist(In/Out) version
     59  //  creationdate = time(NULL);   // Date de creation du fichier
     60  _nbpostag = 0;     // Nb de tag de positionnement
     61  _nbobjs = 0;       // Nb total d'objets
     62  _nbtlobjs = 0;     // Nb d'objets de niveau 1
     63}
     64
     65PPFBinaryIOStream::~PPFBinaryIOStream()
     66{
     67}
     68
     69string
     70PPFBinaryIOStream::CreationDateStr()
     71{
     72  time_t cdt = CreationDate();
     73  string cdate = ctime(&cdt);
     74  return(cdate);
     75}
     76
     77string
     78PPFBinaryIOStream::InfoString()
     79{
     80  string rs;
     81  char buff[256];
     82  sprintf(buff,"PPFStream Version= %d  CreationDate= ", Version());
     83  rs += buff;
     84  rs += CreationDateStr();
     85  sprintf(buff,"\n NbObjs= %ld NbTopLevObjs= %ld ", (long)NbObjects(),
     86          (long)NbTopLevelObjects());
     87  rs += buff;
     88  sprintf(buff,"\n NbPosTag= %ld NbNameTag= %ld ", (long)NbPosTags(),
     89          (long)NbNameTags());
     90   rs += buff;
     91   return rs;
     92}
     93
     94
     95string
     96PPFBinaryIOStream::GetTagName(int itag)
     97{
     98  if (itag<0 || itag >= (int)tags.size()) return "";
     99  map<string, int_8>::iterator i = tags.begin();
     100  for (int j=0; j<itag; j++) i++;
     101  return((*i).first);
     102}
     103
     104
     105static vector<string> * ret_tag_names = NULL;
     106vector<string> const &
     107PPFBinaryIOStream::GetNameTags()
     108{
     109if (ret_tag_names) delete ret_tag_names;
     110ret_tag_names = new vector<string> ;
     111map<string, int_8>::iterator i;
     112for(i=tags.begin(); i!=tags.end(); i++) ret_tag_names->push_back((*i).first);
     113return(*ret_tag_names); 
     114}
     115
     116//-------------------------------------------------------------------------
     117//--------------------  Classe PPFBinaryInputStream -----------------------
     118//-------------------------------------------------------------------------
    51119
    52120PPFBinaryInputStream::PPFBinaryInputStream(RawInOutStream * is, bool ad, bool scan)
     
    123191
    124192
    125 
    126 
    127 
    128 string
    129 PPFBinaryInputStream::CreationDateStr()
    130 {
    131   time_t cdt = CreationDate();
    132   string cdate = ctime(&cdt);
    133   return(cdate);
    134 }
    135 
    136193void
    137194PPFBinaryInputStream::ReadNameTagTable()
     
    142199
    143200  s->seekg(-(sizeof(int_8)+1), ios::end);
    144 
     201  // Lecture position NameTagTable et tag EOF
     202  int_8 pos;
     203  GetRawI8(pos);
    145204  GetTypeTag(ppstype);
    146205  if (ppstype != PPS_EOF)
    147206    throw FileFormatExc("PPFBinaryInputStream::ReadNameTagTable()  Corrupted file, no EOF tag at end of file");
    148 
    149   // Lecture position NameTagTable
    150   int_8 pos;
    151   GetRawI8(pos);
    152   if (pos < 0) {  // no tags
    153     s->seekg(debut);
    154     return;
    155   }
    156207 
    157208  // On se positionne au debut du NameTagTable
     
    160211  if (ppstype != PPS_NAMETAG_TABLE)
    161212    throw FileFormatExc("PPFBinaryInputStream::ReadNameTagTable()  Corrupted file PPS_NAMETAG_TABLE not found");
     213  // Lecture nb de PosTag et nb d'objets dans le flot
     214  GetI8(_nbpostag);
     215  GetI8(_nbobjs);
     216  GetI8(_nbtlobjs);
    162217  uint_8 ttsz,it;
     218  // Lecture nombre de NameTag
    163219  GetU8(ttsz);
    164   for(it=0; it<ttsz; it++) {
    165     int_8 tpos;
    166     string tname;
    167     GetI8(tpos);
    168     GetStr(tname);
    169     tags[tname] = tpos;
     220  if (ttsz > 0) {
     221    for(it=0; it<ttsz; it++) {
     222      int_8 tpos;
     223      string tname;
     224      GetI8(tpos);
     225      GetStr(tname);
     226      tags[tname] = tpos;
     227    }
    170228  }
    171229  // On revient au debut du float, juste apres l'entete
     
    218276
    219277
    220 int
    221 PPFBinaryInputStream::NbNameTags()
    222 {
    223   return tags.size();
    224 }
    225 
    226278bool
    227279PPFBinaryInputStream::GotoPositionTag(int_8 pos)
     
    261313}
    262314
    263 string
    264 PPFBinaryInputStream::GetTagName(int itag)
    265 {
    266   if (itag<0 || itag >= (int)tags.size()) return "";
    267   map<string, int_8>::iterator i = tags.begin();
    268   for (int j=0; j<itag; j++) i++;
    269   return((*i).first);
    270 }
    271 
    272 
    273 static vector<string> * ret_tag_names = NULL;
    274 vector<string> const &
    275 PPFBinaryInputStream::GetNameTags()
    276 {
    277 if (ret_tag_names) delete ret_tag_names;
    278 ret_tag_names = new vector<string> ;
    279 map<string, int_8>::iterator i;
    280 for(i=tags.begin(); i!=tags.end(); i++) ret_tag_names->push_back((*i).first);
    281 return(*ret_tag_names); 
    282 }
    283315
    284316bool
    285317PPFBinaryInputStream::SkipToNextObject()
    286318{
    287   // A FAIRE NOV 2003 - REZA
    288   return true;
     319  if (! s->isSeekable())  return false;
     320  unsigned char ppstag=0;
     321  // int kss;
     322  while ((ppstag != PPS_OBJECT) && (ppstag != PPS_REFERENCE) && (ppstag != PPS_EOF)) {
     323    // kss++;
     324    GetRawUByte(ppstag);
     325    //    cout << " DBG--SkipToNextObject(" << kss << ")" << (int)ppstag << ","
     326    //   << (int)PPS_OBJECT << " fpos=" << s->tellg() << endl;
     327    if  ((ppstag != PPS_OBJECT) && (ppstag != PPS_REFERENCE) && (ppstag != PPS_EOF))
     328      SkipItem(false, ppstag);
     329  }
     330  s->seekg(-1, ios::cur);
     331  if (ppstag == PPS_OBJECT) return true;
     332  else return false;
     333 
    289334}
    290335
     
    292337PPFBinaryInputStream::SkipNextItem()
    293338{
    294   // A FAIRE NOV 2003 - REZA
     339  if (! s->isSeekable())  return false;
     340  SkipItem();
    295341  return true;
    296342}
    297343
    298344char
    299 PPFBinaryInputStream::NextItemTag(short datasz, size_t sz)
    300 {
     345PPFBinaryInputStream::NextItemTag(short datasz, size_t asz)
     346{
     347  int_8 cpos;
     348  cpos = s->tellg();
     349
     350  unsigned char ppstag=0;
     351  unsigned char ppst1,ppst2,ppst3,ppst30;
     352  GetRawUByte(ppstag);
     353  ppst1 = ppstag&0x0f;  // bits 0123
     354  ppst2 = ppstag&0x30;  // bits     45
     355  ppst3 = ppstag&0xc0;  // bits       67
     356  ppst30 = ppstag&0xc1; // bits 0     67
     357 
    301358  datasz = 0;
    302   sz = 0;
    303   return 0;
     359  asz = 0;
     360
     361  int_4 i4;
     362  int_8 i8;
     363  uint_8 ui8;
     364
     365  if ((ppst2 == 0) && (ppst3 == 0) ) {
     366    switch (ppst1) {
     367    case PPS_STRING :
     368      GetRawI4(i4);
     369      datasz = 1;
     370      asz = i4;
     371      break;
     372     
     373    case PPS_NULL :
     374    case PPS_OBJECT :
     375    case PPS_REFERENCE :
     376    case PPS_NAMETAG_MARK :
     377    case PPS_POSTAG_MARK :
     378    case PPS_ENDOBJECT :
     379    case PPS_POSTAG_TABLE :
     380    case PPS_NAMETAG_TABLE :
     381    case PPS_EOF :
     382      datasz = 0;
     383      asz = 0;
     384      break;
     385
     386    default :
     387      throw FileFormatExc("PPFBinaryInputStream::NextItemTag() - Unexpected tag value !");
     388      break;
     389    }
     390  }
     391  else {
     392    int_4 dsize = ppst1;
     393    int_4 dsizeskip = dsize;
     394    if (ppst30 == PPS_DATATYPE_COMPLEX) {
     395      dsize--;
     396      dsizeskip = 2*dsize;
     397    }
     398    switch (ppst2) {     
     399    case PPS_SIMPLE :
     400      datasz = dsize;
     401      asz = 1;     
     402      break;
     403
     404    case PPS_SIMPLE_ARRAY4 :
     405      GetRawI4(i4);
     406      datasz = dsize;
     407      asz = i4;     
     408      break;
     409
     410    case PPS_SIMPLE_ARRAY8 :
     411      GetRawU8(ui8);
     412      datasz = dsize;
     413      asz = i8;     
     414      break;
     415    }
     416  }
     417
     418  s->seekg(cpos,ios::beg);
     419  return(ppstag);
    304420}
    305421
    306422void
    307 PPFBinaryInputStream::SkipItem(bool fgrdt, char itag)
    308 {
    309   return;
     423PPFBinaryInputStream::SkipItem(bool fgrdt, unsigned char itag)
     424{
     425  unsigned char ppstag=0;
     426  unsigned char ppst1,ppst2,ppst3,ppst30;
     427  uint_8 ui8;
     428  int_4 i4;
     429  int_8 i8;
     430 
     431
     432  if (fgrdt)  GetRawUByte(ppstag);
     433  else ppstag = itag;
     434
     435  ppst1 = ppstag&0x0f;  // bits 0123
     436  ppst2 = ppstag&0x30;  // bits     45
     437  ppst3 = ppstag&0xc0;  // bits       67
     438  ppst30 = ppstag&0xc1; // bits 0     67
     439  if ((ppst2 == 0) && (ppst3 == 0) ) {
     440    switch (ppst1) { 
     441    case PPS_NULL :
     442    case PPS_NAMETAG_MARK :
     443      break;
     444
     445    case PPS_STRING :
     446      GetRawI4(i4);
     447      s->seekg(i4,ios::cur);
     448      break;
     449
     450    case PPS_OBJECT :
     451      GetRawU8(ui8);
     452      GetRawU8(ui8);
     453      break;
     454     
     455    case PPS_REFERENCE :
     456      GetRawU8(ui8);
     457      GetRawI8(i8);
     458      break;
     459
     460    case PPS_POSTAG_MARK :
     461      GetRawI8(i8);     
     462      break;
     463     
     464    case PPS_ENDOBJECT :
     465      GetRawU8(ui8);
     466      break;
     467
     468    case PPS_POSTAG_TABLE :
     469      GetRawI4(i4);
     470      //      for(int kkt=0; kkt<i4; kkt++)  GetRawI8(i8);     
     471      s->seekg((int_8)i4*8,ios::cur);
     472      break;
     473
     474    case PPS_NAMETAG_TABLE :
     475      if (Version() < 3) {
     476        GetRawI8(i8);
     477        GetRawI4(i4);
     478        s->seekg(i4,ios::cur);
     479        }
     480      else {
     481        GetI8(i8);  // nb pos tag
     482        GetI8(i8);  // nb d'objets
     483        GetI8(i8);  // nb objets toplevel
     484        GetU8(ui8); // nb de nametag
     485        for(int kt=0; kt<ui8; kt++) {
     486          GetRawI4(i4);
     487          s->seekg(i4,ios::cur);
     488        }
     489        GetI8(i8);  // position debut NameTagTable
     490      }
     491      break;
     492     
     493
     494    case PPS_EOF :
     495      if (Version() < 3) GetRawI8(i8); 
     496      break;
     497     
     498    default :
     499      cerr << "PPFBinaryInputStream::SkipItem() ERROR : Unexpected tag value "
     500           << hex << ppstag << " At position" << s->tellg() << dec << endl;
     501      throw FileFormatExc("PPFBinaryInputStream::SkipItem() - Unexpected tag value !");
     502    }
     503  }
     504  else {
     505    string dtype = "???? x";
     506    int_4 dsize = ppst1;
     507    int_8 dsizeskip = dsize;
     508    if (ppst30 == PPS_DATATYPE_COMPLEX) {
     509      dsize--;
     510      dsizeskip = 2*dsize;
     511    }
     512
     513    switch (ppst2) {
     514    case PPS_SIMPLE :
     515      s->seekg(dsizeskip, ios::cur);
     516      break;
     517
     518    case PPS_SIMPLE_ARRAY4 :
     519      GetRawI4(i4);
     520      s->seekg(dsizeskip*(int_8)i4, ios::cur);
     521      break;
     522     
     523    case PPS_SIMPLE_ARRAY8 :
     524      GetRawU8(ui8);
     525      s->seekg(dsizeskip*ui8, ios::cur);
     526      break;
     527    }
     528  }
     529return;
    310530}
    311531
     
    7931013  s->seekg(cpos,ios::beg);
    7941014
     1015  cout << "   FileName= " << FileName() << endl;
    7951016  cout << "   Version= " << Version() << " FileSize= " << fsize
    7961017       << " Creation Date= " << CreationDateStr() <<  endl;
    797  
     1018  cout << " NbPosTag=" << NbPosTags() << " NbNameTag=" << tags.size()
     1019       << " NbObjs=" << NbObjects() << " NbTopLevObjs=" << NbTopLevelObjects()
     1020       << endl << endl;
     1021
    7981022  uint_8 totntags = 0;
    7991023  bool eofok = false;
     
    8591083
    8601084      case PPS_NAMETAG_TABLE :
    861         GetRawI8(i8);
    862         GetRawI4(i4);
    863         buff = new char[i4+1];
    864         GetRawBytes(buff, i4);
    865         buff[i4] = '\0';  str = buff;
    866         delete[] buff;
    867         cout << "<PPS_TAG> tag at position " << hex << cpos << dec
    868              << " Name= " << str << endl;
     1085        if (Version() < 3) {
     1086          GetRawI8(i8);
     1087          GetRawI4(i4);
     1088          buff = new char[i4+1];
     1089          GetRawBytes(buff, i4);
     1090          buff[i4] = '\0';  str = buff;
     1091          delete[] buff;
     1092          cout << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec
     1093               << " Name= " << str << endl;
     1094        }
     1095        else {
     1096          cout << "<PPS_NAMETAG_TABLE> tag at position " << hex << cpos << dec << endl;
     1097          GetI8(i8);  // nb pos tag
     1098          GetI8(i8);  // nb d'objets
     1099          GetI8(i8);  // nb objets toplevel
     1100          GetU8(ui8); // nb de nametag
     1101          for(int kt=0; kt<ui8; kt++) {
     1102            string tname;
     1103            GetI8(i8);
     1104            GetStr(tname);
     1105            if (lev > 0) 
     1106              cout << "<PPS_NAMETAG_ENTRY>  NameTag=" << tname
     1107                   << " NameTagMark Position=" << hex << i8 << dec << endl;
     1108          }
     1109          GetRawI8(i8);  // position debut NameTagTable
     1110        }
    8691111        break;
    8701112
    8711113      case PPS_EOF :
    872         GetRawI8(i8);   
     1114        if (Version() < 3) GetRawI8(i8);       
    8731115        cout << "<PPS_EOF> tag at position " << hex << cpos 
    8741116             << " TagPos=" << i8 << dec << endl;
     
    8901132      else if (ppst3 == PPS_DATATYPE_UNSIGNED) dtype = "UNSIGNED x";
    8911133      int_4 dsize = ppst1;
    892       int_4 dsizeskip = dsize;
     1134      int_8 dsizeskip = dsize;
    8931135      if (ppst30 == PPS_DATATYPE_COMPLEX) {
    8941136        dsize--;
     
    9111153        if (lev > 0)  cout << "<PPS_SIMPLE_ARRAY4> tag at position " << hex << cpos << dec
    9121154                           << " DataType=" << dtype << " NElts= " << i4 << endl;
    913         s->seekg((int_8)dsizeskip*(int_8)i4, ios::cur);
     1155        s->seekg(dsizeskip*(int_8)i4, ios::cur);
    9141156        break;
    9151157
     
    9181160        if (lev > 0)  cout << "<PPS_SIMPLE_ARRAY8> tag at position " << hex << cpos << dec
    9191161                           << " DataType=" << dtype << " NElts= " << ui8 << endl;
    920         s->seekg((int_8)dsizeskip*ui8, ios::cur);
     1162        s->seekg(dsizeskip*ui8, ios::cur);
    9211163        break;
    9221164      }
     
    9301172  return;
    9311173}
     1174
     1175
     1176//-------------------------------------------------------------------------
     1177//-------------------  Classe PPFBinaryOutputStream -----------------------
     1178//-------------------------------------------------------------------------
    9321179
    9331180
     
    9881235// ---- GMT creation date of the file
    9891236  time_t tm = time(NULL);
     1237  creationdate = tm;
    9901238  char datestring[33];
    9911239  int l=strftime(datestring,32,"%d/%m/%Y %H:%M:%S GMT",gmtime(&tm));
     
    9981246PPFBinaryOutputStream::WriteNameTagTable()
    9991247
    1000   if (tags.size() == 0) {
    1001     PutRawUByte(PPS_EOF);
    1002     PutRawI8(-1);
    1003   }
    1004   else {
    1005     int_8 tagPos;
    1006     tagPos = s->tellp();
    1007     PutRawUByte(PPS_NAMETAG_TABLE);                       // This is a tag
    1008     PutU8((uint_8)tags.size());    // Number of tags
     1248  int_8 tagPos;
     1249  tagPos = s->tellp();
     1250  PutRawUByte(PPS_NAMETAG_TABLE);  //   NameTagTable tag
     1251  // Ecriture nb de PosTag et nb d'objets dans le flot
     1252  PutI8(_nbpostag);
     1253  PutI8(_nbobjs);
     1254  PutI8(_nbtlobjs); 
     1255  // Ecriture nb de tag et les tags
     1256  PutU8((uint_8)tags.size());    // Number of tags
     1257  if (tags.size() > 0) {
    10091258    for (map<string,int_8>::iterator i = tags.begin(); i != tags.end(); i++) {
    10101259      int_8 pos = (*i).second;
     
    10121261      PutStr((*i).first);
    10131262    }
    1014     PutRawUByte(PPS_EOF);
    1015     PutRawI8(tagPos);
    1016   }
    1017  
     1263  }
     1264  PutRawI8(tagPos);
     1265  PutRawUByte(PPS_EOF);
     1266  return;
    10181267}
    10191268
     
    10491298  PutRawByte(PPS_POSTAG_MARK);
    10501299  PutI8(tagpos);
     1300  _nbpostag++;  // Compteur de nombre de tags
    10511301  return(tagpos);
    10521302}
  • trunk/SophyaLib/BaseTools/ppfbinstream.h

    r2476 r2477  
    5555  };
    5656 
    57   PPFBinaryIOStream() { }
    58   virtual ~PPFBinaryIOStream() { }
    59   int    Version() {return version;}  // PIn/OutPersist version number
    60  
     57  PPFBinaryIOStream();
     58  virtual ~PPFBinaryIOStream();
     59
     60  inline int    Version() {return version;}  // PIn/OutPersist version number
     61  inline time_t CreationDate() { return creationdate; }
     62  string        CreationDateStr();
     63  string        InfoString();
     64
     65  inline int_8  NbPosTags() {return _nbpostag; }
     66  inline int_8  NbNameTags() {return tags.size(); }
     67  inline int_8  NbObjects() {return _nbobjs; }
     68  inline int_8  NbTopLevelObjects() {return _nbtlobjs; }
     69
     70  string GetTagName(int itag);  // 0..NbTags-1
     71  vector<string> const &  GetNameTags(); 
     72
    6173protected:
    62  
     74  // La liste des NameTag ds le flot 
    6375  map<string, int_8> tags;
    6476  int version;     // PPersist(In/Out) version
     77  time_t creationdate;   // Date de creation du fichier
     78
     79  // Variables pour garder le compte des objets et des tags
     80  // Le nombre d'objets a l'ecriture est mis a jour par la classe
     81  // derivee POutPersist
     82  int_8 _nbpostag;     // Nb de tag de positionnement
     83  int_8 _nbobjs;       // Nb total d'objets
     84  int_8 _nbtlobjs;     // Nb d'objets de niveau 1
    6585};
    6686 
     
    7898  bool   GotoPositionTag(int_8 pos);
    7999  bool   GotoNameTag(string const& name);
    80   int    NbNameTags();
    81100  bool   GotoNameTagNum(int itag);  // 0..NbTags-1
    82   string GetTagName(int itag);  // 0..NbTags-1
    83   vector<string> const &  GetNameTags(); 
    84101 
    85102  // Saut jusqu'au prochain objet
     
    154171  void    GetPosTagTable(vector<int_8>&);
    155172 
    156   time_t CreationDate() { return creationdate; }
    157   string CreationDateStr();
    158  
    159173  void   AnalyseTags(int lev=0);   // List (all or some) tags ...
    160174 
     
    164178  void   ReadNameTagTable();
    165179
    166   void   SkipItem(bool fgrdi, char itag);
     180  void   SkipItem(bool fgrdi=true, unsigned char itag=0);
    167181
    168182  void   CheckTag   (short datasz, short datatype);
     
    181195 
    182196  bool bigEndian;
    183   time_t creationdate;
    184197  // Si on a fait une lecture non sequentielle  -> seqread = false
    185198  bool seqread;
     
    281294
    282295  bool bigEndian;
    283 
    284296};
    285297 
  • trunk/SophyaLib/BaseTools/sversion.h

    r2476 r2477  
    33
    44#define SOPHYA_VERSION   1.8
    5 #define SOPHYA_REVISION  2
     5#define SOPHYA_REVISION  3
    66#define SOPHYA_TAG       "V_Oct2003"
    77
Note: See TracChangeset for help on using the changeset viewer.