ProteoWizard
Public Member Functions | Private Attributes | List of all members
WriteCVParam Class Reference

Public Member Functions

 WriteCVParam (ostream &os)
 
void operator() (const CVParam &param)
 

Private Attributes

ostream & os_
 

Detailed Description

Definition at line 38 of file ParamTypesTest.cpp.

Constructor & Destructor Documentation

§ WriteCVParam()

WriteCVParam::WriteCVParam ( ostream &  os)
inline

Definition at line 42 of file ParamTypesTest.cpp.

42 : os_(os) {}

Member Function Documentation

§ operator()()

void WriteCVParam::operator() ( const CVParam param)
inline

Definition at line 44 of file ParamTypesTest.cpp.

References pwiz::data::CVParam::cvid, CVID_Unknown, pwiz::cv::cvTermInfo(), pwiz::cv::CVTermInfo::id, pwiz::cv::CVTermInfo::name, os_, pwiz::data::CVParam::units, and pwiz::data::CVParam::value.

45  {
46  os_ << "<cvParam "
47  << "cvLabel=\"" << cvTermInfo(param.cvid).id.substr(0,2) << "\" "
48  << "accession=\"" << cvTermInfo(param.cvid).id << "\" "
49  << "name=\"" << cvTermInfo(param.cvid).name << "\" "
50  << "value=\"" << param.value << "\"";
51 
52  if (param.units != CVID_Unknown)
53  {
54  os_ << " unitAccession=\"" << cvTermInfo(param.units).id << "\" "
55  << "unitName=\"" << cvTermInfo(param.units).name << "\"";
56  }
57 
58  os_ << "/>\n";
59  }
std::string id
Definition: cv.hpp:13384
std::string value
Definition: ParamTypes.hpp:47
PWIZ_API_DECL const CVTermInfo & cvTermInfo(CVID cvid)
returns CV term info for the specified CVID
std::string name
Definition: cv.hpp:13385
CVID_Unknown
Definition: cv.hpp:97

Member Data Documentation

§ os_

ostream& WriteCVParam::os_
private

Definition at line 62 of file ParamTypesTest.cpp.


The documentation for this class was generated from the following file: