Matrix Science header
Public Member Functions

ms_quant_ratio Class Reference
[Mascot configuration files module]

Represents the ratioType type for the report_ratio element in quantitation.xml. More...

#include <ms_quant_ratio.hpp>

List of all members.

Public Member Functions

 ms_quant_ratio ()
 Default constructor.
 ms_quant_ratio (const ms_quant_ratio &src)
 Copying constructor.
virtual ~ms_quant_ratio ()
 Destructor.
void appendDenominator (const ms_quant_numerator *denominator)
 Adds a new denominator at the end of the list.
void appendNumerator (const ms_quant_numerator *numerator)
 Adds a new numerator at the end of the list.
void clearDenominators ()
 Deletes all denominators from the list.
void clearNumerators ()
 Deletes all numerators from the list.
void copyFrom (const ms_quant_ratio *right)
 Copies all content from another instance.
void defaultValues ()
 Call this member if you want to start again.
bool deleteDenominatorByName (const char *name)
 Remove a denominator from the list in memory by its unique name.
bool deleteDenominatorByNumber (const int idx)
 Remove a denominator from the list in memory by its index.
bool deleteNumeratorByName (const char *name)
 Remove a numerator from the list in memory by its unique name.
bool deleteNumeratorByNumber (const int idx)
 Remove a numerator from the list in memory by its index.
void dropName ()
 Delete the name attribute.
const ms_quant_numeratorgetDenominatorByName (const char *name) const
 Returns a denominator object by its name or a null value in case of not found.
const ms_quant_numeratorgetDenominatorByNumber (const int idx) const
 Returns a denominator object by its number or a null value in case of not found.
std::string getDenominatorSchemaType () const
 Obtain a symbolic name for the denominator element schema type.
std::string getName () const
 Returns the value of the name attribute.
std::string getNameSchemaType () const
 Obtain a symbolic name for the name attribute schema type.
int getNumberOfDenominators () const
 Returns a number of nested denominators.
int getNumberOfNumerators () const
 Returns the number of nested numerators.
const ms_quant_numeratorgetNumeratorByName (const char *name) const
 Returns a numerator object by its name or a null value in case of not found.
const ms_quant_numeratorgetNumeratorByNumber (const int idx) const
 Returns a numerator object by its number or a null value in case of not found.
std::string getNumeratorSchemaType () const
 Obtain a symbolic name for the numerator element schema type.
virtual std::string getSchemaType () const
 Returns name of the schema type that can be used to validate this element.
bool haveName () const
 Indicates presence of the name attribute.
ms_quant_ratiooperator= (const ms_quant_ratio &right)
 C++ style assignment operator.
void setName (const char *value)
 Set a custom value for the name attribute.
bool updateDenominatorByName (const char *name, const ms_quant_numerator *denominator)
 Update the information for a specific denominator refering to it by its unique name.
bool updateDenominatorByNumber (const int idx, const ms_quant_numerator *denominator)
 Update the information for a specific denominator refering to it by its index.
bool updateNumeratorByName (const char *name, const ms_quant_numerator *numerator)
 Update the information for a specific numerator refering to it by its unique name.
bool updateNumeratorByNumber (const int idx, const ms_quant_numerator *numerator)
 Update the information for a specific numerator refering to it by its index.
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

Represents the ratioType type for the report_ratio element in quantitation.xml.


Constructor & Destructor Documentation

Default constructor.

Assigns reasonable default values to all internal members.

ms_quant_ratio ( const ms_quant_ratio src )

Copying constructor.

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

Member Function Documentation

void appendDenominator ( const ms_quant_numerator denominator )

Adds a new denominator at the end of the list.

Creates a new denominator object, copies all content from the object supplied as a parameter and adds it at the end of the denominators list.

Parameters:
denominatoran instance of denominator object to copy content from.
void appendNumerator ( const ms_quant_numerator numerator )

Adds a new numerator at the end of the list.

Creates a new numerator object, copies all content from the object supplied as a parameter and adds it at the end of the numerators list.

Parameters:
numeratoran instance of numerator object to copy content from.
void copyFrom ( const ms_quant_ratio right )

Copies all content from another instance.

Parameters:
rightanother instance of this class to copy the content from.
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.

bool deleteDenominatorByName ( const char *  name )

Remove a denominator from the list in memory by its unique name.

