CycloBranch
cBrick Class Reference

The class representing a building block (brick). More...

#include <cBrick.h>

Public Member Functions

 cBrick ()
 The constructor.
 
void clear ()
 Clear all variables.
 
bool empty ()
 Test whether the brick is empty. More...
 
string & getName ()
 Access to a string variable which stores a full name of the brick. More...
 
void setName (const string &name)
 Set a full name of the brick. More...
 
string & getSummary ()
 Access to a string variable which stores a molecular formula of the brick. More...
 
map< string, int > & getSummaryMap ()
 Access to a map which stores a molecular formula of the brick. More...
 
vector< string > & getAcronyms ()
 Access to a vector of strings which stores acronyms of all izomers corresponding to the brick. More...
 
string & getLosses ()
 Access to a string variable which stores a list of neutral losses. More...
 
vector< int > & getLossIDs ()
 Access to a vector of identifiers of neutral losses. More...
 
vector< string > & getReferences ()
 Access to a vector of strings which stores references (e.g., to ChemSpider) of all izomers corresponding to the brick. More...
 
string & getComposition ()
 Access to a string containing composition of the brick (ids of bricks separated by '-') More...
 
string getReverseComposition ()
 Reverse the composition of the brick. More...
 
double getMass () const
 Get the mass of the brick. More...
 
void setMass (double mass)
 Set the mass of the brick. More...
 
void setComposition (const string &composition, bool normalize)
 Set the composition of the brick. More...
 
void setSummary (const string &summary)
 Set the summary molecular formula of the brick. More...
 
void createSummaryMap ()
 Create a map of atoms from the molecular formula.
 
void setAcronyms (const string &acronyms)
 Set acronyms of all izomers corresponding to the brick. More...
 
void setLosses (const string &str)
 Set the list of losses. More...
 
void setLossIDs (vector< int > &lossids)
 Set a vector of identifiers of neutral losses. More...
 
void setReferences (const string &references)
 Set references (e.g., to ChemSpider) of all izomers corresponding to the brick. More...
 
void normalizeComposition ()
 Normalize the composition of the brick (ids of bricks are sorted in ascending order).
 
void explodeToIntComposition (vector< int > &bricks)
 Explode the composition of the brick into a vector of intergers (ids of subbricks). More...
 
void explodeToStringComposition (vector< string > &bricks)
 Explode the composition of the brick into a vector of strings (ids of subbricks). More...
 
string getAcronymsAsString ()
 Get all acronyms. More...
 
string getReferencesAsString ()
 Get all references. More...
 
string getFirstAcronymAsString ()
 Get the first acronym. More...
 
string getAcronymsWithReferencesAsHTMLString ()
 Get all acronyms with HTML links to theirs references. More...
 
void setArtificial (bool artificial)
 Set a flag determining whether the brick is a calculated mass block or a regular brick. More...
 
bool isArtificial ()
 Get a flag determining whether the brick is a calculated mass block or a regular brick. More...
 
void setResidueLossType (eResidueLossType residuelosstype)
 Set the residue loss type. More...
 
eResidueLossType getResidueLossType ()
 Get the residue loss type. More...
 
void store (ofstream &os)
 Store the structure into an output stream. More...
 
void load (ifstream &is)
 Load the structure from an input stream. More...
 

Detailed Description

The class representing a building block (brick).

Member Function Documentation

◆ empty()

bool cBrick::empty ( )

Test whether the brick is empty.

Return values
trueif the brick is empty

◆ explodeToIntComposition()

void cBrick::explodeToIntComposition ( vector< int > &  bricks)

Explode the composition of the brick into a vector of intergers (ids of subbricks).

Parameters
bricksreference to a vector of integers

◆ explodeToStringComposition()

void cBrick::explodeToStringComposition ( vector< string > &  bricks)

Explode the composition of the brick into a vector of strings (ids of subbricks).

Parameters
bricksreference to a vector of strings

◆ getAcronyms()

vector< string > & cBrick::getAcronyms ( )

Access to a vector of strings which stores acronyms of all izomers corresponding to the brick.

Return values
referenceto a vector of strings

◆ getAcronymsAsString()

string cBrick::getAcronymsAsString ( )

Get all acronyms.

Return values
stringacronyms of all izomers separated by '/'

◆ getAcronymsWithReferencesAsHTMLString()

