📄 mingletinyxml.cpp
字号:
// ___ ___ ___ ___ ___ // /\__\ ___ /\__\ /\ \ /\__\ /\ \. // /::| | /\ \ /::| | /::\ \ /:/ / /::\ \. // /:|:| | \:\ \ /:|:| | /:/\:\ \ /:/ / /:/\:\ \. // /:/|:|__|__ /::\__\ /:/|:| |__ /:/ \:\ \ /:/ / /::\~\:\ \. // /:/ |::::\__\ __/:/\/__/ /:/ |:| /\__\ /:/__/_\:\__\ /:/__/ /:/\:\ \:\__\.// \/__/~~/:/ / /\/:/ / \/__|:|/:/ / \:\ /\ \/__/ \:\ \ \:\~\:\ \/__/// /:/ / \::/__/ |:/:/ / \:\ \:\__\ \:\ \ \:\ \:\__\. // /:/ / \:\__\ |::/ / \:\/:/ / \:\ \ \:\ \/__/ // /:/ / \/__/ /:/ / \::/ / \:\__\ \:\__\. // \/__/ \/__/ \/__/ \/__/ \/__/ // // =============================================================================// Minimalist OpenGL Environment// =============================================================================//// This file is part of Minimalist OpenGL Environment (MinGLE)//// Version: 0.2.0// Author: Balazs Domonkos// Filename: src/tinyxml/src/MingleTinyXml.cpp// Creation Date: January 27th 2008// Revision Date: January 27th 2008////// The Minimalist OpenGL Environment is free software: you can// redistribute it and/or modify it under the terms of the GNU// General Public License as published by the Free Software// Foundation, either version 3 of the License, or (at your// option) any later version.//// The Minimalist OpenGL Environment is distributed in the hope// that it will be useful, but WITHOUT ANY WARRANTY; without// even the implied warranty of MERCHANTABILITY or FITNESS FOR// A PARTICULAR PURPOSE. See the GNU General Public License// for more details.//// You should have received a copy of the GNU General Public License// along with Minimalist OpenGL Environment. If not, see // <http://www.gnu.org/licenses/>. See the COPYING file included // with this distribution file for license details.///// @file MingleTinyXml.cpp/// MinGLE wrapper for TinyXML// Header that contains the declaration#include <MingleTinyXml.h>namespace MinGLE {TiXmlDocument *TinyXML::createXML(const std::string &version, const std::string &encoding, const std::string &standalone) { TiXmlDocument *doc = new TiXmlDocument(); TiXmlDeclaration *decl = new TiXmlDeclaration(version.c_str(), encoding.c_str(), standalone.c_str()); doc->LinkEndChild(decl); return doc;}TiXmlDocument *TinyXML::loadXML(const std::string& filename, VirtualFileSystem *vfs) { char *xmlSource = vfs->readFileAsString(filename); TiXmlDocument *doc = new TiXmlDocument(); doc->Parse(xmlSource); delete [] xmlSource; return doc;}TiXmlDocument *TinyXML::loadXML(const std::string& blockName, const std::string& filename) { return loadXML(filename, System::getVirtualFileSystemForFile(blockName, filename));}void TinyXML::saveXML(TiXmlDocument *document, const std::string& filename, VirtualFileSystem *vfs) { // Save XML document: TODO serialize and save using vfs document->SaveFile(filename.c_str());}} // namespace MinGLE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -