Changeset 576 in Sophya for trunk


Ignore:
Timestamp:
Nov 16, 1999, 10:28:20 AM (26 years ago)
Author:
ansari
Message:

PPersist version SOPHYA

Location:
trunk/SophyaLib/BaseTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/ppersist.cc

    r512 r576  
    226226  char rbuf[36];
    227227  GetRawBytes(rbuf, 32);
    228   if (strncmp(rbuf,"PlanckDPC-PPersistFile", 22) != 0)  {
     228  if (strncmp(rbuf,"SOS-SOPHYA-PPersistFile", 23) != 0)  {
    229229    throw FileFormatExc("PInPersist::PInPersist  bad header");
    230230  }
     
    763763
    764764  // Header
    765   PutRawBytes("PlanckDPC-PPersistFile V1                ",32);
     765  PutRawBytes("SOS-SOPHYA-PPersistFile V1               ",32);
    766766  PutRawBytes(bigEndian
    767767           ? "BIG-ENDIAN                             "
  • trunk/SophyaLib/BaseTools/ppersist.h

    r552 r576  
    317317    public:
    318318      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);
    322322      }
    323323    };
    324324 
    325 #define PPRegister(className) PPersistRegistrar<className>::Register();
     325#define PPRegister(className) PPersistRegistrar<className>::Register(#className);
    326326 
    327327} // namespace
Note: See TracChangeset for help on using the changeset viewer.