- Timestamp:
- Nov 16, 1999, 10:28:20 AM (26 years ago)
- Location:
- trunk/SophyaLib/BaseTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/ppersist.cc
r512 r576 226 226 char rbuf[36]; 227 227 GetRawBytes(rbuf, 32); 228 if (strncmp(rbuf," PlanckDPC-PPersistFile", 22) != 0) {228 if (strncmp(rbuf,"SOS-SOPHYA-PPersistFile", 23) != 0) { 229 229 throw FileFormatExc("PInPersist::PInPersist bad header"); 230 230 } … … 763 763 764 764 // Header 765 PutRawBytes(" PlanckDPC-PPersistFile V1",32);765 PutRawBytes("SOS-SOPHYA-PPersistFile V1 ",32); 766 766 PutRawBytes(bigEndian 767 767 ? "BIG-ENDIAN " -
trunk/SophyaLib/BaseTools/ppersist.h
r552 r576 317 317 public: 318 318 static PPersist* Create() {return new T();} 319 static void Register( ) {PIOPersist::RegisterClass(Hash(),Create);}320 static uint_8 Hash( ) {321 return PIOPersist::Hash( typeid(T).name());319 static void Register(string id) {PIOPersist::RegisterClass(Hash(id),Create);} 320 static uint_8 Hash(string id) { 321 return PIOPersist::Hash(id); 322 322 } 323 323 }; 324 324 325 #define PPRegister(className) PPersistRegistrar<className>::Register( );325 #define PPRegister(className) PPersistRegistrar<className>::Register(#className); 326 326 327 327 } // namespace
Note:
See TracChangeset
for help on using the changeset viewer.