00001 /* Copyright (C) 2000, 2001 Stefan Buehler <sbuehler@uni-bremen.de> 00002 00003 This program is free software; you can redistribute it and/or modify it 00004 under the terms of the GNU General Public License as published by the 00005 Free Software Foundation; either version 2, or (at your option) any 00006 later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 00016 USA. */ 00017 00028 #ifndef wsv_aux_h 00029 #define wsv_aux_h 00030 00031 #include "auto_wsv_groups.h" 00032 00041 template<class T> 00042 class WsvPointer : public WsvP { 00043 public: 00044 WsvPointer(T* x) : mx(x) { /* Nothing to do here. */ }; 00045 operator T*() { return mx; } 00046 private: 00047 T* mx; 00048 }; 00049 00050 00051 00060 class WsvRecord { 00061 public: 00062 00064 WsvRecord(){}; 00065 00070 WsvRecord(const char name[], 00071 const char description[], 00072 const Index group) 00073 : mname(name), 00074 mdescription(description), 00075 mgroup(group) 00076 { 00077 // Nothing to do here. 00078 } 00080 const String& Name() const { return mname; } 00082 const String& Description() const { return mdescription; } 00084 const Index Group() const { return mgroup; } 00085 private: 00086 String mname; 00087 String mdescription; 00088 Index mgroup; 00089 }; 00090 00093 ostream& operator<<(ostream& os, const WsvRecord& wr); 00094 00095 00104 void define_wsv_data(); 00105 00110 void define_wsv_map(); 00111 00112 00113 #endif // wsv_aux_h