Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_quant_protocol Class Reference

An object of this class represent a protocol element in quantitation.xml. More...

#include <ms_quant_protocol.hpp>

Inherits ms_xml_IValidatable.

Public Member Functions

 ms_quant_protocol ()
 Default constructor.
 
 ms_quant_protocol (const ms_quant_protocol &src)
 Copying constructor.
 
virtual ~ms_quant_protocol ()
 Destructor.
 
void copyFrom (const ms_quant_protocol *right)
 Copies all content from another instance.
 
void defaultValues ()
 Call this member if you want to start again.
 
const ms_quant_averagegetAverage () const
 Returns the average element or a null value if not available.
 
std::string getAverageSchemaType () const
 Obtain a symbolic name for the average element schema type.
 
const ms_quant_multiplexgetMultiplex () const
 Returns the multiplex element or a null value if not available.
 
std::string getMultiplexSchemaType () const
 Obtain a symbolic name for the multiplex element schema type.
 
const ms_quant_precursorgetPrecursor () const
 Returns the precursor element or a null value if not available.
 
std::string getPrecursorSchemaType () const
 Obtain a symbolic name for the precursor element schema type.
 
const ms_quant_replicategetReplicate () const
 Returns the replicate element or a null value if not available.
 
std::string getReplicateSchemaType () const
 Obtain a symbolic name for the replicate element schema type.
 
const ms_quant_reportergetReporter () const
 Returns the reporter element or a null value if not available.
 
std::string getReporterSchemaType () const
 Obtain a symbolic name for the reporter element schema type.
 
virtual std::string getSchemaType () const
 Returns name of the schema type that can be used to validate this element.
 
std::string getType () const
 Call this method first to determine which sub element to retrieve.
 
ms_quant_protocoloperator= (const ms_quant_protocol &right)
 C++ style assignment operator.
 
void setAverage (const ms_quant_average *average)
 Override content with another average element.
 
void setMultiplex (const ms_quant_multiplex *multiplex)
 Override content with another multiplex element.
 
void setNull ()
 Sets content of the protocol element to a null value and deletes all previously held information.
 
void setPrecursor (const ms_quant_precursor *precursor)
 Override content with another precursor element.
 
void setReplicate (const ms_quant_replicate *replicate)
 Override content with another replicate element.
 
void setReporter (const ms_quant_reporter *reporter)
 Override content with another reporter element.
 
virtual std::string validateDeep (const ms_xml_schema *pSchemaFileObj) const
 Performs validation of all child elements in addition to 'shallow' validation.
 
virtual std::string validateShallow (const ms_xml_schema *pSchemaFileObj) const
 Performs simple validation of the top-level elements only.
 

Detailed Description

An object of this class represent a protocol element in quantitation.xml.

6 different protocols are currently supported, and an object of this class is a container for exactly one of those protocols. The getType() function returns a string which contains the protocol for the current quantitation method. Use the return value from it to determine which of the functions to call to get further protocol details.

Constructor & Destructor Documentation

◆ ms_quant_protocol()

Copying constructor.

Parameters
srcanother instance of this class to copy the content from.

Member Function Documentation

◆ copyFrom()

void copyFrom ( const ms_quant_protocol right)

Copies all content from another instance.

Parameters
rightanother instance of this class to copy the content from.

◆ defaultValues()

void defaultValues ( )

Call this member if you want to start again.

All internal values are reset to their defaults, as if the object had been freshly created with the default constructor.

◆ getAverage()

const ms_quant_average * getAverage ( ) const

Returns the average element or a null value if not available.

Call this method only if getType() returns average.

Returns
an average element object. See Maintaining object references: two rules of thumb.

◆ getAverageSchemaType()

std::string getAverageSchemaType ( ) const

Obtain a symbolic name for the average element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getMultiplex()

const ms_quant_multiplex * getMultiplex ( ) const

Returns the multiplex element or a null value if not available.

Call this method only if getType() returns "multiplex".

Returns
a multiplex element object. See Maintaining object references: two rules of thumb.

◆ getMultiplexSchemaType()

std::string getMultiplexSchemaType ( ) const

Obtain a symbolic name for the multiplex element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getPrecursor()

const ms_quant_precursor * getPrecursor ( ) const

Returns the precursor element or a null value if not available.

Call this method only if getType() returns "precursor".

Returns
a precursor element object. See Maintaining object references: two rules of thumb.

