CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | 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 
00096 #ifndef CS_TOKEN_LIST_TOKEN_PREFIX
00097 #define CS_TOKEN_LIST_TOKEN_PREFIX_DEFAULT
00098 
00102 #define CS_TOKEN_LIST_TOKEN_PREFIX XMLTOKEN_
00103 #endif
00104 
00105 #ifndef CS_TOKEN_LIST_TOKEN_LAST
00106 #define CS_TOKEN_LIST_TOKEN_LAST_DEFAULT
00107 
00111 #define CS_TOKEN_LIST_TOKEN_LAST TOKEN_COUNT
00112 #endif
00113 
00114 #undef CS_TOKEN_LIST_PASTE
00115 #undef CS_TOKEN_LIST_PASTE1
00116 #undef CS_TOKEN_LIST_TOKEN
00117 #undef CS_TOKEN_LIST_TOKEN_FINAL
00118 #define CS_TOKEN_LIST_PASTE(X,Y) CS_TOKEN_LIST_PASTE1(X,Y)
00119 #define CS_TOKEN_LIST_PASTE1(X,Y) X ## Y
00120 #define CS_TOKEN_LIST_TOKEN(X) \
00121   CS_TOKEN_LIST_PASTE(CS_TOKEN_LIST_TOKEN_PREFIX,X),
00122 #define CS_TOKEN_LIST_TOKEN_FINAL(X) \
00123   CS_TOKEN_LIST_PASTE(CS_TOKEN_LIST_TOKEN_PREFIX,X)
00124 
00125 enum {
00126 #include CS_TOKEN_ITEM_FILE
00127   CS_TOKEN_LIST_TOKEN_FINAL(CS_TOKEN_LIST_TOKEN_LAST)
00128 };
00129 
00130 #ifdef CS_TOKEN_LIST_TOKEN_LAST_DEFAULT
00131 #undef CS_TOKEN_LIST_TOKEN_LAST_DEFAULT
00132 #undef CS_TOKEN_LIST_TOKEN_LAST
00133 #endif
00134 
00135 #undef CS_TOKEN_LIST_TOKEN
00136 
00139 #define CS_TOKEN_LIST_TOKEN(X) s = #X; s.Downcase(); \
00140   t.Register(s, CS_TOKEN_LIST_PASTE(CS_TOKEN_LIST_TOKEN_PREFIX,X));
00141 
00142 #ifndef CS_INIT_TOKEN_TABLE_NAME
00143 #define CS_INIT_TOKEN_TABLE_NAME_DEFAULT
00144 
00148 #define CS_INIT_TOKEN_TABLE_NAME InitTokenTable
00149 #endif
00150   
00151 static void CS_INIT_TOKEN_TABLE_NAME(csStringHash& t)
00152 {
00153   csString s;
00154 #include CS_TOKEN_ITEM_FILE
00155 }
00156 #undef CS_TOKEN_LIST_TOKEN
00157 
00158 #ifdef CS_INIT_TOKEN_TABLE_NAME_DEFAULT
00159 #undef CS_INIT_TOKEN_TABLE_NAME
00160 #undef CS_INIT_TOKEN_TABLE_NAME_DEFAULT
00161 #endif
00162 
00163 #ifdef CS_TOKEN_LIST_TOKEN_PREFIX_DEFAULT
00164 #undef CS_TOKEN_LIST_TOKEN_PREFIX_DEFAULT
00165 #undef CS_TOKEN_LIST_TOKEN_PREFIX
00166 #endif
00167 

Generated for Crystal Space by doxygen 1.3.9.1