本文整理汇总了C++中platform::FileManagerPtr::GetAnsiFileString方法的典型用法代码示例。如果您正苦于以下问题:C++ FileManagerPtr::GetAnsiFileString方法的具体用法?C++ FileManagerPtr::GetAnsiFileString怎么用?C++ FileManagerPtr::GetAnsiFileString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类platform::FileManagerPtr
的用法示例。
在下文中一共展示了FileManagerPtr::GetAnsiFileString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: file
ETH_WINDOW_ENML_FILE::ETH_WINDOW_ENML_FILE(const str_type::string& fileName, const Platform::FileManagerPtr& fileManager) :
width(640),
height(480),
windowed(true),
vsync(true),
title(GS_L("Ethanon Engine")),
richLighting(true)
{
str_type::string out;
fileManager->GetAnsiFileString(fileName, out);
enml::File file(out);
if (file.getError() == enml::enmlevSUCCESS)
{
file.getUInt(GS_L("window"), GS_L("width"), &width);
file.getUInt(GS_L("window"), GS_L("height"), &height);
windowed = ETHGlobal::IsTrue(file.get(GS_L("window"), GS_L("windowed")));
vsync = ETHGlobal::IsTrue(file.get(GS_L("window"), GS_L("vsync")));
const str_type::string newTitle = file.get(GS_L("window"), GS_L("title"));
richLighting = ETHGlobal::IsTrue(file.get(GS_L("rendering"), GS_L("richLighting")));
title = newTitle.empty() ? title : newTitle;
densityManager.FillParametersFromFile(file);
}
else
{
#ifdef GS2D_STR_TYPE_WCHAR
std::wcerr
#else
std::cerr
#endif
<< file.getErrorString() << std::endl;
}
}
示例2: file
ETH_WINDOW_ENML_FILE::ETH_WINDOW_ENML_FILE(const str_type::string& fileName, const Platform::FileManagerPtr& fileManager)
{
width = 640;
height = 480;
windowed = true;
vsync = true;
title = GS_L("Ethanon Engine");
str_type::string out;
fileManager->GetAnsiFileString(fileName, out);
enml::File file(out);
if (file.getError() == enml::enmlevSUCCESS)
{
file.getUInt(GS_L("window"), GS_L("width"), &width);
file.getUInt(GS_L("window"), GS_L("height"), &height);
windowed = (file.get(GS_L("window"), GS_L("windowed")) == GS_L("false")) ? false : true;
vsync = (file.get(GS_L("window"), GS_L("vsync")) == GS_L("false")) ? false : true;
const str_type::string newTitle = file.get(GS_L("window"), GS_L("title"));
title = newTitle.empty() ? title : newTitle;
}
else
{
#ifdef GS2D_STR_TYPE_WCHAR
std::wcerr
#else
std::cerr
#endif
<< file.getErrorString() << std::endl;
}
}