Changeset 701 in Sophya for trunk/SophyaLib/Samba/spheregorski.cc


Ignore:
Timestamp:
Jan 4, 2000, 3:27:29 PM (26 years ago)
Author:
ansari
Message:

mise a jour de persistances par objets delegues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Samba/spheregorski.cc

    r697 r701  
    219219//--
    220220{
    221   cout << " constructeur de recopie " << endl;
    222221  if(s.mInfo_) mInfo_= new DVList(*s.mInfo_);
    223222
     
    11161115{
    11171116  dobj= new SphereGorski<T>;
    1118   dobj->DataBlock().SetTemp(true);
     1117  dobj->pixels_.SetTemp(true);
    11191118  ownobj= true;
    11201119  Read(filename);
     
    11251124{
    11261125  dobj= new SphereGorski<T>(obj, true);
    1127   dobj->DataBlock().SetTemp(true);
     1126  dobj->pixels_.SetTemp(true);
    11281127  ownobj= true;
    11291128}
     
    11551154    {
    11561155      dobj= new SphereGorski<T>;
    1157       dobj->DataBlock().SetTemp(true);
     1156      dobj->pixels_.SetTemp(true);
    11581157      ownobj= true;     
    11591158    }
    11601159
    11611160// Let's Read the SphereCoordSys object  -- ATTENTIOn - $CHECK$
    1162   SphereCoordSys* cs = dynamic_cast<SphereCoordSys*>(is.ReadObject());
    1163   dobj->SetCoordSys(cs);
    1164 
     1161  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
     1162  fio_scs.Read(is);
    11651163  // Pour savoir s'il y avait un DVList Info associe
    11661164  char strg[256];
     
    11751173  int_4 nSide;
    11761174  is.GetI4(nSide);
    1177   dobj->setSizeIndex(nSide);
    1178 
    11791175  int_4 nPix;
    11801176  is.GetI4(nPix);
    1181   dobj->setNbPixels(nPix);
    1182 
    11831177  double Omega;
    11841178  is.GetR8(Omega);
    1185   dobj->setPixSolAngle(Omega);
     1179  dobj->setParameters(nSide,nPix, Omega);
    11861180
    11871181// On lit le DataBlock;
    1188   is >> dobj->DataBlock();
     1182  FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
     1183  fio_nd.Read(is);
    11891184}
    11901185
     
    11921187void FIO_SphereGorski<T>::WriteSelf(POutPersist& os) const
    11931188{
    1194 
    11951189  if(dobj == NULL)
    11961190    {
     
    12001194
    12011195// Let's write the SphereCoordSys object
    1202   dobj->GetCoordSys()->Write(os);
     1196  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
     1197  fio_scs.Write(os);
    12031198
    12041199  char strg[256];
     
    12201215  os.PutI4(nSide);
    12211216  os.PutI4(nPix);
    1222   os.PutR8(dobj->PixSolAngle(0));
     1217  os.PutR8(dobj->PixSolAngle());
    12231218// On ecrit le dataBlock
    1224   os << dobj->DataBlock();
     1219  FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
     1220  fio_nd.Write(os);
    12251221}
    12261222
Note: See TracChangeset for help on using the changeset viewer.