Matrix Science header
Public Member Functions

ms_wwwoptions Class Reference
[Mascot configuration files module]

Represents the whole WWW section. More...

#include <ms_wwwoptions.hpp>

Inheritance diagram for ms_wwwoptions:
Inheritance graph
[legend]
Collaboration diagram for ms_wwwoptions:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ms_wwwoptions ()
 Default constructor.
 ms_wwwoptions (const ms_wwwoptions &src)
 Copying constructor.
 ~ms_wwwoptions ()
 Destructor.
void appendEntry (const ms_wwwentry *item)
 Append a new entry which is a copy of the only parameter.
void clearEntries ()
 Deletes all entries from the list.
void copyFrom (const ms_wwwoptions *right)
 Can be used to create a copy of another object.
void defaultValues ()
 Initialises the instance with default values.
void dropEntry (const int index)
 Make the entry at the given index unavailable.
const ms_wwwentrygetEntry (const int index) const
 Returns an entry by its index.
int getNumberOfEntries () const
 Returns the total number of entries in the section.
std::string getPreceedingComments () const
 Returns any comments preceeding the section.
const ms_wwwentrygetRepEntryByName (const char *dbName) const
 Searches the entries list for the given name and type of REP.
const ms_wwwentrygetSeqEntryByName (const char *dbName) const
 Searches the entries list for the given name and type of SEQ.
bool isSectionAvailable () const
 Check whether the section has been actually read from the file.
ms_wwwoptionsoperator= (const ms_wwwoptions &right)
 Assignment operator for C++ client applications.
void setEntry (const int index, const ms_wwwentry *item)
 Update the entry at the given index.
void setPreceedingComments (const std::string &comments)
 Sets any comments preceeding the section.
void setSectionAvailable (const bool value)
 Changes availability of the section, i.e. whether it should be saved in a file.

Detailed Description

Represents the whole WWW section.

The WWW section defines where CGI scripts look for the information needed to compile a results report. At least one entry is required for each database, to define the source from which the sequence string of a database entry can be obtained. A second line can optionally define the source from which the full text report of an entry can be obtained. The syntax is very similar in both cases, independent of whether the information originates locally or on a remote system.

An instance of this class holds a list of entries (see ms_wwwentry) that can be obtained and dealt with individually. By default the list is empty.

For detailed information on any of the options please consult the Mascot manual.

Also get yourselves acquainted with the base class ms_customproperty. It facilitates the following tasks:

More functionality is described in the documentation for ms_customproperty.

Examples:

config_mascotdat.cpp.


Member Function Documentation

void dropEntry ( const int  index )

Make the entry at the given index unavailable.

This is achieved by deleting the corresponding line from the mascot.dat file. This does not affect the indices of other entries in this instance of the object. In other words, dropping an entry will reset the value at that index to a default, and the gap is plugged the next time the file is loaded.

Parameters:
indexThe index of the entry to delete, between 0 and getNumberOfEntries()-1.
const ms_wwwentry * getEntry ( const int  index ) const

Returns an entry by its index.

See getNumberOfEntries() for more information.

Parameters:
indexThe entry to return, between 0 and getNumberOfEntries()-1.
Returns:
pointer to an entry
Examples:
config_mascotdat.cpp.
int getNumberOfEntries (  ) const

Returns the total number of entries in the section.

Note that there might be several entries associated with each database. Therefore, total number of entries differs with the number of databases in Databases section.

The entries are not ordered and are represented as is. Use specific functions such as getSeqEntryByName() and getRepEntryByName() to retrieve the entry by name, or getEntry() by the entry index.

Returns:
number of entries
Examples:
config_mascotdat.cpp.
std::string getPreceedingComments (  ) const [inherited]

Returns any comments preceeding the section.

Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.

Multiple line comments are supported by having a single string with newline characters

See also:
setPreceedingComments()
Returns:
any comments preceeding the section
const ms_wwwentry * getRepEntryByName ( const char *  dbName ) const

Searches the entries list for the given name and type of REP.

If an entry is not found, a null value is returned. Note that database names are case sensitive.

Parameters:
dbNamename to get entry from
Returns:
pointer to an entry whose name is in parameter
const ms_wwwentry * getSeqEntryByName ( const char *  dbName ) const

Searches the entries list for the given name and type of SEQ.

If an entry is not found, a null value is returned. Note that database names are case sensitive.

Parameters:
dbNamename to get entry from
Returns:
pointer to an entry whose name is in parameter
bool isSectionAvailable (  ) const

Check whether the section has been actually read from the file.

By default the WWW section is unavailable until it has been set to a different state.

Returns:
true if the section has been set to available, false otherwise
Examples:
config_mascotdat.cpp.
void setEntry ( const int  index,
const ms_wwwentry item 
)

Update the entry at the given index.

Parameters:
indexThe index of the entry to update, between 0 and getNumberOfEntries()-1.
itemThe data to update with. Member fields of item will copied to the underlying object.
void setPreceedingComments ( const std::string &  comments ) [inherited]

Sets any comments preceeding the section.

Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.

Multiple line comments are supported by having a single string with newline characters

See also:
getPreceedingComments()
Parameters:
commentsany comments preceeding the section

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:39