Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxClassName.h

00001 /*
00002  *  Copyright (c) 1999, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *
00006  *  Author(s):
00007  *  Edo Poll                (poll@wins.uva.nl)
00008  *  Marc Navarro            (mnavarro@wins.uva.nl)
00009  */
00010 
00011 
00012 #ifndef HxClassName_h
00013 #define HxClassName_h
00014 
00015 #include "HxString.h"
00016 
00017 
00023 template <class Type>
00024 struct HxClassName 
00025 {
00027     operator HxString();
00028 };
00029 
00030 template <class Type>
00031 inline
00032 HxClassName<Type>::operator HxString()
00033 {
00034     return Type::className();
00035 }
00036 
00037 template<>
00038 struct HxClassName<short> {
00039     operator HxString() {
00040         HxString name("short"); // ADB Feb 14th (killed static)
00041         return name;
00042     }
00043 };
00044 
00045 template<>
00046 struct HxClassName<int> {
00047     operator HxString() {
00048         HxString name("int"); // ADB Feb 14th (killed static)
00049         return name;
00050     }
00051 };
00052 
00053 template<>
00054 struct HxClassName<float> {
00055     operator HxString() {
00056         HxString name("float"); // ADB Feb 14th (killed static)
00057         return name;
00058     }
00059 };
00060 
00061 template<>
00062 struct HxClassName<double> {
00063     operator HxString() {
00064         HxString name("double"); // ADB Feb 14th (killed static)
00065         return name;
00066     }
00067 };
00068 
00069 #endif

Generated on Mon Jan 27 15:48:41 2003 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001