Matrix Science header
Public Member Functions

ms_quant_modgroup Class Reference
[Mascot configuration files module]

An object of this class represent a single modification group element in quantitation.xml. More...

#include <ms_quant_modgroup.hpp>

List of all members.

Public Member Functions

 ms_quant_modgroup ()
 Default constructor.
 ms_quant_modgroup (const ms_quant_modgroup &src)
 Copying constructor.
virtual ~ms_quant_modgroup ()
 Destructor.
void appendLocalDefinition (const ms_quant_localdef *localdef)
 Adds a new local_definition element at the end of the list.
void appendModFile (const char *mod)
 Adds a new mod_file at the end of the list.
void appendUnmodified (const ms_quant_unmodified *unmodified)
 Adds a new unmodified element at the end of the list.
void clearLocalDefinitions ()
 Deletes all local_definition elements from the list.
void clearModFiles ()
 Deletes all mod_file elements from the list.
void clearUnmodified ()
 Deletes all unmodified elements from the list.
void copyFrom (const ms_quant_modgroup *right)
 Copies all content from another instance.
void defaultValues ()
 Call this member if you want to start again.
bool deleteLocalDefinition (const int idx)
 Removes a local_definition element from the list.
bool deleteModFile (const int idx)
 Removes mod_file element from the list.
bool deleteUnmodified (const int idx)
 Removes an unmodified element from the list.
void dropMode ()
 Delete the mode attribute.
void dropName ()
 Delete the name attribute.
void dropRequired ()
 Delete the required attribute.
int findModFile (const char *mod) const
 Return zero-based index of a mod_file if it is found in the list, -1 otherwise.
const ms_quant_localdefgetLocalDefinition (const int idx) const
 Returns a local_definition element object by its number.
std::string getLocalDefinitionSchemaType () const
 Obtain a symbolic name for the local_definition element schema type.
std::string getMode () const
 Returns the value of the mode attribute.
std::string getModeSchemaType () const
 Obtain a symbolic name for the mode attribute schema type.
std::string getModFile (const int idx) const
 Returns mod_file element content by its number.
std::string getModFileSchemaType () const
 Obtain a symbolic name for the mod_file 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 getNumberOfLocalDefinitions () const
 Returns the number of nested local_definition elements.
int getNumberOfModFiles () const
 Returns the number of nested mod_file elements.
int getNumberOfUnmodified () const
 Returns the number of nested unmodified elements.
std::string getRequiredSchemaType () const
 Obtain a symbolic name for the required attribute schema type.
virtual std::string getSchemaType () const
 Returns name of the schema type that can be used to validate this element.
const ms_quant_unmodifiedgetUnmodified (const int idx) const
 Returns an unmodified element object by its number.
std::string getUnmodifiedSchemaType () const
 Obtain a symbolic name for the unmodified element schema type.
bool haveMode () const
 Indicates presence of the mode attribute.
bool haveName () const
 Check for presence of the name attribute.
bool haveRequired () const
 Indicates presence of the required attribute.
bool isRequired () const
 Returns the value of the required attribute.
ms_quant_modgroupoperator= (const ms_quant_modgroup &right)
 C++ style assignment operator.
void setMode (const char *value)
 Set a custom value for the mode attribute.
void setName (const char *value)
 Set a custom value for the name attribute.
void setRequired (bool value)
 Set a custom value for the required attribute.
bool updateLocalDefinition (const int idx, const ms_quant_localdef *localdef)
 Supply new content for one of the local_definition elements in the list.
bool updateUnmodified (const int idx, const ms_quant_unmodified *unmodified)
 Supply new content for one of the unmodified elements in the list.
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 single modification group element in quantitation.xml.

Grouping to enable mode constraint (e.g. exclusive) to apply to a set of modifications.


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 appendLocalDefinition ( const ms_quant_localdef localdef )

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

Parameters:
localdefa new element to be added to the list.
void appendModFile ( const char *  mod )

Adds a new mod_file at the end of the list.

Parameters:
moda title from the Mascot mod_file.
void appendUnmodified ( const ms_quant_unmodified unmodified )

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

