当前位置: 首页>>代码示例>>C++>>正文


C++ TFileStream::WriteBuffer方法代码示例

本文整理汇总了C++中TFileStream::WriteBuffer方法的典型用法代码示例。如果您正苦于以下问题:C++ TFileStream::WriteBuffer方法的具体用法?C++ TFileStream::WriteBuffer怎么用?C++ TFileStream::WriteBuffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TFileStream的用法示例。


在下文中一共展示了TFileStream::WriteBuffer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: TFileStream

//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
 AnsiString s;
 TFileStream* fs;
 int i;

 s = "";
 if (lbTables->SelCount > 0)
  for (i = 0; i < lbTables->Items->Count; i++)
   if (lbTables->Selected[i])
    {
     ACRTable1->TableName = lbTables->Items->Strings[i];
     s = s + ACRTable1->ExportTableToSQL(
      cbExportStructure->Checked,
      cbAddDROPTable->Checked,
      cbExportIndexes->Checked,
      cbAddDROPIndex->Checked,
      cbExportData->Checked,
      cbExportBLOBFields->Checked,
      cbUseBrackets->Checked);
    };
 Memo1->Text = s;
 fs = new TFileStream("test.sql",fmCreate);
 fs->WriteBuffer(&s[1],s.Length());
 delete fs;
}
开发者ID:vagabond1132,项目名称:Code,代码行数:27,代码来源:Unit1.cpp

示例2: RecreateSections

void TUserIniFile::RecreateSections()
{
  const String CR = "\n";
  String* S;
  TFileStream* FileStream = new TFileStream(FileName, fmCreate);
  try {
    for(int i=0; i < SectionCount(); i++) {
      FileStream->Seek(0, soFromEnd);
      S = new String();
      *S = Format((String)"%s[%s]%s", ARRAYOFCONST((CR, SectionNames[i], CR)));
      FileStream->WriteBuffer((const void *)S, S->Length());
      delete S;
    }
  }
  __finally {
    delete FileStream;
  }
}
开发者ID:chinnyannieb,项目名称:Meus-Projetos,代码行数:18,代码来源:UnboundExternalDataDemoClasses.cpp

示例3: TFileStream

BOOL	TStripInfo::SaveInfo(CONST TCHAR* szFilePath)
{
    TFileStream* inStream = new TFileStream(szFilePath, fmCreate);

    inStream->WriteBuffer(&_stripVisual->fPRSMarkX, sizeof(INT32));
    inStream->WriteBuffer(&_stripVisual->fPRSMarkY, sizeof(INT32));
    inStream->WriteBuffer(&_stripVisual->fDeviceSizeX, sizeof(FLOAT));
    inStream->WriteBuffer(&_stripVisual->fDeviceSizeY, sizeof(FLOAT));
    inStream->WriteBuffer(&_stripVisual->clSelectUnitSheet, sizeof(TColor));
    inStream->WriteBuffer(&_stripVisual->clSelectUnitOutline, sizeof(TColor));
    inStream->WriteBuffer(&_stripVisual->clDefaultUnitSheet, sizeof(TColor));
    inStream->WriteBuffer(&_stripVisual->clDefaultUnitOutline, sizeof(TColor));
    inStream->WriteBuffer(&_stripVisual->nAngle, sizeof(INT32));
    inStream->WriteBuffer(&_stripVisual->clIndicateLine, sizeof(TColor));
    inStream->WriteBuffer(&_stripVisual->nOriginLocation, sizeof(INT32));

    inStream->WriteBuffer(&_stripUnits->fUnitXSize, sizeof(FLOAT));
    inStream->WriteBuffer(&_stripUnits->fUnitYSize, sizeof(FLOAT));
    inStream->WriteBuffer(&_stripUnits->fUnitXPitch, sizeof(FLOAT));
    inStream->WriteBuffer(&_stripUnits->fUnitYPitch, sizeof(FLOAT));
    inStream->WriteBuffer(&_stripUnits->nUnitXCountPerBlock, sizeof(INT32));
    inStream->WriteBuffer(&_stripUnits->nUnitYCountPerBlock, sizeof(INT32));
    inStream->WriteBuffer(&_stripUnits->fFirstMarkToUnitCenterX, sizeof(FLOAT));
    inStream->WriteBuffer(&_stripUnits->fFirstMarkToUnitCenterY, sizeof(FLOAT));

    inStream->WriteBuffer(&_stripBlock->nBlockXCount, sizeof(INT32));
    inStream->WriteBuffer(&_stripBlock->nBlockYCount, sizeof(INT32));
    inStream->WriteBuffer(&_stripBlock->fBlockXPitch, sizeof(FLOAT));
    inStream->WriteBuffer(&_stripBlock->fBlockYPitch, sizeof(FLOAT));


    delete inStream;
    return true;
}
开发者ID:japgo,项目名称:mygithub,代码行数:34,代码来源:stripinfo.cpp


注:本文中的TFileStream::WriteBuffer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。