Parameters:
namename of the denominator for deletion.
Returns:
TRUE if the denominator has been found and successfully deleted and FALSE otherwise.
bool deleteDenominatorByNumber ( const int  idx )

Remove a denominator from the list in memory by its index.

Parameters:
idxnumber of the denominator for deletion from 0 to (getNumberOfDenominators() - 1).
Returns:
TRUE if the denominator has been found and successfully deleted and FALSE otherwise.
bool deleteNumeratorByName ( const char *  name )

Remove a numerator from the list in memory by its unique name.

Parameters:
namename of the numerator for deletion.
Returns:
TRUE if the numerator has been found and successfully deleted and FALSE otherwise.
bool deleteNumeratorByNumber ( const int  idx )

Remove a numerator from the list in memory by its index.

Parameters:
idxnumber of the numerator for deletion from 0 to (getNumberOfNumerators() - 1).
Returns:
TRUE if the numerator has been found and successfully deleted and FALSE otherwise.
void dropName (  )

Delete the name attribute.

Deletes the attribute until it is re-set.

const ms_quant_numerator * getDenominatorByName ( const char *  name ) const

Returns a denominator object by its name or a null value in case of not found.

Parameters:
namename of the denominator to find.
Returns:
a read-only pointer to a denominator object. See Maintaining object references: two rules of thumb.
const ms_quant_numerator * getDenominatorByNumber ( const int  idx ) const

Returns a denominator object by its number or a null value in case of not found.

Parameters:
idxnumber of the denominator from 0 to (getNumberOfDenominators() - 1).
Returns:
a read-only pointer to a denominator object. See Maintaining object references: two rules of thumb.
std::string getDenominatorSchemaType (  ) const

Obtain a symbolic name for the denominator 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.
std::string getName (  ) const

Returns the value of the name attribute.

Returns:
a descriptive name that will appear in drop down lists, etc.
std::string getNameSchemaType (  ) const

Obtain a symbolic name for the name attribute 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.
const ms_quant_numerator * getNumeratorByName ( const char *  name ) const

Returns a numerator object by its name or a null value in case of not found.

Parameters:
namename of the numerator to find.
Returns:
a read-only pointer to a numerator object. See Maintaining object references: two rules of thumb.
const ms_quant_numerator * getNumeratorByNumber ( const int  idx ) const

Returns a numerator object by its number or a null value in case of not found.

Parameters:
idxnumber of the numerator from 0 to (getNumberOfNumerators() - 1).
Returns:
a read-only pointer to a numerator object. See Maintaining object references: two rules of thumb.
std::string getNumeratorSchemaType (  ) const

Obtain a symbolic name for the numerator 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.
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").
bool haveName (  ) const

Indicates presence of the name attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
ms_quant_ratio & operator= ( const ms_quant_ratio right )

C++ style assignment operator.

Parameters:
rightanother instance of this class to copy the content from.
Returns:
reference to the current object
void setName ( const char *  value )

Set a custom value for the name attribute.

Parameters:
valuea new value for the attribute.
bool updateDenominatorByName ( const char *  name,
const ms_quant_numerator denominator 
)

Update the information for a specific denominator refering to it by its unique name.

Parameters:
namename of the denominator for updating.
denominatoran object to copy the content from.
Returns:
TRUE if the denominator has been found and successfully updated and FALSE otherwise.
bool updateDenominatorByNumber ( const int  idx,
const ms_quant_numerator denominator 
)

Update the information for a specific denominator refering to it by its index.

Parameters:
idxnumber of the denominator for updating from 0 to (getNumberOfDenominators() - 1).
denominatoran object to copy the content from.
Returns:
TRUE if the denominator has been found and successfully updated and FALSE otherwise.
bool updateNumeratorByName ( const char *  name,
const ms_quant_numerator numerator 
)

Update the information for a specific numerator refering to it by its unique name.

Parameters:
namename of the numerator for updating.
numeratoran object to copy the content from.
Returns:
TRUE if the numerator has been found and successfully updated and FALSE otherwise.
bool updateNumeratorByNumber ( const int  idx,
const ms_quant_numerator numerator 
)

Update the information for a specific numerator refering to it by its index.

Parameters:
idxnumber of the numerator for updating from 0 to (getNumberOfNumerators() - 1).
numeratoran object to copy the content from.
Returns:
TRUE if the numerator has been found and successfully updated and FALSE otherwise.
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.
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:

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:37