www.pudn.com > uoth_src.zip > CharMap.h


#ifndef DSSI_CHARMAP_H 
#define DSSI_CHARMAP_H 
 
//----------------------------------------------------------------------------- 
//  
// @doc 
// 
// @module	CharMap.h - Character map information | 
// 
// This module contains the character map information 
// 
// Copyright (c) 2002 - Descartes Systems Sciences, Inc. 
// 
// @end 
// 
// $History: ExpatImpl.h $ 
//       
//----------------------------------------------------------------------------- 
 
//----------------------------------------------------------------------------- 
// 
// Required include files 
// 
//----------------------------------------------------------------------------- 
 
#include  
#include "ExpatImpl.h" 
 
//----------------------------------------------------------------------------- 
// 
// Forward definitions 
// 
//----------------------------------------------------------------------------- 
 
class CDataParser; 
 
//----------------------------------------------------------------------------- 
// 
// Class definition 
// 
//----------------------------------------------------------------------------- 
 
class CCharMap 
{ 
public: 
 
	enum _Element 
	{ 
		Unknown			= 0, 
		CharMap			= 1, 
		Name			= 2, 
		Treasures		= 3, 
	}; 
 
	enum _Constants 
	{ 
		Max_Runes		= 16, 
	}; 
 
// @access Constructors and destructors 
public: 
 
	// @cmember General constructor 
 
	CCharMap (); 
 
	// @cmember General destructor 
 
	~CCharMap (); 
 
// @cmember Public methods 
public: 
 
	// @cmember Initialize 
 
	void Init (bool fConstruct); 
 
	// @cmember Start a treasure 
 
	void OnStart (CDataParser *pParser, const XML_Char **papszAttrs); 
 
	// @cmember Start an XML element 
 
	void OnStartElement (CDataParser *pParser,  
		const XML_Char *pszName, const XML_Char **papszAttrs); 
 
	// @cmember End an XML element 
 
	void OnEndElement (CDataParser *pParser,  
		const XML_Char *pszName); 
 
// @access Protected methods 
protected: 
 
	// @cmember Get the element number 
 
	_Element GetElement (const XML_Char *pszName); 
 
// @access Public members 
public: 
	std::string			m_strName; 
	int					m_anRunes [Max_Runes]; 
	int					m_nRunes; 
}; 
 
 
#endif // DSSI_CHARMAP_H