casa
$Rev:20696$
|
00001 //# ValType.h: The id-string of a value type 00002 //# Copyright (C) 1993,1994,1995,1996,1998,2000 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: ValTypeId.h 20551 2009-03-25 00:11:33Z Malte.Marquarding $ 00027 00028 #ifndef CASA_VALTYPEID_H 00029 #define CASA_VALTYPEID_H 00030 00031 #include <casa/Utilities/ValType.h> 00032 00033 namespace casa { //# NAMESPACE CASA - BEGIN 00034 00035 // <summary> 00036 // The id-string of a value type 00037 // </summary> 00038 00039 // <use visibility=export> 00040 // <reviewed reviewer="Friso Olnon" date="1995/03/20" tests="" demos=""> 00041 // </reviewed> 00042 00043 // <prerequisite> 00044 // <li> class <linkto class=ValType">ValType</linkto> 00045 // </prerequisite> 00046 00047 // <synopsis> 00048 // The templated global functions valDataTypeId get the data type id string 00049 // of the given type. 00050 // For standard types this is the ValType data type string. 00051 // For other types (i.e. classes) it is the result of the class dataTypeId 00052 // function. 00053 // </synopsis> 00054 00055 // <group name=typeid> 00056 00057 template<class T> inline String valDataTypeId (const T*) 00058 { return T::dataTypeId(); } 00059 inline String valDataTypeId (const Bool* obj) 00060 { return ValType::getTypeStr (obj); } 00061 inline String valDataTypeId (const Char* obj) 00062 { return ValType::getTypeStr (obj); } 00063 inline String valDataTypeId (const uChar* obj) 00064 { return ValType::getTypeStr (obj); } 00065 inline String valDataTypeId (const Short* obj) 00066 { return ValType::getTypeStr (obj); } 00067 inline String valDataTypeId (const uShort* obj) 00068 { return ValType::getTypeStr (obj); } 00069 inline String valDataTypeId (const Int* obj) 00070 { return ValType::getTypeStr (obj); } 00071 inline String valDataTypeId (const uInt* obj) 00072 { return ValType::getTypeStr (obj); } 00073 inline String valDataTypeId (const float* obj) 00074 { return ValType::getTypeStr (obj); } 00075 inline String valDataTypeId (const double* obj) 00076 { return ValType::getTypeStr (obj); } 00077 inline String valDataTypeId (const Complex* obj) 00078 { return ValType::getTypeStr (obj); } 00079 inline String valDataTypeId (const DComplex* obj) 00080 { return ValType::getTypeStr (obj); } 00081 inline String valDataTypeId (const String* obj) 00082 { return ValType::getTypeStr (obj); } 00083 inline String valDataTypeId (const TableRecord* obj) 00084 { return ValType::getTypeStr (obj); } 00085 00086 // </group> 00087 00088 } //# NAMESPACE CASA - END 00089 00090 #endif 00091 00092 00093