Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_distiller_master_project Class Reference

Data for a Distiller master project, includes a list of the subprojects. More...

#include <ms_distiller_master_project.hpp>

Inheritance diagram for ms_distiller_master_project:
Collaboration diagram for ms_distiller_master_project:

Public Member Functions

 ms_distiller_master_project (const ms_distiller_master_project &src)
 
void appendErrors (const ms_errors &src)
 Copies all errors from another instance and appends them at the end of own list.
 
void clearAllErrors ()
 Remove all errors from the current list of errors.
 
void copyFrom (const ms_distiller_master_project *right)
 
void copyFrom (const ms_errors *right)
 Use this member to make a copy of another instance.
 
const ms_errsgetErrorHandler () const
 Retrive the error object using this function to get access to all errors and error parameters.
 
int getLastError () const
 Return the error description of the last error that occurred.
 
std::string getLastErrorString () const
 Return the error description of the last error that occurred.
 
virtual int getNumSearches () const
 Return the number of searches in the master project.
 
virtual int getNumSubprojects () const
 Return the number of subprojects in the master project.
 
virtual const ms_distiller_master_searchgetSearch (int index) const
 Return the selected search (index 1..n).
 
virtual const ms_distiller_sub_projectgetSubproject (int index) const
 Return the selected subproject (index 1..n).
 
bool isValid () const
 Call this function to determine if there have been any errors.
 
virtual bool loadXml (const char *xmlSchemaPath, std::string xmlText)
 Load master project data from the supplied XML text.
 
virtual bool loadXmlFile (const char *xmlSchemaPath, std::string xmlFilename)
 Load master project data from the XML in the named file.
 
virtual bool loadXmlStream (const char *xmlSchemaPath, matrix_science::ms_input_string_stream *xmlStream)
 Load master project data from a stream.
 
ms_distiller_master_projectoperator= (const ms_distiller_master_project &right)
 

Static Public Member Functions

static std::string getMasterProjectStreamName ()
 Return the name of the stream, within the project file, used for the master project list.
 

Detailed Description

Data for a Distiller master project, includes a list of the subprojects.

This is stored in XML in the 'rover_data+2' stream.

Constructor & Destructor Documentation

◆ ms_distiller_master_project()

Parameters
srcis the source to initialise from

Member Function Documentation

◆ appendErrors()

void appendErrors ( const ms_errors src)
inherited

Copies all errors from another instance and appends them at the end of own list.

Parameters
srcThe object to copy the errors across from. See Maintaining object references: two rules of thumb.

◆ clearAllErrors()

void clearAllErrors ( )
inherited

Remove all errors from the current list of errors.

The list of 'errors' can include fatal errors, warning messages, information messages and different levels of debugging messages.

All messages are accumulated into a list in this object, until clearAllErrors() is called.

See Error Handling.

See also
isValid(), getLastError(), getLastErrorString(), getErrorHandler()
Examples
common_error.cpp, resfile_error.cpp, and resfile_summary.cpp.

◆ copyFrom() [1/2]

void copyFrom ( const ms_distiller_master_project right)
Parameters
rightis the source to initialise from

◆ copyFrom() [2/2]

void copyFrom ( const ms_errors right)
inherited

Use this member to make a copy of another instance.

Parameters
rightis the source to initialise from

◆ getErrorHandler()

const ms_errs * getErrorHandler ( ) const
inherited

Retrive the error object using this function to get access to all errors and error parameters.

See Error Handling.

Returns
Constant pointer to the error handler
See also
isValid(), getLastError(), getLastErrorString(), clearAllErrors(), getErrorHandler()
Examples
common_error.cpp, and http_helper_getstring.cpp.

◆ getLastError()

int getLastError ( ) const
inherited

Return the error description of the last error that occurred.

All errors are accumulated into a list in this object, until clearAllErrors() is called. This function returns the last error that occurred.

See Error Handling.

See also
isValid(), getLastErrorString(), clearAllErrors(), getErrorHandler()
Returns
the error number of the last error, or 0 if there have been no errors.

◆ getLastErrorString()

std::string getLastErrorString ( ) const
inherited

Return the error description of the last error that occurred.

All errors are accumulated into a list in this object, until clearAllErrors() is called. This function returns the last error that occurred.

Returns
Most recent error, warning, information or debug message

See Error Handling.

See also
isValid(), getLastError(), clearAllErrors(), getErrorHandler()
Examples
common_error.cpp, config_enzymes.cpp, config_fragrules.cpp, config_license.cpp, config_mascotdat.cpp, config_masses.cpp, config_modfile.cpp, config_procs.cpp, config_quantitation.cpp, config_taxonomy.cpp, http_helper_getstring.cpp, and tools_aahelper.cpp.

◆ getMasterProjectStreamName()

std::string getMasterProjectStreamName ( )
static

Return the name of the stream, within the project file, used for the master project list.

Returns
The name of the stream containing the master project data.

◆ getNumSearches()

int getNumSearches ( ) const
virtual

Return the number of searches in the master project.

Returns
The number of searches in the master project.

◆ getNumSubprojects()

int getNumSubprojects ( ) const
virtual

Return the number of subprojects in the master project.

Returns
The number of subprojects in the master project.

◆ getSearch()

const matrix_science::ms_distiller_master_search & getSearch ( int  index) const
virtual

Return the selected search (index 1..n).

Parameters
indexThe search's index (1..getNumSearches()).
Returns
The selected search.

◆ getSubproject()

const matrix_science::ms_distiller_sub_project & getSubproject ( int  index) const
virtual

Return the selected subproject (index 1..n).

Parameters
indexThe project's index (1..getNumSubprojects()).
Returns
The selected project.

◆ isValid()

bool isValid ( ) const
inherited

◆ loadXml()

bool loadXml ( const char *  xmlSchemaPath,
std::string  xmlText 
)
virtual

Load master project data from the supplied XML text.

Parameters
xmlSchemaPathThe folder where the XML schema files (XSD) can be found.
xmlTextThe XML data to load.
Returns
True if the XML file was parsed and loaded successfully.

◆ loadXmlFile()

bool loadXmlFile ( const char *  xmlSchemaPath,
std::string  xmlFilename 
)
virtual

Load master project data from the XML in the named file.

If the schema path contains spaces, it should be prefixed with "file:///" and the spaces should be replaced with "%20"

Parameters
xmlSchemaPathThe folder where the XML schema files (XSD) can be found.
xmlFilenameThe path and filename of the XML file to load.
Returns
True if the XML file was parsed and loaded successfully.

◆ loadXmlStream()

bool loadXmlStream ( const char *  xmlSchemaPath,
matrix_science::ms_input_string_stream *  xmlStream 
)
virtual

Load master project data from a stream.

Parameters
xmlSchemaPathThe path to the location of the XML schema (XSD) files.
xmlStreamThe stream interface offering the data.
Returns
True if the data was parsed and loaded successfully.

◆ operator=()

Parameters
rightis the source to initialise from
Returns
reference to the current object

The documentation for this class was generated from the following files: