casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TBKeyword.h
Go to the documentation of this file.
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 #include <casa/namespace.h>
00035 
00036 namespace casa {
00037 
00038 // <summary>
00039 // Representation of a keyword attached to a table or field.
00040 // <summary>
00041 //
00042 // <synopsis>
00043 // A TBKeyword can be attached either to an entire table or to a specific field
00044 // in a table.  Keywords consist of a name, type, and value.
00045 // </synopsis>
00046 
00047 class TBKeyword {
00048 public:
00049     // Constructor which takes the name, type, and value of the keyword.
00050     // Optionally, a display value can also be entered.  (For example, array
00051     // keywords may not want to display their whole value.)
00052     // TBKeyword(String name, String type, String value, String dispValue = "");
00053     
00054     TBKeyword(String name, TBData& data);
00055 
00056     ~TBKeyword();
00057 
00058     
00059     // Returns the name of this keyword.
00060     String getName();
00061 
00062     // Returns the type of this keyword.
00063     String getType();
00064 
00065     // Returns the value of this keyword.
00066     TBData* getValue();
00067 
00068     // Returns the display value of this keyword.  If no display value has been
00069     // defined, the normal value is returned.
00070     String getDisplayValue();
00071     
00072 private:
00073     // Keyword name.
00074     String name;
00075 
00076     // Keyword value.
00077     TBData* data;
00078 };
00079 
00080 }
00081 
00082 #endif /* TBKEYWORD_H_ */