本文整理汇总了C++中ParameterList::getNameList方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterList::getNameList方法的具体用法?C++ ParameterList::getNameList怎么用?C++ ParameterList::getNameList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterList
的用法示例。
在下文中一共展示了ParameterList::getNameList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: insert
void SQLiteApplets::insert ()
{
v1 [3] = "";
v1 [4] = "1";
v1 [5] = "0";
StringVector fileList;
fileList.push_back ( "dbstat_hist" );
fileList.push_back ( "error_hist" );
fileList.push_back ( "fit_graph" );
fileList.push_back ( "hist" );
fileList.push_back ( "mmod_hist" );
fileList.push_back ( "pr_graph" );
fileList.push_back ( "sp_graph" );
for ( StringVectorSizeType i = 0 ; i < fileList.size () ; i++ ) {
string path = MsparamsDir::instance ().getParamPath ( fileList [i] + ".par.txt" );
GenNameValueStream nvs ( path );
if ( genFileExists ( path ) ) {
v1 [0] = fileList [i];
GenCommentedIFStream ifs ( path );
ParameterList p ( ifs );
StringVector sv = p.getNameList ();
int numValues = p.size ();
for ( int j = 0 ; j < numValues ; j++ ) {
StringVector sv2 = p.getStringVectorValue ( sv [j] );
for ( int k = 0 ; k < sv2.size () ; k++ ) {
v1 [1] = sv [j];
v1 [2] = sv2 [k];
insertTable ( tableName, n1, v1 );
}
}
}
}
}
示例2: if
PurityCorrection::PurityCorrection ( const ParameterList* params )
{
string quanType = params->getStringValue ( "quan_type", "" );
if ( isQuanMSMS ( quanType ) ) { // This is an MSMS quantitation type
string purityName = params->getStringValue ( "purity_correction", "" );
string purityFile = quanType + ".txt";
string purityPath = MsparamsDir::instance ().getParamPath ( purityFile );
if ( purityName == FROM_FORMULAE ) {
numQuanPeaks = QuanMSMSXMLData::instance ().getNumQuanPeaks ( quanType );
matrix = QuanMSMSXMLData::instance ().getFormulaPurityCoefficients ( quanType );
}
else if ( purityName == NO_CORRECTION ) {
numQuanPeaks = QuanMSMSXMLData::instance ().getNumQuanPeaks ( quanType );
matrix.resize ( numQuanPeaks );
for ( int i = 0 ; i < numQuanPeaks ; i++ ) {
for ( int j = 0 ; j < 4 ; j++ ) {
matrix [i].push_back ( 0.0 );
}
}
}
else {
if ( purityName != DEFAULT ) {
if ( isPrefix ( purityName, quanType ) ) {
purityName = purityName.substr ( quanType.length () + 1 );
}
else {
ErrorHandler::genError ()->error ( "Invalid purity name.\n" );
}
}
GenIFStream fromFile ( purityPath );
string line;
bool flag = false;
while ( getline ( fromFile, line ) ) {
if ( line == purityName ) {
ParameterList p ( fromFile );
StringVector sv = p.getNameList ();
numQuanPeaks = p.size ();
matrix.resize ( numQuanPeaks );
for ( int i = 0 ; i < numQuanPeaks ; i++ ) {
istringstream ist ( p.getStringValue ( sv [i] ) );
double num;
while ( ist >> num ) {
matrix [i].push_back ( num / 100.0 );
}
}
flag = true;
break;
}
}
if ( !flag ) {
ErrorHandler::genError ()->error ( "Invalid purity name.\n" );
}
}
a = nrmatrix ( 1, numQuanPeaks, 1, numQuanPeaks );
loadA ();
b = nrmatrix ( 1, numQuanPeaks, 1, 1 );
}