Changeset 3392 in Sophya for trunk/SophyaLib/HiStats/datatable.cc
- Timestamp:
- Nov 22, 2007, 7:25:40 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/HiStats/datatable.cc
r2849 r3392 1 1 #include "datatable.h" 2 #include "sopnamsp.h"3 2 #include "strutil.h" 4 3 #include "pexceptions.h" 5 4 #include "fiosegdb.h" 6 5 #include "thsafeop.h" 6 7 namespace SOPHYA { 7 8 8 9 /*! 9 \class SOPHYA::DataTable10 \class DataTable 10 11 \ingroup HiStats 11 12 This class can be used to organize data in table (row-column) form. … … 61 62 The copy constructur shares the data if \b share=true. 62 63 Otherwise, the Clone() method is called to make a complete copy. 64 This constructor copies also the thread safety state from \b a . 63 65 */ 64 66 DataTable::DataTable(DataTable const & a, bool share) … … 71 73 if (a.mInfo) mInfo = new DVList(*(a.mInfo)); 72 74 } 73 //! Copy the table structure from \b a and shares the data (columns content) 75 /*! 76 Copy the table structure from \b a and shares the data (columns content). 77 The tread-safety state is copied from \b a . 78 */ 74 79 void DataTable::Share(DataTable const & a) 75 80 { 76 81 // On copie la structure de table 77 82 CopyStructure(a); 83 if (a.IsThreadSafe()) SetThreadSafe(true); 84 else SetThreadSafe(false); 78 85 // Et on partage les donnees des colonnes 79 86 for (size_t kk=0; kk<mNames.size(); kk++) { … … 115 122 // On copie la structure de table 116 123 CopyStructure(a); 117 // Et on partage les donnees des colonnes 124 if (a.IsThreadSafe()) SetThreadSafe(true); 125 else SetThreadSafe(false); 126 // Et on copie les donnees des colonnes 118 127 for (size_t kk=0; kk<mNames.size(); kk++) { 119 128 sa_size_t sk = mNames[kk].ser; … … 161 170 if (mInfo) delete mInfo; 162 171 mInfo = NULL; 172 if (mThS) delete mThS; 173 mThS = NULL; 163 174 mMin.clear(); 164 175 mMax.clear(); … … 278 289 } 279 290 291 } // FIN namespace SOPHYA
Note:
See TracChangeset
for help on using the changeset viewer.