Changeset 2481 in Sophya for trunk/SophyaLib/BaseTools
- Timestamp:
- Dec 9, 2003, 9:29:45 AM (22 years ago)
- Location:
- trunk/SophyaLib/BaseTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/ppfbinstream.cc
r2477 r2481 202 202 int_8 pos; 203 203 GetRawI8(pos); 204 Get TypeTag(ppstype);204 GetRawUByte(ppstype); 205 205 if (ppstype != PPS_EOF) 206 206 throw FileFormatExc("PPFBinaryInputStream::ReadNameTagTable() Corrupted file, no EOF tag at end of file"); … … 208 208 // On se positionne au debut du NameTagTable 209 209 s->seekg(pos); 210 Get TypeTag(ppstype);210 GetRawUByte(ppstype); 211 211 if (ppstype != PPS_NAMETAG_TABLE) 212 212 throw FileFormatExc("PPFBinaryInputStream::ReadNameTagTable() Corrupted file PPS_NAMETAG_TABLE not found"); … … 242 242 s->seekg(-(sizeof(int_8)+1), ios::end); 243 243 244 Get TypeTag(ppstype);244 GetRawUByte(ppstype); 245 245 if (ppstype != PPS_EOF) 246 246 throw FileFormatExc("PPFBinaryInputStream::ReadNameTagTableV2() Corrupted file, no eof entry at end of file"); … … 256 256 s->seekg(pos); 257 257 while (true) { 258 Get TypeTag(ppstype);258 GetRawUByte(ppstype); 259 259 if (ppstype == PPS_EOF) break; 260 260 … … 280 280 { 281 281 s->seekg(pos); 282 unsigned char ppstag; 283 GetRawUByte(ppstag); 284 if (ppstag != PPS_POSTAG_MARK) 285 throw FileFormatExc("PPFBinaryInputStream::GotoPositionTag() - PPS_POSTAG_MARK not found!"); 282 286 int_8 tpos; 283 287 GetRawI8(tpos); … … 411 415 GetRawU8(ui8); 412 416 datasz = dsize; 413 asz = i8;417 asz = ui8; 414 418 break; 415 419 } … … 1297 1301 tagpos = s->tellp(); 1298 1302 PutRawByte(PPS_POSTAG_MARK); 1299 Put I8(tagpos);1303 PutRawI8(tagpos); 1300 1304 _nbpostag++; // Compteur de nombre de tags 1301 1305 return(tagpos); -
trunk/SophyaLib/BaseTools/ppfnametag.h
r2462 r2481 14 14 class PPFNameTag { 15 15 public: 16 PPFNameTag(PPFNameTag const & ptn) { _tname = ptn._tname; } 16 17 PPFNameTag(string const & tn) { _tname = tn; } 17 18 PPFNameTag(const char * tn) { _tname = tn; } 18 19 ~PPFNameTag() { } 19 inline bool GotoNameTag(PInPersist& pi) 20 inline bool GotoNameTag(PInPersist& pi) const 20 21 { return pi.GotoNameTag(_tname); } 21 inline void WriteTag(POutPersist& po) 22 inline void WriteTag(POutPersist& po) const 22 23 { return po.WriteNameTag(_tname); } 23 24 inline char* operator= (char* s) { _tname = s; return s; } … … 28 29 }; 29 30 30 inline PInPersist& operator >> (PInPersist& si, PPFNameTag & pnt)31 inline PInPersist& operator >> (PInPersist& si, PPFNameTag const & pnt) 31 32 { pnt.GotoNameTag(si); return(si); } 32 33 33 inline POutPersist& operator >> (POutPersist& so, PPFNameTag& pnt)34 inline POutPersist& operator << (POutPersist& so, PPFNameTag const & pnt) 34 35 { pnt.WriteTag(so); return(so); } 35 36
Note:
See TracChangeset
for help on using the changeset viewer.