Represents the ratioType
type for the report_ratio
element in quantitation.xml
.
More...
#include <ms_quant_ratio.hpp>
Inherits ms_xml_IValidatable.
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_numerator * | getDenominatorByName (const char *name) const |
Returns a denominator object by its name or a null value in case of not found. | |
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. | |
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_numerator * | getNumeratorByName (const char *name) const |
Returns a numerator object by its name or a null value in case of not found. | |
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. | |
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_ratio & | operator= (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. | |
Represents the ratioType
type for the report_ratio
element in quantitation.xml
.
ms_quant_ratio | ( | ) |
Default constructor.
Assigns reasonable default values to all internal members.
ms_quant_ratio | ( | const ms_quant_ratio & | src | ) |
Copying constructor.
src | another instance of this class to copy the content from. |
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.
denominator | an 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.
numerator | an instance of numerator object to copy content from. |
void copyFrom | ( | const ms_quant_ratio * | right | ) |
Copies all content from another instance.
right | another 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.
name | name of the denominator for deletion. |
bool deleteDenominatorByNumber | ( | const int | idx | ) |
Remove a denominator from the list in memory by its index.
idx | number of the denominator for deletion from 0 to (getNumberOfDenominators() - 1). |
bool deleteNumeratorByName | ( | const char * | name | ) |
Remove a numerator from the list in memory by its unique name.
name | name of the numerator for deletion. |
bool deleteNumeratorByNumber | ( | const int | idx | ) |
Remove a numerator from the list in memory by its index.
idx | number of the numerator for deletion from 0 to (getNumberOfNumerators() - 1). |
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.
name | name of the denominator to find. |
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.
idx | number of the denominator from 0 to (getNumberOfDenominators() - 1). |
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.
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.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
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.
name | name of the numerator to find. |
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.
idx | number of the numerator from 0 to (getNumberOfNumerators() - 1). |
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.
|
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.
bool haveName | ( | ) | const |
Indicates presence of the name
attribute.
ms_quant_ratio & operator= | ( | const ms_quant_ratio & | right | ) |
C++ style assignment operator.
right | another instance of this class to copy the content from. |
void setName | ( | const char * | value | ) |
Set a custom value for the name
attribute.
value | a 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.
name | name of the denominator for updating. |
denominator | an object to copy the content from. |
bool updateDenominatorByNumber | ( | const int | idx, |
const ms_quant_numerator * | denominator | ||
) |
Update the information for a specific denominator refering to it by its index.
idx | number of the denominator for updating from 0 to (getNumberOfDenominators() - 1). |
denominator | an object to copy the content from. |
bool updateNumeratorByName | ( | const char * | name, |
const ms_quant_numerator * | numerator | ||
) |
Update the information for a specific numerator refering to it by its unique name.
name | name of the numerator for updating. |
numerator | an object to copy the content from. |
bool updateNumeratorByNumber | ( | const int | idx, |
const ms_quant_numerator * | numerator | ||
) |
Update the information for a specific numerator refering to it by its index.
idx | number of the numerator for updating from 0 to (getNumberOfNumerators() - 1). |
numerator | an object to copy the content from. |
|
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.
pSchemaFileObj | a valid schema object instance to validate against. |
|
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().
pSchemaFileObj | a valid schema object instance to validate against. |