◆ getPrecursorSchemaType()

std::string getPrecursorSchemaType ( ) const

Obtain a symbolic name for the precursor element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getReplicate()

const ms_quant_replicate * getReplicate ( ) const

Returns the replicate element or a null value if not available.

Call this method only if getType() returns "replicate".

Returns
a replicate element object. See Maintaining object references: two rules of thumb.

◆ getReplicateSchemaType()

std::string getReplicateSchemaType ( ) const

Obtain a symbolic name for the replicate element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getReporter()

const ms_quant_reporter * getReporter ( ) const

Returns the reporter element or a null value if not available.

Call this method only if getType() returns "reporter".

Returns
a reporter element object. See Maintaining object references: two rules of thumb.

◆ getReporterSchemaType()

std::string getReporterSchemaType ( ) const

Obtain a symbolic name for the reporter element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getSchemaType()

std::string getSchemaType ( ) const
virtual

Returns name of the schema type that can be used to validate this element.

Additional information about the current object can be retrieved from the associated XML schema file. Every element in an XML document is defined with a named type, which you can use to find out what kind of limits (numerical or otherwise) are defined for values of that type.

See also
validateShallow(), validateDeep()
Returns
a symbolic fully qualified type name (for example, "mqm:nameType").

◆ getType()

std::string getType ( ) const

Call this method first to determine which sub element to retrieve.

This table describes possible return values and which function to then call.

String returned Function to call required
reportergetReporter()
averagegetAverage()
precursorgetPrecursor()
multiplexgetMultiplex()
replicategetReplicate()
nullIndicates that the object is not initialised

If, for example, getReporter() is called when the return value from this function is "average", then a null value will be returned.

Calling one of the setXXX()-methods will change the protocol type returned by this method.

Returns
type of the protocol.

◆ operator=()

ms_quant_protocol & operator= ( const ms_quant_protocol right)

C++ style assignment operator.

Parameters
rightanother instance of this class to copy the content from.
Returns
reference to the current object

◆ setAverage()

void setAverage ( const ms_quant_average average)

Override content with another average element.

Calling this method with a null value as a parameter will set the protocol type to "null".

Parameters
averagea new value for the average element.

◆ setMultiplex()

void setMultiplex ( const ms_quant_multiplex multiplex)

Override content with another multiplex element.

Calling this method with a null value as a parameter will set the protocol type to "null".

Parameters
multiplexa new value for the multiplex element.

◆ setNull()

void setNull ( )

Sets content of the protocol element to a null value and deletes all previously held information.

Call this to clear the content and set sub-element as "null".

◆ setPrecursor()

void setPrecursor ( const ms_quant_precursor precursor)

Override content with another precursor element.

Calling this method with a null value as a parameter will set the protocol type to "null".

Parameters
precursora new value for the precursor element.

◆ setReplicate()

void setReplicate ( const ms_quant_replicate replicate)

Override content with another replicate element.

Calling this method with a null value as a parameter will set the protocol type to "null".

Parameters
replicatea new value for the replicate element.

◆ setReporter()

void setReporter ( const ms_quant_reporter reporter)

Override content with another reporter element.

Calling this method with a null value as a parameter will set the protocol type to "null"

Parameters
reportera new value for the reporter element.

◆ validateDeep()

std::string validateDeep ( const ms_xml_schema *  pSchemaFileObj) const
virtual

Performs validation of all child elements in addition to 'shallow' validation.

The current object can be checked against an XML schema. When using this method all possible checks are performed. However, this is not a substitute for the schema: some schema-defined constraint are not applied (unique fields, foreign keys etc.).

In order to make sure that current object is free from all syntax errors validate it as a part of the whole document.

See also
validateShallow(), getSchemaType()
Parameters
pSchemaFileObja valid schema object instance to validate against.
Returns
user-friendly description of any errors found during validation or an empty string if no errors detected.

◆ validateShallow()

std::string validateShallow ( const ms_xml_schema *  pSchemaFileObj) const
virtual

Performs simple validation of the top-level elements only.

The current object can be checked against some basic constraints in a schema without looking at children element types. When using this method only the current object and children derived from standard types (for example, restrictions with enumerations) are checked. For more thorough validation, use validateDeep().

See also
getSchemaType()
Parameters
pSchemaFileObja valid schema object instance to validate against.
Returns
user-friendly description of any errors found during validation or an empty string if no errors detected.

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