ProteoWizard
Public Member Functions | Public Attributes
pwiz::data::UserParam Struct Reference

Uncontrolled user parameters (essentially allowing free text). Before using these, one should verify whether there is an appropriate CV term available, and if so, use the CV term instead. More...

#include <ParamTypes.hpp>

List of all members.

Public Member Functions

 UserParam (const std::string &_name="", const std::string &_value="", const std::string &_type="", CVID _units=CVID_Unknown)
 ~UserParam ()
 UserParam (const UserParam &other)
UserParamoperator= (const UserParam &rhs)
template<typename value_type >
value_type valueAs () const
 Templated value access with type conversion.
bool empty () const
 returns true iff name, value, type, and units are all empty
bool operator== (const UserParam &that) const
 returns true iff name, value, type, and units are all pairwise equal
bool operator!= (const UserParam &that) const
 returns !(this==that)

Public Attributes

std::string name
 the name for the parameter.
std::string value
 the value for the parameter, where appropriate.
std::string type
 the datatype of the parameter, where appropriate (e.g.: xsd:float).
CVID units
 an optional CV parameter for the unit term associated with the value, if any (e.g. MS_electron_volt).

Detailed Description

Uncontrolled user parameters (essentially allowing free text). Before using these, one should verify whether there is an appropriate CV term available, and if so, use the CV term instead.

Definition at line 185 of file ParamTypes.hpp.


Constructor & Destructor Documentation

pwiz::data::UserParam::UserParam ( const std::string &  _name = "",
const std::string &  _value = "",
const std::string &  _type = "",
CVID  _units = CVID_Unknown 
)
pwiz::data::UserParam::~UserParam ( )
pwiz::data::UserParam::UserParam ( const UserParam other)

Member Function Documentation

UserParam& pwiz::data::UserParam::operator= ( const UserParam rhs)
bool pwiz::data::UserParam::valueAs< bool > ( ) const
inline

Templated value access with type conversion.

Definition at line 211 of file ParamTypes.hpp.

References boost::lexical_cast(), and pwiz::msdata::id::value().

Referenced by testParamContainer().

{
return !value.empty() ? boost::lexical_cast<value_type>(value)
: boost::lexical_cast<value_type>(0);
}
bool pwiz::data::UserParam::empty ( ) const

returns true iff name, value, type, and units are all empty

Referenced by test(), testParamContainer(), and testUserParam().

bool pwiz::data::UserParam::operator== ( const UserParam that) const

returns true iff name, value, type, and units are all pairwise equal

bool pwiz::data::UserParam::operator!= ( const UserParam that) const

returns !(this==that)


Member Data Documentation

std::string pwiz::data::UserParam::name
std::string pwiz::data::UserParam::value
std::string pwiz::data::UserParam::type

the datatype of the parameter, where appropriate (e.g.: xsd:float).

Definition at line 194 of file ParamTypes.hpp.

Referenced by pwiz::tradata::TextWriter::operator()(), pwiz::msdata::TextWriter::operator()(), pwiz::identdata::TextWriter::operator()(), test(), and testUserParam().

CVID pwiz::data::UserParam::units

an optional CV parameter for the unit term associated with the value, if any (e.g. MS_electron_volt).

Definition at line 197 of file ParamTypes.hpp.

Referenced by pwiz::tradata::TextWriter::operator()(), pwiz::msdata::TextWriter::operator()(), pwiz::identdata::TextWriter::operator()(), and testUserParam().


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