本文整理汇总了C++中ParameterNameValueType::GetValueText方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterNameValueType::GetValueText方法的具体用法?C++ ParameterNameValueType::GetValueText怎么用?C++ ParameterNameValueType::GetValueText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterNameValueType
的用法示例。
在下文中一共展示了ParameterNameValueType::GetValueText方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_SumParams
void CHPMultiDataDataTest::test_SumParams()
{
ParameterNameValueTypeList params;
ParameterNameValueType param;
CHPMultiDataData data;
param.SetName(L"n1");
param.SetValueText(L"v1");
params.push_back(param);
param.SetName(L"n2");
param.SetValueText(L"v2");
params.push_back(param);
data.AddSummaryParams(params);
ParameterNameValueTypeList params_out = data.GetSummaryParams();
CPPUNIT_ASSERT(params_out.size() == 2);
ParameterNameValueTypeList::iterator it = params_out.begin();
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"n1");
CPPUNIT_ASSERT(param.GetValueText() == L"v1");
++it;
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"n2");
CPPUNIT_ASSERT(param.GetValueText() == L"v2");
}
示例2: test_AlgParams
void CHPQuantificationDataTest::test_AlgParams()
{
ParameterNameValueTypeList params;
ParameterNameValueType param;
CHPQuantificationData data;
param.SetName(L"n1");
param.SetValueText(L"v1");
params.push_back(param);
param.SetName(L"n2");
param.SetValueText(L"v2");
params.push_back(param);
data.AddAlgParams(params);
ParameterNameValueTypeList params_out = data.GetAlgParams();
CPPUNIT_ASSERT(params_out.size() == 2);
ParameterNameValueTypeList::iterator it = params_out.begin();
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"n1");
CPPUNIT_ASSERT(param.GetValueText() == L"v1");
++it;
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"n2");
CPPUNIT_ASSERT(param.GetValueText() == L"v2");
}
示例3: GetDatHeader
/*
* Get the DAT header from the DAT file header object.
*/
string CELConversionUtilities::GetDatHeader(CelFileData &inFile)
{
std::wstring datHeader;
GenDataHdrVectorIt begin, end;
inFile.GetFileHeader()->GetGenericDataHdr()->GetParentIterators(begin, end);
// Find the DAT generic header
for (GenDataHdrVectorIt ii = begin; ii != end; ++ii)
{
std::string s = ii->GetFileTypeId();
if (ii->GetFileTypeId() == SCAN_ACQUISITION_DATA_TYPE)
{
// found the right header, now look for the parameter
ParameterNameValueType nvt;
if (ii->FindNameValParam(DAT_HEADER_PARAM_NAME, nvt))
{
if (nvt.GetParameterType() == ParameterNameValueType::TextType)
datHeader = nvt.GetValueText();
}
else if (ii->FindNameValParam(PARTIAL_DAT_HEADER_PARAM_NAME, nvt))
{
if (nvt.GetParameterType() == ParameterNameValueType::TextType)
{
std::wstring partialDatHeader = nvt.GetValueText();
u_int16_t min = 0;
u_int16_t max = 0;
// Find the max and min parameters and append to the string.
if (ii->FindNameValParam(MAX_PIXEL_INTENSITY_PARAM_NAME, nvt))
{
if (nvt.GetParameterType() == ParameterNameValueType::UInt16Type)
max = nvt.GetValueUInt16();
}
if (ii->FindNameValParam(MIN_PIXEL_INTENSITY_PARAM_NAME, nvt))
{
if (nvt.GetParameterType() == ParameterNameValueType::UInt16Type)
min = nvt.GetValueUInt16();
}
wchar_t buf[30];
FormatString2(buf, 30, L"[%d..%d]", min, max);
datHeader = buf;
datHeader += partialDatHeader;
}
}
break;
}
}
return StringUtils::ConvertWCSToMBS(datHeader);
}
示例4: GetDatHeader
std::wstring CalvinCELDataAdapter::GetDatHeader()
{
std::wstring datHeader;
//GenDataHdrVectorIt begin, end;
GenericDataHeader* gdh = calvinCel.GetFileHeader()->GetGenericDataHdr()->FindParent(SCAN_ACQUISITION_DATA_TYPE);
if (gdh)
{
// found the right header, now look for the parameter
ParameterNameValueType nvt;
if (gdh->FindNameValParam(DAT_HEADER_PARAM_NAME, nvt))
{
if (nvt.GetParameterType() == ParameterNameValueType::TextType)
datHeader = nvt.GetValueText();
}
else if (gdh->FindNameValParam(PARTIAL_DAT_HEADER_PARAM_NAME, nvt))
{
if (nvt.GetParameterType() == ParameterNameValueType::TextType)
{
std::wstring partialDatHeader = nvt.GetValueText();
u_int16_t min = 0;
u_int16_t max = 0;
// Find the max and min parameters and append to the string.
if (gdh->FindNameValParam(MAX_PIXEL_INTENSITY_PARAM_NAME, nvt))
{
if (nvt.GetParameterType() == ParameterNameValueType::UInt16Type)
max = nvt.GetValueUInt16();
}
if (gdh->FindNameValParam(MIN_PIXEL_INTENSITY_PARAM_NAME, nvt))
{
if (nvt.GetParameterType() == ParameterNameValueType::UInt16Type)
min = nvt.GetValueUInt16();
}
wchar_t buf[30]=L"";
FormatString2(buf, 30, L"[%d..%d]", min, max);
datHeader = buf;
datHeader += partialDatHeader;
}
}
}
return datHeader;
}
示例5: GetWStringFromGenericHdr
std::wstring CHPQuantificationData::GetWStringFromGenericHdr(const std::wstring& name)
{
std::wstring result;
ParameterNameValueType paramType;
GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
if (hdr->FindNameValParam(name, paramType))
{
result = paramType.GetValueText();
}
return result;
}
示例6: testReadCNV
void CHPMultiDataFileReaderTest::testReadCNV()
{
affymetrix_calvin_data::ProbeSetMultiDataCopyNumberVariationRegionData e;
ParameterNameValueType param;
CHPMultiDataData data2;
CHPMultiDataFileReader reader;
reader.SetFilename("../data/CHP_MultiData_file_cnv");
reader.Read(data2);
CPPUNIT_ASSERT(data2.GetAlgName() == L"canary");
CPPUNIT_ASSERT(data2.GetAlgVersion() == L"1.0");
CPPUNIT_ASSERT(data2.GetArrayType() == L"test3");
CPPUNIT_ASSERT(data2.GetEntryCount(CopyNumberVariationMultiDataType) == 2);
CPPUNIT_ASSERT(data2.GetEntryCount(CopyNumberMultiDataType) == 0);
CPPUNIT_ASSERT(data2.GetEntryCount(GenotypeMultiDataType) == 0);
CPPUNIT_ASSERT(data2.GetEntryCount(ExpressionMultiDataType) == 0);
ParameterNameValueTypeList p = data2.GetAlgParams();
ParameterNameValueTypeList::iterator it = p.begin();
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"an1");
CPPUNIT_ASSERT(param.GetValueText() == L"av1");
p = data2.GetSummaryParams();
it = p.begin();
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"sn1");
CPPUNIT_ASSERT(param.GetValueText() == L"sv1");
data2.GetCopyNumberVariationEntry(CopyNumberVariationMultiDataType, 0, e);
CPPUNIT_ASSERT(e.call == 1);
CPPUNIT_ASSERT(e.name == "abc");
CPPUNIT_ASSERT_DOUBLES_EQUAL(e.confidenceScore, 1.1f, 0.0001f);
CPPUNIT_ASSERT(e.signal == 100);
data2.GetCopyNumberVariationEntry(CopyNumberVariationMultiDataType, 1, e);
CPPUNIT_ASSERT(e.call == 2);
CPPUNIT_ASSERT(e.name == "xyz");
CPPUNIT_ASSERT_DOUBLES_EQUAL(e.confidenceScore, 2.2, 0.0001f);
CPPUNIT_ASSERT(e.signal == 200);
}
示例7: testReadId
void CHPQuantificationDetectionFileReaderTest::testReadId()
{
CHPQuantificationDetectionData data;
CHPQuantificationDetectionFileReader reader;
CPPUNIT_ASSERT_NO_THROW(reader.SetFilename("../data/CHP_quantification_detection_file_id"));
CPPUNIT_ASSERT_NO_THROW(reader.Read(data));
CPPUNIT_ASSERT(data.GetFilename() == "../data/CHP_quantification_detection_file_id");
CPPUNIT_ASSERT(data.GetAlgName() == L"sig");
CPPUNIT_ASSERT(data.GetAlgVersion() == L"1.0");
CPPUNIT_ASSERT(data.GetArrayType() == L"test3");
CPPUNIT_ASSERT(data.GetEntryCount() == 2);
ParameterNameValueTypeList params = data.GetAlgParams();
CPPUNIT_ASSERT(params.size() == 1);
ParameterNameValueTypeList::iterator it=params.begin();
ParameterNameValueType param = *it;
CPPUNIT_ASSERT(param.GetName() == L"an1");
CPPUNIT_ASSERT(param.GetValueText() == L"av1");
params = data.GetSummaryParams();
CPPUNIT_ASSERT(params.size() == 1);
it=params.begin();
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"sn1");
CPPUNIT_ASSERT(param.GetValueText() == L"sv1");
ProbeSetQuantificationDetectionData e;
data.GetQuantificationDetectionEntry(0, e);
CPPUNIT_ASSERT(e.id == 10);
CPPUNIT_ASSERT(e.quantification == 10.0f);
CPPUNIT_ASSERT(e.pvalue == 0.1f);
CPPUNIT_ASSERT(e.name == "");
data.GetQuantificationDetectionEntry(1, e);
CPPUNIT_ASSERT(e.id == 20);
CPPUNIT_ASSERT(e.quantification == 20.0f);
CPPUNIT_ASSERT(e.pvalue == 0.2f);
CPPUNIT_ASSERT(e.name == "");
}
示例8: testReadCN
void CHPMultiDataFileReaderTest::testReadCN()
{
affymetrix_calvin_data::ProbeSetMultiDataCopyNumberData e;
ParameterNameValueType param;
CHPMultiDataData data2;
CHPMultiDataFileReader reader;
reader.SetFilename("../data/CHP_MultiData_file_cn");
reader.Read(data2);
CPPUNIT_ASSERT(data2.GetAlgName() == L"sig");
CPPUNIT_ASSERT(data2.GetAlgVersion() == L"1.0");
CPPUNIT_ASSERT(data2.GetArrayType() == L"test3");
CPPUNIT_ASSERT(data2.GetEntryCount(CopyNumberMultiDataType) == 2);
CPPUNIT_ASSERT(data2.GetEntryCount(GenotypeMultiDataType) == 0);
CPPUNIT_ASSERT(data2.GetEntryCount(ExpressionMultiDataType) == 0);
ParameterNameValueTypeList p = data2.GetAlgParams();
ParameterNameValueTypeList::iterator it = p.begin();
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"an1");
CPPUNIT_ASSERT(param.GetValueText() == L"av1");
p = data2.GetSummaryParams();
it = p.begin();
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"sn1");
CPPUNIT_ASSERT(param.GetValueText() == L"sv1");
data2.GetCopyNumberEntry(CopyNumberMultiDataType, 0, e);
CPPUNIT_ASSERT(e.chr == 10);
CPPUNIT_ASSERT(e.position == 11);
CPPUNIT_ASSERT(e.name == "abc");
data2.GetCopyNumberEntry(CopyNumberMultiDataType, 1, e);
CPPUNIT_ASSERT(e.chr == 20);
CPPUNIT_ASSERT(e.position == 21);
CPPUNIT_ASSERT(e.name == "xyz");
}
示例9: WriteTest
void CHPQuantificationFileWriterTest::WriteTest()
{
ParameterNameValueTypeList params;
ParameterNameValueType param;
CHPQuantificationData data("CHP_quantification_file");
data.SetAlgName(L"sig");
data.SetAlgVersion(L"1.0");
data.SetArrayType(L"test3");
data.SetEntryCount(2, 10);
param.SetName(L"an1");
param.SetValueText(L"av1");
params.push_back(param);
data.AddAlgParams(params);
params.clear();
param.SetName(L"sn1");
param.SetValueText(L"sv1");
params.push_back(param);
data.AddSummaryParams(params);
CHPQuantificationFileWriter *writer = new CHPQuantificationFileWriter(data);
affymetrix_calvin_data::ProbeSetQuantificationData e;
writer->SeekToDataSet();
e.name = "abc";
e.quantification = 10.0f;
writer->WriteEntry(e);
e.name = "xyz";
e.quantification = 20.0f;
writer->WriteEntry(e);
delete writer;
CPPUNIT_ASSERT(1);
CHPQuantificationData data2;
CHPQuantificationFileReader reader;
reader.SetFilename("CHP_quantification_file");
reader.Read(data2);
CPPUNIT_ASSERT(data2.GetAlgName() == L"sig");
CPPUNIT_ASSERT(data2.GetAlgVersion() == L"1.0");
CPPUNIT_ASSERT(data2.GetArrayType() == L"test3");
CPPUNIT_ASSERT(data2.GetEntryCount() == 2);
ParameterNameValueTypeList p = data2.GetAlgParams();
ParameterNameValueTypeList::iterator it = p.begin();
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"an1");
CPPUNIT_ASSERT(param.GetValueText() == L"av1");
p = data2.GetSummaryParams();
it = p.begin();
param = *it;
CPPUNIT_ASSERT(param.GetName() == L"sn1");
CPPUNIT_ASSERT(param.GetValueText() == L"sv1");
data2.GetQuantificationEntry(0, e);
CPPUNIT_ASSERT_DOUBLES_EQUAL(e.quantification, 10.0f, 0.0001f);
CPPUNIT_ASSERT(e.name == "abc");
data2.GetQuantificationEntry(1, e);
CPPUNIT_ASSERT_DOUBLES_EQUAL(e.quantification, 20.0f, 0.0001f);
CPPUNIT_ASSERT(e.name == "xyz");
}