Parameters:
unmodifieda new element to be added to the list.
void copyFrom ( const ms_quant_modgroup 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 deleteLocalDefinition ( const int  idx )

Removes a local_definition element from the list.

Parameters:
idxa zero based index of the local_definition element to delete from the list.
Returns:
true if the index is in rage, false otherwise
bool deleteModFile ( const int  idx )

Removes mod_file element from the list.

Parameters:
idxzero based index of the element to remove.
Returns:
TRUE if the element has been successfully removed and FALSE otherwise.
bool deleteUnmodified ( const int  idx )

Removes an unmodified element from the list.

Parameters:
idxa zero based index of the unmodified element to delete from the list.
Returns:
true if the index is in range, false otherwise
void dropMode (  )

Delete the mode attribute.

Disables the attribute until it is re-set.

void dropName (  )

Delete the name attribute.

Deletes the attribute until it is re-set.

void dropRequired (  )

Delete the required attribute.

Disables the attribute until it is re-set.

int findModFile ( const char *  mod ) const

Return zero-based index of a mod_file if it is found in the list, -1 otherwise.

Parameters:
moda title from the Mascot mod_file.
Returns:
zero-based index of a mod_file if it is found in the list, otherwise -1.
const ms_quant_localdef * getLocalDefinition ( const int  idx ) const

Returns a local_definition 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 getLocalDefinitionSchemaType (  ) const

Obtain a symbolic name for the local_definition 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 getMode (  ) const

Returns the value of the mode attribute.

"Mode" is one of fixed, variable or exclusive. Applies to all the modifications in the group.

Returns:
current value of the mode attribute.
std::string getModeSchemaType (  ) const

Obtain a symbolic name for the mode 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.
std::string getModFile ( const int  idx ) const

Returns mod_file element content by its number.

Parameters:
idxzero based index of the mod_file element.
Returns:
mod_file element content.
std::string getModFileSchemaType (  ) const

Obtain a symbolic name for the mod_file 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.
int getNumberOfLocalDefinitions (  ) const

Returns the number of nested local_definition elements.

Returns:
total number of nested local_definition elements.
int getNumberOfModFiles (  ) const

Returns the number of nested mod_file elements.

Returns:
total number of nested mod_file elements.
int getNumberOfUnmodified (  ) const

Returns the number of nested unmodified elements.

Returns:
total number of nested unmodified elements.
std::string getRequiredSchemaType (  ) const

Obtain a symbolic name for the required 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.
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_unmodified * getUnmodified ( const int  idx ) const

Returns an unmodified 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 getUnmodifiedSchemaType (  ) const

Obtain a symbolic name for the unmodified 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.
bool haveMode (  ) const

Indicates presence of the mode attribute.

You should always check for the presence of an attribute before retrieving its actual value.

Returns:
TRUE if the attribute is present in current element and FALSE otherwise.
bool haveName (  ) const

Check for presence of the name attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveRequired (  ) const

Indicates presence of the required attribute.

You should always check for the presence of an attribute before retrieving its actual value.

Returns:
TRUE if the attribute is present in current element and FALSE otherwise.
bool isRequired (  ) const

Returns the value of the required attribute.

Modification required for a peptide to be part of a component. Does not affect the Mascot search.

Returns:
current value of the required attribute.
ms_quant_modgroup & operator= ( const ms_quant_modgroup right )

C++ style assignment operator.

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

Set a custom value for the mode attribute.

An attribute becomes present after it is value has been set at least once. To disable it again call dropMode().

Parameters:
valuea new value for the attribute.
void setName ( const char *  value )

Set a custom value for the name attribute.

Parameters:
valuea new value for the attribute.
void setRequired ( bool  value )

Set a custom value for the required attribute.

An attribute becomes present after it is value has been set at least once. To disable it again call dropRequired().

Parameters:
valuea new value for the attribute.
bool updateLocalDefinition ( const int  idx,
const ms_quant_localdef localdef 
)

Supply new content for one of the local_definition elements in the list.

Parameters:
idxa zero based index of the element to update.
localdefa source to copy the content from.
Returns:
TRUE if the element has been successfully updated.
bool updateUnmodified ( const int  idx,
const ms_quant_unmodified unmodified 
)

Supply new content for one of the unmodified elements in the list.

Parameters:
idxa zero based index of the element to update.
unmodifieda source to copy the content from.
Returns:
TRUE if the element has been successfully updated.
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