00001 /* 00002 ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl. 00003 ** 00004 ** Copyright (C) 2006 The TBT Team. 00005 ** 00006 ** This program is free software; you can redistribute it and/or 00007 ** modify it under the terms of the GNU General Public License 00008 ** as published by the Free Software Foundation; either version 2 00009 ** of the License, or (at your option) any later version. 00010 ** 00011 ** The complete GNU General Public Licence Notice can be found as the 00012 ** `NOTICE' file in the root directory. 00013 ** 00014 ** The TBT Team consists of people listed in the `AUTHORS' file. 00015 */ 00016 #ifndef RACEHANDLER_HH_ 00017 #define RACEHANDLER_HH_ 00018 00019 #include <xercesc/sax/HandlerBase.hpp> 00020 #include <vector> 00021 #include <string> 00022 #include "common/Race.hh" 00023 00024 XERCES_CPP_NAMESPACE_USE 00025 00026 00027 class RaceHandler : public HandlerBase 00028 { 00029 00030 public : 00031 static std::vector<Race> vRaces_; 00032 static char* BBversion_; 00033 00034 // ----------------------------------------------------------------------- 00035 // Constructors 00036 // ----------------------------------------------------------------------- 00037 RaceHandler(); 00038 ~RaceHandler(); 00039 00040 // ----------------------------------------------------------------------- 00041 // Handlers for the SAX DocumentHandler interface 00042 // ----------------------------------------------------------------------- 00043 void startElement(const XMLCh* const name, AttributeList& attributes); 00044 void characters(const XMLCh* const chars, const unsigned int length); 00045 void endElement(const XMLCh* const name); 00046 00047 private: 00048 // ----------------------------------------------------------------------- 00049 // Private data members 00050 // ----------------------------------------------------------------------- 00051 std::string currentNode_; 00052 Race* currentRace_; 00053 Position* currentPos_; 00054 }; 00055 00056 #endif /*RACEHANDLER_HH_*/
1.4.7