本文整理汇总了C++中DataGroupHeader类的典型用法代码示例。如果您正苦于以下问题:C++ DataGroupHeader类的具体用法?C++ DataGroupHeader怎么用?C++ DataGroupHeader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DataGroupHeader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddStandardGenericDataHeader
void TestFileGenerator::WriteOutGenericDATDataFileNoGrid()
{
GenericDataHeader gdh;
AddStandardGenericDataHeader(gdh);
// Fill the DataGroupHeader
DataGroupHeader dch;
dch.SetName(L"First Data Cube");
// Fill the DataSetHeader
DataSetHeader dph;
dph.SetName(L"acquired data");
ParameterNameValueType nvt;
nvt.SetName(L"Scanner");
nvt.SetValueText(L"M10");
dph.AddNameValParam(nvt);
nvt.SetName(L"Pixel Size");
nvt.SetValueFloat(0.051f);
dph.AddNameValParam(nvt);
dph.AddColumn(UShortColumn(L"Pixel"));
int32_t rows = 100;
dph.SetRowCnt(rows);
dch.AddDataSetHdr(dph);
// Set the FileHeader
FileHeader fh;
fh.SetFilename("test.file.data_dat");
fh.SetGenericDataHdr(gdh);
fh.AddDataGroupHdr(dch);
// Create the generic file writer
GenericFileWriter gfWriter(&fh);
gfWriter.WriteHeader();
DataGroupWriterIt dcwBegin, dcwEnd;
gfWriter.GetDataGroupWriters(dcwBegin, dcwEnd);
DataGroupWriter d = *dcwBegin;
dcwBegin->WriteHeader();
DataSetWriterIt dpwBegin, dpwEnd;
dcwBegin->GetDataSetWriters(dpwBegin, dpwEnd);
dpwBegin->WriteHeader();
// Write out the data
for( int32_t i=0; i < rows; ++i )
{
u_int16_t value = (u_int16_t)(i*10+i);
dpwBegin->Write(value);
}
dpwBegin->UpdateNextDataSetOffset();
dcwBegin->Close();
}
示例2: AddColumns
void CHPData::SetEntryCount(int32_t ln, int32_t maxln, bool hasCompData)
{
maxProbeSetName = maxln;
DataSetHeader dpHdr;
dpHdr.SetRowCnt(ln);
AddColumns(dpHdr, hasCompData);
DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(0);
dcHdr->AddDataSetHdr(dpHdr);
}
示例3: SetEntryCount
void CHPQuantificationData::SetEntryCount(int32_t ln, int32_t maxln)
{
firstColumnType = ASCIICharColType;
maxProbeSetName = maxln;
ParameterNameValueType param;
DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(0);
DataSetHeader dpHdr;
dpHdr.SetRowCnt(ln);
dpHdr.SetName(QUANTIFICATION_QUANTIFICATION_NAME);
AddColumns(dpHdr, false);
dcHdr->AddDataSetHdr(dpHdr);
}
示例4: SetOrigCnt
void CHPData::SetOrigCnt(int32_t ln)
{
DataSetHeader dpHdr;
dpHdr.SetRowCnt(ln);
dpHdr.SetName(CHP_RESEQ_ORIG_CALL_GROUP);
//position - int
dpHdr.AddIntColumn(PositionColName);
//call - byte
dpHdr.AddByteColumn(OriginalCallColName);
DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(3);
dcHdr->AddDataSetHdr(dpHdr);
}
示例5: CPPUNIT_ASSERT
void FileHeaderTest::FindDataGroupHeaderByNameTest()
{
// Create DataGroupHeaders
DataGroupHeader d;
d.SetName(L"Default");
header->AddDataGroupHdr(d);
const DataGroupHeader* dch = header->FindDataGroupHeader(L"none");
CPPUNIT_ASSERT(0 == dch);
dch = header->FindDataGroupHeader(L"default");
CPPUNIT_ASSERT(0 == dch);
dch = header->FindDataGroupHeader(L"Default");
CPPUNIT_ASSERT(0 != dch);
CPPUNIT_ASSERT(dch->GetName() == L"Default");
}
示例6: SetForceCnt
void CHPData::SetForceCnt(int32_t ln)
{
DataSetHeader dpHdr;
dpHdr.SetRowCnt(ln);
dpHdr.SetName(CHP_RESEQ_FORCE_CALL_GROUP);
//position - int
dpHdr.AddIntColumn(PositionColName);
//call - byte
dpHdr.AddByteColumn(ForceCallColName);
//reason - byte
dpHdr.AddByteColumn(ReasonColName);
DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(2);
dcHdr->AddDataSetHdr(dpHdr);
}
示例7: ReadDataGroupName
/*
* Reads the DataGroup name from the file.
*/
void DataGroupHeaderReader::ReadDataGroupName(std::ifstream& fileStream, DataGroupHeader& dch)
{
//DEBUG
//u_int32_t z = fileStream.tellg();
dch.SetName(FileInput::ReadString16(fileStream));
}
示例8: ReadFirstDataSetFilePos
/*
* Reads the file position of the first DataSet in the DataGroup.
*/
void DataGroupHeaderReader::ReadFirstDataSetFilePos(std::ifstream& fileStream, DataGroupHeader& dch)
{
//DEBUG
//u_int32_t z = fileStream.tellg();
dch.SetDataSetPos(FileInput::ReadUInt32(fileStream));
}
示例9: SetBackgroundZoneCnt
void CHPData::SetBackgroundZoneCnt(int32_t ln)
{
DataSetHeader dpHdr;
dpHdr.SetRowCnt(ln);
dpHdr.SetName(CHP_BG_ZONE_GROUP);
//center X coord - float
dpHdr.AddFloatColumn(CenterXColName);
//center Y coord - float
dpHdr.AddFloatColumn(CenterYColName);
//background - float
dpHdr.AddFloatColumn(BackgroundColName);
//smoothing factor - float
dpHdr.AddFloatColumn(SmoothFactorColName);
DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(1);
dcHdr->AddDataSetHdr(dpHdr);
}
示例10: Read
/*
* Read the DataGroupHeader and all DataSetHeaders associated with this DataGroupHeader from the file.
*/
u_int32_t DataGroupHeaderReader::Read(std::ifstream& fileStream, DataGroupHeader& dch)
{
u_int32_t dataSetCnt = ReadHeader(fileStream, dch);
// Read the DataSets
DataSetHeaderReader dphReader;
dphReader.ReadAll(fileStream, dch, dataSetCnt);
return dch.GetNextGroupPos();
}
示例11: Read
/*
* Read the DataGroupHeader and all DataSetHeaders associated with this DataGroupHeader from the file.
*/
u_int32_t DataGroupHeaderReader::Read(std::ifstream& fileStream, DataGroupHeader& grpHdr)
{
ReadDataGroupStartFilePos(fileStream, grpHdr);
u_int32_t dataSetCnt = ReadHeader(fileStream, grpHdr);
// Read the DataSets
DataSetHeaderReader dphReader;
dphReader.ReadAll(fileStream, grpHdr, dataSetCnt);
return grpHdr.GetNextGroupPos();
}
示例12: AddColumns
void CHPMultiDataData::SetEntryCount(MultiDataType dataType, int32_t ln, int32_t maxln, const std::vector<ColumnInfo> &columns, const std::wstring &groupName)
{
DataSetInfo info;
info.maxName = maxln;
info.metricColumns = columns;
info.entries = NULL;
info.dataType = dataType;
info.dataSetIndex = (int)dataSetInfo.size();
dataSetInfo[dataType] = info;
DataSetHeader dsHdr;
dsHdr.SetRowCnt(ln);
dsHdr.SetName(MultiDataDataSetNames[(int)dataType]);
AddColumns(info, dsHdr);
if (groupName.empty() == true)
dataTypeGroupNames[dataType] = MULTI_DATA_NAME;
else
dataTypeGroupNames[dataType] = groupName;
DataGroupHeader* dgHdr = GetDataGroupHeader(dataTypeGroupNames[dataType]);
dgHdr->AddDataSetHdr(dsHdr);
}
示例13: ReadDataGroupStartFilePos
/*
* Read the file position of the start of the DataSet.
*/
void DataGroupHeaderReader::ReadDataGroupStartFilePos(std::ifstream& fileStream, DataGroupHeader& grpHdr)
{
grpHdr.SetHeaderStartFilePos(fileStream.tellg());
}
示例14: GetEntryCount
int32_t CHPQuantificationData::GetEntryCount()
{
DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(0);
DataSetHeader dpHdr = dcHdr->GetDataSet(0);
return dpHdr.GetRowCnt();
}
示例15: GetOrigCnt
int32_t CHPData::GetOrigCnt()
{
DataGroupHeader* dcHdr = &genericData.Header().GetDataGroup(3);
DataSetHeader dpHdr = dcHdr->GetDataSet(0);
return dpHdr.GetRowCnt();
}