Changeset 3612 in Sophya for trunk/SophyaLib/BaseTools/stsrand.h
- Timestamp:
- Apr 30, 2009, 7:06:50 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/stsrand.h
r3599 r3612 16 16 namespace SOPHYA { 17 17 18 class RandomGenerator: public AnyDataObj {18 class STSRandGen : public AnyDataObj { 19 19 20 20 public: 21 RandomGenerator(size_t n = 1024, bool tsafe=true);22 RandomGenerator(RandomGeneratorconst & rg);21 STSRandGen(size_t n = 1024, bool tsafe=true); 22 STSRandGen(STSRandGen const & rg); 23 23 24 24 void SetBuffSize(size_t n); 25 25 26 virtual ~ RandomGenerator();26 virtual ~STSRandGen(); 27 27 28 28 /*! \brief Automatic initialization using the current time */ … … 72 72 73 73 // Pour la gestion de persistance PPF 74 friend class ObjFileIO< RandomGenerator> ;74 friend class ObjFileIO<STSRandGen> ; 75 75 76 76 protected: … … 93 93 static void GetSeed_P(unsigned short seed_16v[3]); 94 94 95 }; // Fin de la classe RandomGenerator95 }; // Fin de la classe STSRandGen 96 96 97 // Classe pour la gestion de persistance PPF : ObjFileIO< RandomGenerator>97 // Classe pour la gestion de persistance PPF : ObjFileIO<STSRandGen> 98 98 99 99 /*! Writes the random generator object state in the POutPersist stream \b os */ 100 inline POutPersist& operator << (POutPersist& os, RandomGenerator& obj)101 { ObjFileIO< RandomGenerator> fio(&obj); fio.Write(os); return(os); }100 inline POutPersist& operator << (POutPersist& os, STSRandGen & obj) 101 { ObjFileIO<STSRandGen> fio(&obj); fio.Write(os); return(os); } 102 102 /*! Reads the random generator object state from the PInPersist stream \b is */ 103 inline PInPersist& operator >> (PInPersist& is, RandomGenerator& obj)104 { ObjFileIO< RandomGenerator> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); }103 inline PInPersist& operator >> (PInPersist& is, STSRandGen & obj) 104 { ObjFileIO<STSRandGen> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); } 105 105 106 106 } /* namespace SOPHYA */
Note:
See TracChangeset
for help on using the changeset viewer.