Represents a local_definition
element.
More...
#include <ms_quant_localdef.hpp>
Inherits ms_xml_IValidatable.
Public Member Functions | |
ms_quant_localdef () | |
Default constructor. | |
ms_quant_localdef (const ms_quant_localdef &src) | |
Copying constructor. | |
virtual | ~ms_quant_localdef () |
Destructor. | |
void | appendIgnore (const ms_quant_composition *ignore) |
Adds a new Ignore element at the end of the list. | |
void | appendSpecificity (const ms_quant_specificity *specificity) |
Adds a new specificity element at the end of the list. | |
void | clearIgnores () |
Deletes all Ignore elements from the list. | |
void | clearSpecificities () |
Deletes all specificity elements from the list. | |
void | copyFrom (const ms_quant_localdef *right) |
Copies all content from another instance. | |
void | defaultValues () |
Call this member if you want to start again. | |
bool | deleteIgnore (const int idx) |
Remove an Ignore element from the list. | |
bool | deleteSpecificity (const int idx) |
Remove a specificity element from the list. | |
void | dropDelta () |
Deletes the delta element. | |
void | dropTitle () |
Deletes the title attribute. | |
const ms_quant_composition * | getDelta () const |
Returns a pointer to the delta element. | |
std::string | getDeltaSchemaType () const |
Obtain a symbolic name for the delta element schema type. | |
const ms_quant_composition * | getIgnore (const int idx) const |
Returns an Ignore element object by its number. | |
std::string | getIgnoreSchemaType () const |
Obtain a symbolic name for the Ignore element schema type. | |
int | getNumberOfIgnores () const |
Returns the number of Ignore elements held. | |
int | getNumberOfSpecificities () const |
Returns the number of specificity elements held. | |
virtual std::string | getSchemaType () const |
Returns name of the schema type that can be used to validate this element. | |
const ms_quant_specificity * | getSpecificity (const int idx) const |
Returns a specificity element object by its number. | |
std::string | getSpecificitySchemaType () const |
Obtain a symbolic name for the specificity element schema type. | |
std::string | getTitle () const |
Returns the value of the title attribute. | |
std::string | getTitleSchemaType () const |
Obtain a symbolic name for the title attribute schema type. | |
bool | haveDelta () const |
Check presence of the delta element. | |
bool | haveTitle () const |
Check presence of the title attribute. | |
ms_quant_localdef & | operator= (const ms_quant_localdef &right) |
C++ style assignment operator. | |
void | setDelta (const ms_quant_composition *delta) |
Supply custom content for the delta element. | |
void | setTitle (const char *value) |
Set a custom value for the title attribute. | |
bool | updateIgnore (const int idx, const ms_quant_composition *ignore) |
Update the information for a specific Ignore element. | |
bool | updateSpecificity (const int idx, const ms_quant_specificity *specificity) |
Update the information for a specific specificity 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. | |
Represents a local_definition
element.
Default constructor.
Assigns reasonable default values to all internal members.
ms_quant_localdef | ( | const ms_quant_localdef & | src | ) |
Copying constructor.
src | another instance of this class to copy the content from. |
void appendIgnore | ( | const ms_quant_composition * | ignore | ) |
Adds a new Ignore
element at the end of the list.
ignore | an instance to copy the content into the newly added element from. |
void appendSpecificity | ( | const ms_quant_specificity * | specificity | ) |
Adds a new specificity
element at the end of the list.
specificity | an instance to copy the content into the newly added element from. |
void copyFrom | ( | const ms_quant_localdef * | 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 deleteIgnore | ( | const int | idx | ) |
Remove an Ignore
element from the list.
idx | a zero-based index of the element to delete. |
bool deleteSpecificity | ( | const int | idx | ) |
Remove a specificity
element from the list.
idx | a zero-based index of the element to delete. |
void dropDelta | ( | ) |
Deletes the delta
element.
Disables the element until it is re-set.
void dropTitle | ( | ) |
Deletes the title
attribute.
Disables the attribute until it is re-set.
const ms_quant_composition * getDelta | ( | ) | const |
Returns a pointer to the delta
element.
std::string getDeltaSchemaType | ( | ) | const |
Obtain a symbolic name for the delta
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
const ms_quant_composition * getIgnore | ( | const int | idx | ) | const |
Returns an Ignore
element object by its number.
idx | a zero-based index of the element to retrieve. |
std::string getIgnoreSchemaType | ( | ) | const |
Obtain a symbolic name for the Ignore
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
int getNumberOfIgnores | ( | ) | const |
Returns the number of Ignore
elements held.
Ignore
elements held. int getNumberOfSpecificities | ( | ) | const |
Returns the number of specificity
elements held.
specificity
elements held.
|
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.
const ms_quant_specificity * getSpecificity | ( | const int | idx | ) | const |
Returns a specificity
element object by its number.
idx | a zero-based index of the element to retrieve. |
std::string getSpecificitySchemaType | ( | ) | const |
Obtain a symbolic name for the specificity
element schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
std::string getTitle | ( | ) | const |
Returns the value of the title
attribute.
std::string getTitleSchemaType | ( | ) | const |
Obtain a symbolic name for the title
attribute schema type.
The obtained type name can be used to get a corresponding type description object from ms_xml_schema.
bool haveDelta | ( | ) | const |
Check presence of the delta
element.
bool haveTitle | ( | ) | const |
Check presence of the title
attribute.
ms_quant_localdef & operator= | ( | const ms_quant_localdef & | right | ) |
C++ style assignment operator.
right | another instance of this class to copy the content from. |
void setDelta | ( | const ms_quant_composition * | delta | ) |
Supply custom content for the delta
element.
Calling this method makes the sub-element automatically available in the current element.
delta | a new content for the element. |
void setTitle | ( | const char * | title | ) |
Set a custom value for the title
attribute.
Calling this method makes the attribute automatically available in the current element.
title | a new value for the attribute. |
bool updateIgnore | ( | const int | idx, |
const ms_quant_composition * | ignore | ||
) |
Update the information for a specific Ignore
element.
idx | a zero-based index of the element to update. |
ignore | an instance to copy the content from. |
bool updateSpecificity | ( | const int | idx, |
const ms_quant_specificity * | specificity | ||
) |
Update the information for a specific specificity
element.
idx | a zero-based index of the element to update. |
specificity | an instance 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. |