本文整理汇总了C++中TFile::WriteS方法的典型用法代码示例。如果您正苦于以下问题:C++ TFile::WriteS方法的具体用法?C++ TFile::WriteS怎么用?C++ TFile::WriteS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFile
的用法示例。
在下文中一共展示了TFile::WriteS方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveXMLServidores
//-----------------------------------------------------------------------------
//::::::::::::::::::::::::::::::::::FICHERO XML::::::::::::::::::::::::::::::::::
//-----------------------------------------------------------------------------
void TAdministradora :: SaveXMLServidores(TGLinkedList* pList, AnsiString pFileName)
{
TFile* fOut = new TFile(pFileName);
fOut->Open("wt");
fOut->WriteS("<?xml version=\"1.0\"?>");
fOut->WriteS("\n");
fOut->WriteS("<XML>");
fOut->WriteS("\n"); //bien hasta aqui
fOut->WriteS("<SERVERS>");
fOut->WriteS("\n");
for (int i = 0; i < pList->Length(); i++)
{
TServidor* server = (TServidor*)pList->ItemInfo(i);
fOut->WriteS("<SERVER>");
fOut->WriteS("\n");
fOut->WriteS("<NAME_SERVER>");
fOut->WriteS("\n");
fOut->WriteS(server->NameDomain().c_str());
fOut->WriteS("\n");
fOut->WriteS("</NAME_SERVER>");
fOut->WriteS("\n");
fOut->WriteS("<TOP_ACCOUNTS>");
fOut->WriteS("\n");
fOut->WriteS(IntToStr(server->Tope()).c_str());
fOut->WriteS("\n");
fOut->WriteS("</TOP_ACCOUNTS>");
fOut->WriteS("\n");
fOut->WriteS("<LENGTH_EMAIL>");
fOut->WriteS("\n");
fOut->WriteS(IntToStr(server->Max()).c_str());
fOut->WriteS("\n");
fOut->WriteS("</LENGTH_EMAIL>");
fOut->WriteS("\n");
fOut->WriteS("<ACCOUNTS>");
fOut->WriteS("\n");
for(int j = 0; j < server->Cuentas()->Length();j++)
{
TCuenta* cuenta = (TCuenta*)server->Cuentas()->ItemInfo(j);
fOut->WriteS("<ACCOUNT>");
fOut->WriteS("\n");
fOut->WriteS("<USER>");
fOut->WriteS("\n");
fOut->WriteS(cuenta->Usuario().c_str());
fOut->WriteS("\n");
fOut->WriteS("</USER>");
fOut->WriteS("\n");
fOut->WriteS("<CUOTA>");
fOut->WriteS("\n");
fOut->WriteS(IntToStr(cuenta->Cuota()).c_str());
fOut->WriteS("\n");
fOut->WriteS("</CUOTA>");
fOut->WriteS("\n");
fOut->WriteS("<PERSON>");
fOut->WriteS("\n");
fOut->WriteS("<NAME>");
fOut->WriteS("\n");
fOut->WriteS(cuenta->Person()->Name().c_str());
fOut->WriteS("\n");
fOut->WriteS("</NAME>");
fOut->WriteS("\n");
fOut->WriteS("<APELLIDOS>");
fOut->WriteS("\n");
fOut->WriteS(cuenta->Person()->Apellidos().c_str());
fOut->WriteS("\n");
fOut->WriteS("</APELLIDOS>");
//.........这里部分代码省略.........