Main Page   Class Overview   Pixels   Images   Geometry   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 template <class Type>
00018 struct HxClassName 
00019 {
00020     operator HxString();
00021 };
00022 
00023 template <class Type>
00024 inline
00025 HxClassName<Type>::operator HxString()
00026 {
00027     return Type::className();
00028 }
00029 
00030 template<>
00031 struct HxClassName<short> {
00032     operator HxString() {
00033         HxString name("short"); // ADB Feb 14th (killed static)
00034         return name;
00035     }
00036 };
00037 
00038 template<>
00039 struct HxClassName<int> {
00040     operator HxString() {
00041         HxString name("int"); // ADB Feb 14th (killed static)
00042         return name;
00043     }
00044 };
00045 
00046 template<>
00047 struct HxClassName<float> {
00048     operator HxString() {
00049         HxString name("float"); // ADB Feb 14th (killed static)
00050         return name;
00051     }
00052 };
00053 
00054 template<>
00055 struct HxClassName<double> {
00056     operator HxString() {
00057         HxString name("double"); // ADB Feb 14th (killed static)
00058         return name;
00059     }
00060 };
00061 
00062 #endif

Generated on Tue Jan 8 13:59:11 2002 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001