casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TBKeyword.h
Go to the documentation of this file.
1 //# TBKeyword.h: Representation of a keyword attached to a table or field.
2 //# Copyright (C) 2005
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: $
27 #ifndef TBKEYWORD_H_
28 #define TBKEYWORD_H_
29 
31 
32 #include <casa/BasicSL/String.h>
33 
34 namespace casa {
35 
36 // <summary>
37 // Representation of a keyword attached to a table or field.
38 // <summary>
39 //
40 // <synopsis>
41 // A TBKeyword can be attached either to an entire table or to a specific field
42 // in a table. Keywords consist of a name, type, and value.
43 // </synopsis>
44 
45 class TBKeyword {
46 public:
47  // Constructor which takes the name, type, and value of the keyword.
48  // Optionally, a display value can also be entered. (For example, array
49  // keywords may not want to display their whole value.)
50  // TBKeyword(casacore::String name, casacore::String type, casacore::String value, casacore::String dispValue = "");
51 
53 
54  ~TBKeyword();
55 
56 
57  // Returns the name of this keyword.
59 
60  // Returns the type of this keyword.
62 
63  // Returns the value of this keyword.
64  TBData* getValue();
65 
66  // Returns the display value of this keyword. If no display value has been
67  // defined, the normal value is returned.
69 
70 private:
71  // Keyword name.
73 
74  // Keyword value.
76 };
77 
78 }
79 
80 #endif /* TBKEYWORD_H_ */
casacore::String getType()
Returns the type of this keyword.
casacore::Data types used for loaded data.
Definition: TBData.h:51
TBData * data
Keyword value.
Definition: TBKeyword.h:75
casacore::String name
Keyword name.
Definition: TBKeyword.h:72
casacore::String getDisplayValue()
Returns the display value of this keyword.
TBData * getValue()
Returns the value of this keyword.
TBKeyword(casacore::String name, TBData &data)
Constructor which takes the name, type, and value of the keyword.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Representation of a keyword attached to a table or field.
Definition: TBKeyword.h:45
casacore::String getName()
Returns the name of this keyword.