string cBrick::getAcronymsWithReferencesAsHTMLString ( )

Get all acronyms with HTML links to theirs references.

Return values
stringacronyms of all izomers with HTML references separated by '/'

◆ getComposition()

string & cBrick::getComposition ( )

Access to a string containing composition of the brick (ids of bricks separated by '-')

Return values
referenceto a string

◆ getFirstAcronymAsString()

string cBrick::getFirstAcronymAsString ( )

Get the first acronym.

Return values
stringacronym of the first izomer

◆ getLosses()

string & cBrick::getLosses ( )

Access to a string variable which stores a list of neutral losses.

Return values
referenceto a string

◆ getLossIDs()

vector< int > & cBrick::getLossIDs ( )

Access to a vector of identifiers of neutral losses.

Return values
referenceto a vector of identifiers of neutral losses

◆ getMass()

double cBrick::getMass ( ) const

Get the mass of the brick.

Return values
doublemass

◆ getName()

string & cBrick::getName ( )

Access to a string variable which stores a full name of the brick.

Return values
referenceto a string

◆ getReferences()

vector< string > & cBrick::getReferences ( )

Access to a vector of strings which stores references (e.g., to ChemSpider) of all izomers corresponding to the brick.

Return values
referenceto a vector of strings

◆ getReferencesAsString()

string cBrick::getReferencesAsString ( )

Get all references.

Return values
stringreferences of all izomers separated by '/'

◆ getResidueLossType()

eResidueLossType cBrick::getResidueLossType ( )

Get the residue loss type.

Return values
eResidueLossTypethe residue loss type.

◆ getReverseComposition()

string cBrick::getReverseComposition ( )

Reverse the composition of the brick.

Return values
stringwith reverted composition of bricks (ids of bricks separated by '-')

◆ getSummary()

string & cBrick::getSummary ( )

Access to a string variable which stores a molecular formula of the brick.

Return values
referenceto a string

◆ getSummaryMap()

map< string, int > & cBrick::getSummaryMap ( )

Access to a map which stores a molecular formula of the brick.

Return values
map<string,int>reference to a map

◆ isArtificial()

bool cBrick::isArtificial ( )

Get a flag determining whether the brick is a calculated mass block or a regular brick.

Return values
booltrue when the brick is a calculated mass block; false when the brick is a regular brick.

◆ load()

void cBrick::load ( ifstream &  is)

Load the structure from an input stream.

Parameters
isan input stream

◆ setAcronyms()

void cBrick::setAcronyms ( const string &  acronyms)

Set acronyms of all izomers corresponding to the brick.

Parameters
acronymsreference to a string where the acronyms are separated by '/'

◆ setArtificial()

void cBrick::setArtificial ( bool  artificial)

Set a flag determining whether the brick is a calculated mass block or a regular brick.

Parameters
artificialtrue when the brick is a calculated mass block; false when the brick is a regular brick.

◆ setComposition()

void cBrick::setComposition ( const string &  composition,
bool  normalize 
)

Set the composition of the brick.

Parameters
compositionreference to a string with composition (ids of bricks separated by '-')
normalizeif true then ids of bricks are sorted in ascending order

◆ setLosses()

void cBrick::setLosses ( const string &  str)

Set the list of losses.

Parameters
strreference to a string

◆ setLossIDs()

void cBrick::setLossIDs ( vector< int > &  lossids)

Set a vector of identifiers of neutral losses.

Parameters
lossidsa vector of identifiers of neutral losses

◆ setMass()

void cBrick::setMass ( double  mass)

Set the mass of the brick.

Parameters
massmass of the brick

◆ setName()

void cBrick::setName ( const string &  name)

Set a full name of the brick.

Parameters
namereference to a string

◆ setReferences()

void cBrick::setReferences ( const string &  references)

Set references (e.g., to ChemSpider) of all izomers corresponding to the brick.

Parameters
referencesreference to a string where references to izomers are separated by '/'

◆ setResidueLossType()

void cBrick::setResidueLossType ( eResidueLossType  residuelosstype)

Set the residue loss type.

Parameters
residuelosstypethe residue loss type.

◆ setSummary()

void cBrick::setSummary ( const string &  summary)

Set the summary molecular formula of the brick.

Parameters
summaryreference to a string

◆ store()

void cBrick::store ( ofstream &  os)

Store the structure into an output stream.

Parameters
osan output stream

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