📄 xmlparser.h
字号:
// ***************************************************************
// XMLParser version: 1.0
// -------------------------------------------------------------
// File Name: XMLParser.h
// Created: 2007/07/18
// Modified: 2007/07/18 14:56
// Author: William.Liang
// Msn: lwq49@msn.com
// Email: lwq49@21cn.com, lwq49@msn.com
// Description:
//
// Purpose:
// -------------------------------------------------------------
// license:
//
// The contents of this file are subject to the Mozilla Public
// License Version 1.1 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy
// of the License at http://www.mozilla.org/MPL/ Software dis-
// tributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or im-
// plied. See the License for the specific language governing
// rights and limitations under the License.
//
// The Initial Developer of the Original Code is William.Liang .
// Copyright (C) 2007 - All Rights Reserved.
// ***************************************************************
#ifndef XML_PARSER_HEAD_FILE
#define XML_PARSER_HEAD_FILE
#pragma once
//#include ".\ComService.h"
#include "GameFrame.h"
#include "..\Common\tinyxml.h"
typedef CListTemplate<_CString, _CString> _CStringList;
interface IGameLayouterSink;
//***************************************************************
// <p>XML文件分析类</p>
// 负责读取XML并枚举所有结点,并在每个结点处理中调用回调处理
// 类,由回调处理类对结点进行个别处理。
//***************************************************************
class GAME_FRAME_CLASS CXMLParser
{
private:
TiXmlDocument m_XmlDocument; //XML接口
IGameLayouterSink* m_pGameLayouterSink; //布局管理接口
bool m_bIsAsync; //异步操作
public:
CXMLParser();
virtual ~CXMLParser(void);
public:
//加载XML文件
bool LoadXmlFromFile(LPCTSTR lpFileName="OGF.xml", bool bIsAsync=false);
//分解处理
bool Parse(TiXmlNode* pNode=NULL);
//设置布局接口
void SetLayouterSink(IGameLayouterSink* pGameLayouterSink);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -