Matrix Science header
Public Member Functions

ms_quant_localdef Class Reference
[Mascot configuration files module]

Represents a local_definition element. More...

#include <ms_quant_localdef.hpp>

Collaboration diagram for ms_quant_localdef:
Collaboration graph
[legend]

List of all members.

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_compositiongetDelta () 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_compositiongetIgnore (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_specificitygetSpecificity (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_localdefoperator= (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.

Detailed Description

Represents a local_definition element.


Constructor & Destructor Documentation

Default constructor.

Assigns reasonable default values to all internal members.

Copying constructor.

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

Member Function Documentation

void appendIgnore ( const ms_quant_composition ignore )

Adds a new Ignore element at the end of the list.

Parameters:
ignorean 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.

Parameters:
specificityan instance to copy the content into the newly added element from.
void copyFrom ( const ms_quant_localdef 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 deleteIgnore ( const int  idx )

Remove an Ignore element from the list.

Parameters:
idxa zero-based index of the element to delete.
Returns:
TRUE if the element has been successfully deleted and FALSE otherwise.
bool deleteSpecificity ( const int  idx )

Remove a specificity element from the list.

Parameters:
idxa zero-based index of the element to delete.
Returns:
TRUE if the element has been successfully deleted and FALSE otherwise.
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.

Returns:
a read-only pointer to the current content. See Maintaining object references: two rules of thumb.
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.

Returns:
symbolic type name for the element.
const ms_quant_composition * getIgnore ( const int  idx ) const

Returns an Ignore element object by its number.

Parameters:
idxa zero-based index of the element to retrieve.
Returns:
a read-only pointer to the retrieved element. See Maintaining object references: two rules of thumb.
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.

Returns:
symbolic type name for the element.
int getNumberOfIgnores (  ) const

Returns the number of Ignore elements held.

Returns:
total number of Ignore elements held.
int getNumberOfSpecificities (  ) const

Returns the number of specificity elements held.

Returns:
total number of specificity elements held.
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").
const ms_quant_specificity * getSpecificity ( const int  idx ) const

Returns a specificity element object by its number.

Parameters:
idxa zero-based index of the element to retrieve.
Returns:
a read-only pointer to the retrieved element. See Maintaining object references: two rules of thumb.
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.

Returns:
symbolic type name for the element.
std::string getTitle (  ) const

Returns the value of the title attribute.

Returns:
current value of the 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.

Returns:
symbolic type name for the element.
bool haveDelta (  ) const

Check presence of the delta element.

Returns:
TRUE if the element is available.
bool haveTitle (  ) const

Check presence of the title attribute.

Returns:
TRUE if the attribute is available.
ms_quant_localdef & operator= ( const ms_quant_localdef right )

C++ style assignment operator.

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

Parameters:
deltaa 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.

Parameters:
titlea new value for the attribute.
bool updateIgnore ( const int  idx,
const ms_quant_composition ignore 
)

Update the information for a specific Ignore element.

Parameters:
idxa zero-based index of the element to update.
ignorean instance to copy the content from.
Returns:
TRUE if the element has been successfully updated and FALSE otherwise.
bool updateSpecificity ( const int  idx,
const ms_quant_specificity specificity 
)

Update the information for a specific specificity element.

Parameters:
idxa zero-based index of the element to update.
specificityan instance to copy the content from.
Returns:
TRUE if the element has been 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 © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:54