copasi API
0.1
|
#include <CMetabNameInterface.h>
Public Member Functions | |
CMetabNameInterface () | |
~CMetabNameInterface () | |
Static Public Member Functions | |
static std::string | getDisplayName (const CModel *model, const std::string &key) |
static std::string | getDisplayName (const CModel *model, const CMetab &metab) |
static std::string | getDisplayName (const CModel *model, const std::string &metabolite, const std::string &compartment) |
static std::string | getMetaboliteKey (const CModel *model, const std::string &metabolite, const std::string &compartment) |
static CMetab * | getMetabolite (const CModel *model, const std::string &metabolite, const std::string &compartment) |
static bool | isUnique (const CModel *model, const std::string &name) |
static bool | doesExist (const CModel *model, const std::string &metabolite, const std::string &compartment) |
static std::pair< std::string, std::string > | splitDisplayName (const std::string &name) |
This class handels the display names of metabolites. It converts "Species" to "Species {Compartment}" if the metabolite name is not unique. If it is unique (that means it occurs in only one compartment) then the "{Compartment}" is not added. :pos 51.5,-17.9
CMetabNameInterface::CMetabNameInterface | ( | ) |
CMetabNameInterface::~CMetabNameInterface | ( | ) |
bool CMetabNameInterface::doesExist | ( | const CModel * | model, |
const std::string & | metabolite, | ||
const std::string & | compartment | ||
) | [static] |
This returns whether a metabolite with the given name does exist. If a compartment is also given (as an appendix to the name) then it only returns true if the metabolite exists in the specified compartment.
std::string CMetabNameInterface::getDisplayName | ( | const CModel * | model, |
const std::string & | key | ||
) | [static] |
This returns a name to use for display in the gui. If the name of the metabolite is unique it is used unaltered. If it is not then the compartment is added to the name to make it unique.
std::string CMetabNameInterface::getDisplayName | ( | const CModel * | model, |
const CMetab & | metab | ||
) | [static] |
This returns a name to use for display in the gui. If the name of the metabolite is unique it is used unaltered. If it is not then the compartment is added to the name to make it unique.
std::string CMetabNameInterface::getDisplayName | ( | const CModel * | model, |
const std::string & | metabolite, | ||
const std::string & | compartment | ||
) | [static] |
This returns a name to use for display in the gui. If the name of the metabolite is unique it is used unaltered. If it is not then the compartment is added to the name to make it unique.
CMetab * CMetabNameInterface::getMetabolite | ( | const CModel * | model, |
const std::string & | metabolite, | ||
const std::string & | compartment | ||
) | [static] |
std::string CMetabNameInterface::getMetaboliteKey | ( | const CModel * | model, |
const std::string & | metabolite, | ||
const std::string & | compartment | ||
) | [static] |
This tries to find the metabolite with the given name. If the name is not unique and is given without a compartment then the first occurence of a metabolite with this name is returned.
bool CMetabNameInterface::isUnique | ( | const CModel * | model, |
const std::string & | name | ||
) | [static] |
This returns whether the metabolite name is unique.
std::pair< std::string, std::string > CMetabNameInterface::splitDisplayName | ( | const std::string & | name | ) | [static] |