Changeset 2820 for trunk/src/STHistory.cpp
- Timestamp:
- 07/02/13 13:11:02 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STHistory.cpp
r2243 r2820 20 20 #include "STDefs.h" 21 21 #include "STHistory.h" 22 22 #include "MathUtils.h" 23 23 24 24 using namespace casa; … … 81 81 { 82 82 const Table& t = other.table(); 83 addEntry(asap::SEPERATOR); 84 TableCopy::copyRows(table_, t, table_.nrow(), 0, t.nrow()); 85 addEntry(asap::SEPERATOR); 83 if (other.nrow() > 0) { 84 addEntry(asap::SEPERATOR); 85 TableCopy::copyRows(table_, t, table_.nrow(), 0, t.nrow()); 86 addEntry(asap::SEPERATOR); 87 } 86 88 87 89 } 88 90 89 std::vector<std::string> asap::STHistory::getHistory( ) const 91 std::vector<std::string> asap::STHistory::getHistory( int nrow, 92 int start) const 90 93 { 91 std::vector<std::string> stlout; 92 for (uInt i=0; i<table_.nrow(); ++i) { 93 stlout.push_back(itemCol_(i)); 94 if (nrow < 0) { 95 nrow = this->nrow(); 94 96 } 95 return stlout; 97 AlwaysAssert(nrow <= this->nrow(), AipsError); 98 Vector<String> rows; 99 Slicer slice(IPosition(1, start), IPosition(1, nrow)); 100 101 rows = itemCol_.getColumnRange(slice); 102 return mathutil::tovectorstring(rows); 96 103 } 97 104 105 void asap::STHistory::drop() { 106 table_.removeRow(table_.rowNumbers()); 107 } 108 98 109 }
Note: See TracChangeset
for help on using the changeset viewer.