本文整理汇总了C++中nglString::Wipe方法的典型用法代码示例。如果您正苦于以下问题:C++ nglString::Wipe方法的具体用法?C++ nglString::Wipe怎么用?C++ nglString::Wipe使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nglString
的用法示例。
在下文中一共展示了nglString::Wipe方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetStatusReport
void nuiSocket::GetStatusReport(nglString& rResult)
{
nglCriticalSectionGuard g(gmCS);
rResult.Wipe();
rResult.Add("Total sockets created in session: ").Add(gmSocketCount).AddNewLine();
rResult.Add("Total current sockets...........: ").Add((int64)gmAllSockets.size()).AddNewLine();
rResult.AddNewLine();
for (std::set<nuiSocket*>::const_iterator it = gmAllSockets.begin(); it != gmAllSockets.end(); ++it)
{
nuiSocket* pSocket = *it;
rResult.Add("\t").Add(pSocket->GetDesc()).AddNewLine();
}
}
示例2: Dump
void nuiClass::Dump(nglString& rString) const
{
rString.Wipe();
// Class header:
rString.Add(_T("class ")).Add(mName).AddNewLine();
// Dump inheritances:
{
std::vector<nuiClass*>::const_iterator it = mParentClasses.begin();
std::vector<nuiClass*>::const_iterator end = mParentClasses.end();
while (it != end)
{
nuiClass* pClass = *it;
rString.Add(_T("\t: public ")).Add(pClass->GetName()).AddNewLine();
++it;
}
}
rString.Add(_T("{")).AddNewLine().Add(_T("public: // Construtors:")).AddNewLine();
// Dump Ctors:
{
std::set<nuiFunction*>::const_iterator it = mConstructors.begin();
std::set<nuiFunction*>::const_iterator end = mConstructors.end();
while (it != end)
{
std::vector<nglString> argstypes;
nuiFunction* pTypeContainer = *it;
pTypeContainer->DumpArgs(argstypes);
nglString args;
BuildTypeListString(1, argstypes, args);
rString.Add(_T("\t")).Add(mName).Add(_T("(")).Add(args).Add(_T(");")).AddNewLine();
++it;
}
}
rString.AddNewLine().Add(_T("public: // Methods:")).AddNewLine();
// Dump methods:
{
std::multimap<nglString, nuiFunction*>::const_iterator it = mMethods.begin();
std::multimap<nglString, nuiFunction*>::const_iterator end = mMethods.end();
while (it != end)
{
std::vector<nglString> argstypes;
nglString name(it->first);
nuiTypeContainer* pTypeContainer = it->second;
pTypeContainer->DumpArgs(argstypes);
nglString args;
BuildTypeListString(1, argstypes, args);
rString.Add(_T("\t")).Add(argstypes[0]).Add(" ").Add(name).Add(_T("(")).Add(args).Add(_T(");")).AddNewLine();
++it;
}
}
rString.Add(_T("};\n"));
}