00001 //# TBKeyword.h: Representation of a keyword attached to a table or field. 00002 //# Copyright (C) 2005 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Id: $ 00027 #ifndef TBKEYWORD_H_ 00028 #define TBKEYWORD_H_ 00029 00030 #include <casaqt/QtBrowser/TBData.h> 00031 00032 #include <casa/BasicSL/String.h> 00033 00034 namespace casa { 00035 00036 // <summary> 00037 // Representation of a keyword attached to a table or field. 00038 // <summary> 00039 // 00040 // <synopsis> 00041 // A TBKeyword can be attached either to an entire table or to a specific field 00042 // in a table. Keywords consist of a name, type, and value. 00043 // </synopsis> 00044 00045 class TBKeyword { 00046 public: 00047 // Constructor which takes the name, type, and value of the keyword. 00048 // Optionally, a display value can also be entered. (For example, array 00049 // keywords may not want to display their whole value.) 00050 // TBKeyword(String name, String type, String value, String dispValue = ""); 00051 00052 TBKeyword(String name, TBData& data); 00053 00054 ~TBKeyword(); 00055 00056 00057 // Returns the name of this keyword. 00058 String getName(); 00059 00060 // Returns the type of this keyword. 00061 String getType(); 00062 00063 // Returns the value of this keyword. 00064 TBData* getValue(); 00065 00066 // Returns the display value of this keyword. If no display value has been 00067 // defined, the normal value is returned. 00068 String getDisplayValue(); 00069 00070 private: 00071 // Keyword name. 00072 String name; 00073 00074 // Keyword value. 00075 TBData* data; 00076 }; 00077 00078 } 00079 00080 #endif /* TBKEYWORD_H_ */