xml_team.hh

00001 /*
00002 ** TowBowlTactics, a turn-based strategy football game.
00003 **
00004 ** Copyright (C) 2006-2010 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 
00017 #ifndef XML_TEAM_HH_
00018 # define XML_TEAM_HH_
00019 
00020 # include <xercesc/sax/EntityResolver.hpp>
00021 # include "xml/xml.hh"
00022 
00023 BEGIN_NS(xml);
00024 
00031 class XMLTeam : public XML
00032 {
00033 public:
00034   XMLTeam(const std::string& schema_path);
00035 
00036   void switchToTeamGlobals();
00037   bool switchToPlayer(int index);
00038 
00039 protected:
00040   virtual const char* getExpectedRoot() const;
00041   virtual void initXMLInternal();
00042 
00043   std::string schema_path_;
00044 };
00045 
00046 
00047 class XMLTeamEntityResolver : public xercesc::EntityResolver
00048 {
00049 public:
00050   XMLTeamEntityResolver(const std::string& schema_path);
00051   xercesc::InputSource* resolveEntity(const XMLCh* const, const XMLCh* const);
00052 
00053 private:
00054   std::string schema_path_;
00055 }; 
00056 
00057 
00058 END_NS(xml);
00059 
00060 #endif /* !XML_TEAM_HH_ */
Generated on Mon Apr 5 21:17:14 2010 for Stechec/TBT by  doxygen 1.6.3