CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

tokenlist.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2003 by Jorrit Tyberghein
00003               (C) 2003 by Frank Richter
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00024 #include "csutil/strhash.h"
00025 
00098 #ifndef CS_TOKEN_LIST_TOKEN_PREFIX
00099 #define CS_TOKEN_LIST_TOKEN_PREFIX_DEFAULT
00100 
00104 #define CS_TOKEN_LIST_TOKEN_PREFIX XMLTOKEN_
00105 #endif
00106 
00107 #ifndef CS_TOKEN_LIST_TOKEN_LAST
00108 #define CS_TOKEN_LIST_TOKEN_LAST_DEFAULT
00109 
00113 #define CS_TOKEN_LIST_TOKEN_LAST TOKEN_COUNT
00114 #endif
00115 
00116 #undef CS_TOKEN_LIST_PASTE
00117 #undef CS_TOKEN_LIST_PASTE1
00118 #undef CS_TOKEN_LIST_TOKEN
00119 #undef CS_TOKEN_LIST_TOKEN_FINAL
00120 #define CS_TOKEN_LIST_PASTE(X,Y) CS_TOKEN_LIST_PASTE1(X,Y)
00121 #define CS_TOKEN_LIST_PASTE1(X,Y) X ## Y
00122 #define CS_TOKEN_LIST_TOKEN(X) \
00123   CS_TOKEN_LIST_PASTE(CS_TOKEN_LIST_TOKEN_PREFIX,X),
00124 #define CS_TOKEN_LIST_TOKEN_FINAL(X) \
00125   CS_TOKEN_LIST_PASTE(CS_TOKEN_LIST_TOKEN_PREFIX,X)
00126 
00127 enum {
00128 #include CS_TOKEN_ITEM_FILE
00129   CS_TOKEN_LIST_TOKEN_FINAL(CS_TOKEN_LIST_TOKEN_LAST)
00130 };
00131 
00132 #ifdef CS_TOKEN_LIST_TOKEN_LAST_DEFAULT
00133 #undef CS_TOKEN_LIST_TOKEN_LAST_DEFAULT
00134 #undef CS_TOKEN_LIST_TOKEN_LAST
00135 #endif
00136 
00137 #undef CS_TOKEN_LIST_TOKEN
00138 
00141 #define CS_TOKEN_LIST_TOKEN(X) s = #X; s.Downcase(); \
00142   t.Register(s, CS_TOKEN_LIST_PASTE(CS_TOKEN_LIST_TOKEN_PREFIX,X));
00143 
00144 #ifndef CS_INIT_TOKEN_TABLE_NAME
00145 #define CS_INIT_TOKEN_TABLE_NAME_DEFAULT
00146 
00150 #define CS_INIT_TOKEN_TABLE_NAME InitTokenTable
00151 #endif
00152   
00153 static void CS_INIT_TOKEN_TABLE_NAME(csStringHash& t)
00154 {
00155   csString s;
00156 #include CS_TOKEN_ITEM_FILE
00157 }
00158 #undef CS_TOKEN_LIST_TOKEN
00159 
00160 #ifdef CS_INIT_TOKEN_TABLE_NAME_DEFAULT
00161 #undef CS_INIT_TOKEN_TABLE_NAME
00162 #undef CS_INIT_TOKEN_TABLE_NAME_DEFAULT
00163 #endif
00164 
00165 #ifdef CS_TOKEN_LIST_TOKEN_PREFIX_DEFAULT
00166 #undef CS_TOKEN_LIST_TOKEN_PREFIX_DEFAULT
00167 #undef CS_TOKEN_LIST_TOKEN_PREFIX
00168 #endif
00169 

Generated for Crystal Space by doxygen 1.4.4