bool ETHEntityProperties::SaveToFile(const str_type::string& filePath) { TiXmlDocument doc; TiXmlDeclaration *pDecl = new TiXmlDeclaration(GS_L("1.0"), GS_L(""), GS_L("")); doc.LinkEndChild(pDecl); TiXmlElement *pElement = new TiXmlElement(GS_L("Ethanon")); doc.LinkEndChild(pElement); WriteToXMLFile(doc.RootElement()); doc.SaveFile(filePath); return true; }
bool ETHEntityProperties::SaveToFile(const str_type::string& filePath, const Platform::FileManagerPtr& fileManager) { GS2D_UNUSED_ARGUMENT(fileManager); TiXmlDocument doc; TiXmlDeclaration *pDecl = new TiXmlDeclaration(GS_L("1.0"), GS_L(""), GS_L("")); doc.LinkEndChild(pDecl); TiXmlElement *pElement = new TiXmlElement(GS_L("Ethanon")); doc.LinkEndChild(pElement); WriteToXMLFile(doc.RootElement()); doc.SaveFile(filePath); #ifdef GS2D_STR_TYPE_ANSI fileManager->ConvertAnsiFileToUTF16LE(filePath); #endif return true; }