本文整理汇总了C++中nglString::GetStdString方法的典型用法代码示例。如果您正苦于以下问题:C++ nglString::GetStdString方法的具体用法?C++ nglString::GetStdString怎么用?C++ nglString::GetStdString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nglString
的用法示例。
在下文中一共展示了nglString::GetStdString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddFile
bool nuiZipWriter::AddFile(nglIStream* pStream, const nglString& rPathInZip, const nglString& rComment, bool OwnStream)
{
NGL_ASSERT(IsValid());
zip_fileinfo info;
nglTime tm;
nglTimeInfo t;
tm.GetLocalTime(t);
info.tmz_date.tm_sec = t.Seconds;
info.tmz_date.tm_min = t.Minutes;
info.tmz_date.tm_hour = t.Hours;
info.tmz_date.tm_mday = t.Day;
info.tmz_date.tm_mon = t.Month;
info.tmz_date.tm_year = t.Year;
info.dosDate = 0;
info.internal_fa = 0;
info.external_fa = 0;
bool res = zipOpenNewFileInZip(mpZip, rPathInZip.IsNull() ? NULL : rPathInZip.GetStdString().c_str(), &info, NULL, 0, NULL, 0, rComment.IsNull() ? NULL : rComment.GetStdString().c_str(), 0, 0) == Z_OK;
if (!res)
return res;
const uint32 bufsize = 4096;
uint8 buf[bufsize];
uint64 todo = pStream->Available();
uint32 _read = -1;
while (todo && _read)
{
uint32 toread = MIN(todo, bufsize);
_read = pStream->Read(buf, toread, 1);
res = zipWriteInFileInZip(mpZip, buf, _read) == Z_OK;
todo -= _read;
if (_read != toread)
return false;
}
res = zipCloseFileInZip(mpZip) == Z_OK;
if (OwnStream)
delete pStream;
return res;
}
示例2: SetFrame
void nuiSWF::SetFrame(const nglString& rName)
{
NGL_ASSERT(mpMovie && mpMovieInterface);
std::string tmp(rName.GetStdString());
mpMovieInterface->goto_labeled_frame(tmp.c_str());
}
示例3:
//class nuiClass:
nuiClass::nuiClass(const nglString& rName)
{
mName = rName;
mCName = rName.GetStdString();
}
示例4: Close
bool nuiZipWriter::Close(const nglString& rComment)
{
NGL_ASSERT(mpZip);
return Z_OK == zipClose(mpZip, rComment.IsNull() ? NULL : rComment.GetStdString().c_str());
mpZip = NULL;
}