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(); } }
void nuiBindingManager::Dump(nglString& rString) const { //std::map<nglString, nuiFunction*> mFunctions; // Dump functions: { FunctionMap::const_iterator it = mFunctions.begin(); FunctionMap::const_iterator end = mFunctions.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(argstypes[0]).Add(" ").Add(name).Add(_T("(")).Add(args).Add(_T(");")).AddNewLine(); ++it; } } // Classes: TypeMap::const_iterator it = mTypes.begin(); TypeMap::const_iterator end = mTypes.end(); while (it != end) { nuiClass* pClass = it->second; nglString name = pClass->GetName(); nglString classdump; pClass->Dump(classdump); rString.AddNewLine().AddNewLine().Add(classdump); ++it; } }
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")); }