Represents the whole WWW
section.
More...
#include <ms_wwwoptions.hpp>
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_wwwentry * | getEntry (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_wwwentry * | getRepEntryByName (const char *dbName) const |
Searches the entries list for the given name and type of REP . | |
const ms_wwwentry * | getSeqEntryByName (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_wwwoptions & | operator= (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. |
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.
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.
index | The 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.
index | The entry to return, between 0 and getNumberOfEntries()-1. |
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.
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
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.
dbName | name to get entry from |
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.
dbName | name to get entry from |
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.
void setEntry | ( | const int | index, |
const ms_wwwentry * | item | ||
) |
Update the entry at the given index.
index | The index of the entry to update, between 0 and getNumberOfEntries()-1. |
item | The 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
comments | any comments preceeding the section |
Copyright © 2022 Matrix Science Ltd. All Rights Reserved. Generated on Thu Mar 31 2022 01:12:39 |