ProteoWizard
|
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>
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) | |
UserParam & | operator= (const UserParam &rhs) |
double | timeInSeconds () const |
convenience function to return time in seconds (throws if units not a time unit) More... | |
template<typename value_type > | |
value_type | valueAs () const |
Templated value access with type conversion. More... | |
bool | empty () const |
returns true iff name, value, type, and units are all empty More... | |
bool | operator== (const UserParam &that) const |
returns true iff name, value, type, and units are all pairwise equal More... | |
bool | operator!= (const UserParam &that) const |
returns !(this==that) More... | |
template<> | |
bool | valueAs () const |
Public Attributes | |
std::string | name |
the name for the parameter. More... | |
std::string | value |
the value for the parameter, where appropriate. More... | |
std::string | type |
the datatype of the parameter, where appropriate (e.g.: xsd:float). More... | |
CVID | units |
an optional CV parameter for the unit term associated with the value, if any (e.g. MS_electron_volt). More... | |
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.
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 | ) |
double pwiz::data::UserParam::timeInSeconds | ( | ) | const |
convenience function to return time in seconds (throws if units not a time unit)
|
inline |
Templated value access with type conversion.
Definition at line 214 of file ParamTypes.hpp.
References boost::lexical_cast(), pwiz::frequency::operator!=(), pwiz::data::operator==(), and pwiz::msdata::id::value().
Referenced by testParamContainer().
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)
|
inline |
Definition at line 233 of file ParamTypes.hpp.
References pwiz::msdata::id::value().
std::string pwiz::data::UserParam::name |
the name for the parameter.
Definition at line 188 of file ParamTypes.hpp.
Referenced by UserParamNameIs::operator()(), pwiz::tradata::TextWriter::operator()(), pwiz::msdata::TextWriter::operator()(), pwiz::identdata::TextWriter::operator()(), test(), and testUserParam().
std::string pwiz::data::UserParam::value |
the value for the parameter, where appropriate.
Definition at line 191 of file ParamTypes.hpp.
Referenced by pwiz::tradata::TextWriter::operator()(), pwiz::msdata::TextWriter::operator()(), pwiz::identdata::TextWriter::operator()(), test(), testMaxPrecisionDiff(), and testUserParam().
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().