source: trunk/src/STHistory.h@ 3117

Last change on this file since 3117 was 3106, checked in by Takeshi Nakazato, 8 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes/No

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...


Check-in asap modifications from Jim regarding casacore namespace conversion.

File size: 1.6 KB
Line 
1//
2// C++ Interface: STHistory
3//
4// Description:
5//
6//
7// Author: Malte Marquarding <asap@atnf.csiro.au>, (C) 2006
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef ASAPSTHISTORY_H
13#define ASAPSTHISTORY_H
14
15#include <casa/aips.h>
16#include <casa/BasicSL/String.h>
17#include <tables/Tables/Table.h>
18#include <tables/Tables/ScalarColumn.h>
19
20#include "STSubTable.h"
21
22namespace asap {
23
24/**
25The History subtable of the Scantable
26
27@author Malte Marquarding
28*/
29class STHistory : public STSubTable {
30public:
31 STHistory() {;}
32 explicit STHistory(casacore::Table tab);
33 explicit STHistory( const Scantable& parent );
34
35 virtual ~STHistory();
36
37 STHistory& operator=(const STHistory& other);
38
39 /**
40 * add another row to this table
41 * @param item the histor string
42 * @return an ID (irrelevant)
43 */
44 casacore::uInt addEntry( const casacore::String& item);
45
46 /**
47 * Just for consistency sake, doesn't do anything
48 * as IDs are irrelevant in this class
49 * @param item a string
50 * @param id an uInt ID
51 */
52 void getEntry( casacore::String& item, casacore::uInt id);
53
54 /**
55 * add all rows from another STHistory table
56 * @param other a STHistory reference
57 */
58 void append(const STHistory& other);
59
60 /**
61 * Get all rows in the table as a vector
62 * @return a vector of strings
63 */
64 std::vector<std::string> getHistory(int nrow=-1, int start=0 ) const;
65
66 const casacore::String& name() const { return name_; }
67
68 int nrow() const { return table_.nrow(); }
69
70
71 void drop();
72
73private:
74 void setup();
75 static const casacore::String name_;
76 casacore::ScalarColumn<casacore::String> itemCol_;
77};
78
79}
80
81#endif
Note: See TracBrowser for help on using the repository browser.