Changeset 849
- Timestamp:
- 02/28/06 10:47:19 (19 years ago)
- Location:
- trunk/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STFocus.cpp
r839 r849 28 28 const casa::String STFocus::name_ = "FOCUS"; 29 29 30 STFocus::STFocus(c asa::Table::TableType tt) :31 STSubTable( name_, tt)30 STFocus::STFocus(const Scantable& parent ) : 31 STSubTable( parent, name_ ) 32 32 { 33 33 setup(); 34 34 } 35 35 36 asap::STFocus::STFocus( casa::Table tab ) : STSubTable(tab) 37 { 38 rotationCol_.attach(table_,"ROTATION"); 39 angleCol_.attach(table_,"ANGLE"); 40 tanCol_.attach(table_,"TAN"); 41 } 36 42 37 43 STFocus::~STFocus() … … 39 45 } 40 46 47 STFocus & asap::STFocus::operator =( const STFocus & other ) 48 { 49 if (this != &other) { 50 static_cast<STSubTable&>(*this) = other; 51 rotationCol_.attach(table_,"ROTATION"); 52 angleCol_.attach(table_,"ANGLE"); 53 tanCol_.attach(table_,"TAN"); 54 } 55 return *this; 56 } 41 57 void asap::STFocus::setup( ) 42 58 { … … 92 108 } 93 109 110 94 111 } -
trunk/src/STFocus.h
r839 r849 29 29 class STFocus : public STSubTable { 30 30 public: 31 STFocus( casa::Table::TableType tt = casa::Table::Memory); 31 STFocus() {;} 32 STFocus(casa::Table tab); 33 STFocus( const Scantable& parent ); 32 34 33 35 virtual ~STFocus(); 36 37 STFocus& operator=(const STFocus& other); 34 38 35 39 casa::uInt addEntry( casa::Float rotation, casa::Float angle, -
trunk/src/STFrequencies.cpp
r847 r849 35 35 const String STFrequencies::name_ = "FREQUENCIES"; 36 36 37 STFrequencies::STFrequencies(Table::TableType tt) : 38 STSubTable( name_, tt ) 39 { 37 STFrequencies::STFrequencies(const Scantable& parent) : 38 STSubTable(parent, name_) 39 { 40 cout << "STFrequencies(const Scantable& parent" << endl; 40 41 setup(); 41 } 42 42 cout << "after setup" << endl; 43 } 44 45 asap::STFrequencies::STFrequencies( casa::Table tab ) : 46 STSubTable(tab) 47 { 48 refpixCol_.attach(table_,"REFPIX"); 49 refvalCol_.attach(table_,"REFVAL"); 50 incrCol_.attach(table_,"INCREMENT"); 51 52 } 43 53 44 54 STFrequencies::~STFrequencies() 45 55 { 56 } 57 58 STFrequencies & asap::STFrequencies::operator =( const STFrequencies & other ) 59 { 60 if ( this != &other ) { 61 static_cast<STSubTable&>(*this) = other; 62 refpixCol_.attach(table_,"REFPIX"); 63 refvalCol_.attach(table_,"REFVAL"); 64 incrCol_.attach(table_,"INCREMENT"); 65 } 66 return *this; 46 67 } 47 68 … … 326 347 } 327 348 349 328 350 } // namespace -
trunk/src/STFrequencies.h
r847 r849 31 31 class STFrequencies : public STSubTable { 32 32 public: 33 STFrequencies( casa::Table::TableType tt = casa::Table::Memory); 33 STFrequencies() {;} 34 STFrequencies(casa::Table tab); 35 STFrequencies(const Scantable& parent); 34 36 35 virtual ~STFrequencies(); 37 virtual ~STFrequencies(); 38 39 STFrequencies& operator=(const STFrequencies& other); 40 36 41 /** 37 42 * Add a new Entry to the Frequency subtable. This checks for duplicates. -
trunk/src/STMolecules.cpp
r847 r849 28 28 const casa::String STMolecules::name_ = "MOLECULES"; 29 29 30 STMolecules::STMolecules(c asa::Table::TableType tt) :31 STSubTable( name_, tt)30 STMolecules::STMolecules(const Scantable& parent) : 31 STSubTable( parent, name_ ) 32 32 { 33 33 setup(); 34 34 } 35 35 36 asap::STMolecules::STMolecules( casa::Table tab ) : STSubTable(tab) 37 { 38 restfreqCol_.attach(table_,"RESTFREQUENCY"); 39 nameCol_.attach(table_,"NAME"); 40 formattednameCol_.attach(table_,"FORMATTEDNAME"); 41 } 36 42 37 43 STMolecules::~STMolecules() 38 44 { 45 } 46 47 STMolecules & asap::STMolecules::operator =( const STMolecules & other ) 48 { 49 if ( this != &other ) { 50 static_cast<STSubTable&>(*this) = other; 51 restfreqCol_.attach(table_,"RESTFREQUENCY"); 52 nameCol_.attach(table_,"NAME"); 53 formattednameCol_.attach(table_,"FORMATTEDNAME"); 54 } 55 return *this; 39 56 } 40 57 … … 101 118 } 102 119 103 } //namespace 120 121 }//namespace 122 -
trunk/src/STMolecules.h
r847 r849 29 29 class STMolecules : public STSubTable { 30 30 public: 31 STMolecules( casa::Table::TableType tt = casa::Table::Memory); 31 STMolecules() {;} 32 STMolecules(casa::Table tab); 33 STMolecules( const Scantable& parent); 32 34 33 35 virtual ~STMolecules(); 36 37 STMolecules& operator=(const STMolecules& other); 34 38 35 39 casa::uInt addEntry( casa::Double restfreq, const casa::String& name="", -
trunk/src/STSubTable.cpp
r808 r849 15 15 #include <tables/Tables/ScaColDesc.h> 16 16 17 #include "Scantable.h" 17 18 #include "STSubTable.h" 19 18 20 19 21 using namespace casa; … … 21 23 namespace asap { 22 24 23 STSubTable::STSubTable(const casa::String& name, casa::Table::TableType tt) : 24 type_(tt) 25 25 STSubTable::STSubTable( const Scantable& parent, const casa::String& name ) 26 26 { 27 27 TableDesc td("", "1", TableDesc::Scratch); 28 28 td.addColumn(ScalarColumnDesc<uInt>("ID")); 29 SetupNewTable aNewTab(name, td, Table::New); 30 table_ = Table(aNewTab, tableType()); 29 String tabname = parent.table().tableName()+"/"+name; 30 SetupNewTable aNewTab(tabname, td, Table::New); 31 table_ = Table(aNewTab, parent.table().tableType()); 31 32 idCol_.attach(table_,"ID"); 32 33 33 34 } 35 STSubTable::STSubTable(Table tab) 36 { 37 table_ = tab; 38 idCol_.attach(table_,"ID"); 39 } 40 34 41 35 42 STSubTable::~STSubTable() … … 37 44 } 38 45 46 STSubTable& asap::STSubTable::operator=( const STSubTable& other) 47 { 48 if (&other != this) { 49 this->table_ = other.table_; 50 idCol_.attach(this->table_,"ID"); 51 } 52 return *this; 39 53 } 54 55 56 } -
trunk/src/STSubTable.h
r808 r849 20 20 namespace asap { 21 21 22 class Scantable; 22 23 /** 23 24 Abstract base class for all subtables in the Scantable class. … … 29 30 class STSubTable : public SDLog { 30 31 public: 31 STSubTable( const casa::String& name, 32 casa::Table::TableType tt = casa::Table::Memory ); 32 STSubTable() {;} 33 STSubTable( casa::Table tab ); 34 STSubTable( const Scantable& parent, 35 const casa::String& name ); 33 36 34 37 virtual ~STSubTable(); 38 39 STSubTable& operator=(const STSubTable& other); 40 35 41 36 42 … … 51 57 casa::Table table() { return table_; } 52 58 53 casa::Table::TableType tableType() const { return type_; }54 55 59 protected: 56 60 casa::Table table_; … … 58 62 59 63 private: 60 casa::Table::TableType type_;61 62 64 }; 63 65 -
trunk/src/STTcal.cpp
r830 r849 1 1 2 // 2 3 // C++ Implementation: STTcal … … 29 30 const casa::String STTcal::name_ = "TCAL"; 30 31 31 STTcal::STTcal(c asa::Table::TableType tt) :32 STSubTable( name_, tt)32 STTcal::STTcal(const Scantable& parent) : 33 STSubTable( parent, name_ ) 33 34 { 34 35 setup(); 35 36 } 36 37 38 STTcal& asap::STTcal::operator =( const STTcal & other ) 39 { 40 if ( this != &other ) { 41 static_cast<STSubTable&>(*this) = other; 42 timeCol_.attach(table_,"TIME"); 43 tcalCol_.attach(table_,"TCAL"); 44 } 45 return *this; 46 } 47 48 asap::STTcal::STTcal( casa::Table tab ) : STSubTable(tab) 49 { 50 timeCol_.attach(table_,"TIME"); 51 tcalCol_.attach(table_,"TCAL"); 52 53 } 37 54 38 55 STTcal::~STTcal() … … 91 108 92 109 } //namespace 93 -
trunk/src/STTcal.h
r830 r849 30 30 class STTcal : public STSubTable { 31 31 public: 32 STTcal( casa::Table::TableType tt = casa::Table::Memory); 32 STTcal() {;} 33 STTcal(casa::Table tab); 34 STTcal( const Scantable& parent); 33 35 34 36 virtual ~STTcal(); 37 38 STTcal& operator=(const STTcal& other); 35 39 36 40 casa::uInt addEntry( const casa::String& time, -
trunk/src/STWeather.cpp
r830 r849 28 28 const casa::String STWeather::name_ = "WEATHER"; 29 29 30 STWeather::STWeather(c asa::Table::TableType tt) :31 STSubTable( name_, tt)30 STWeather::STWeather(const Scantable& parent) : 31 STSubTable( parent, name_ ) 32 32 { 33 33 setup(); … … 35 35 36 36 37 asap::STWeather::STWeather( casa::Table tab ) : STSubTable(tab) 38 { 39 temperatureCol_.attach(table_,"TEMPERATURE"); 40 pressureCol_.attach(table_,"PRESSURE"); 41 humidityCol_.attach(table_,"HUMIDITY"); 42 windspeedCol_.attach(table_,"WINDSPEED"); 43 windazCol_.attach(table_,"WINDAZ"); 44 45 } 46 37 47 STWeather::~STWeather() 38 48 { 39 49 } 50 51 STWeather & asap::STWeather::operator =( const STWeather & other ) 52 { 53 if ( this != &other ) { 54 static_cast<STSubTable&>(*this) = other; 55 temperatureCol_.attach(table_,"TEMPERATURE"); 56 pressureCol_.attach(table_,"PRESSURE"); 57 humidityCol_.attach(table_,"HUMIDITY"); 58 windspeedCol_.attach(table_,"WINDSPEED"); 59 windazCol_.attach(table_,"WINDAZ"); 60 } 61 return *this; 62 } 63 40 64 41 65 void asap::STWeather::setup( ) -
trunk/src/STWeather.h
r843 r849 29 29 class STWeather : public STSubTable { 30 30 public: 31 STWeather( casa::Table::TableType tt = casa::Table::Memory); 31 STWeather() {;} 32 STWeather(casa::Table tab); 33 STWeather( const Scantable& parent); 32 34 33 35 virtual ~STWeather(); 36 37 STWeather& operator=(const STWeather& other); 34 38 35 39 casa::uInt addEntry( casa::Float temperature, casa::Float pressure,
Note:
See TracChangeset
for help on using the changeset viewer.