COPASI API
4.40.278
|
#include <CRegisteredCommonName.h>
Classes | |
class | ClassMemberRename |
class | Rename |
class | RenameInterface |
Public Member Functions | |
CRegisteredCommonName () | |
CRegisteredCommonName (const CRegisteredCommonName &src) | |
CRegisteredCommonName (const std::string &name) | |
~CRegisteredCommonName () | |
Public Member Functions inherited from CCommonName | |
CCommonName () | |
CCommonName (const CCommonName &src) | |
CCommonName (const char *name) | |
CCommonName (const std::string &name) | |
std::string::size_type | findNext (const std::string &toFind, const std::string::size_type &pos=0) const |
std::string::size_type | findPrevious (const std::string &toFind, const std::string::size_type &pos=std::string::npos) const |
size_t | getElementIndex (const size_t &pos=0) const |
std::string | getElementName (const size_t &pos, const bool &unescape=true) const |
std::string | getObjectName () const |
std::string | getObjectType () const |
CCommonName | getPrimary () const |
CCommonName | getRemainder () const |
void | split (CCommonName &parentCN, std::string &objectType, std::string &objectName) const |
~CCommonName () | |
Static Public Member Functions | |
static void | deregisterHandler (RenameInterface *pRenameHandler) |
static void | handle (const std::string &oldCN, const std::string &newCN) |
static const bool & | isEnabled () |
static void | registerHandler (RenameInterface *pRenameHandler) |
static void | sanitizeObjectNames () |
static void | setEnabled (const bool &enabled) |
Static Public Member Functions inherited from CCommonName | |
static std::string | compartmentNameFromCN (const CCommonName &cn) |
static std::string | construct (const CCommonName &parent, const std::string &objectType, const std::string &objectName) |
static std::string | escape (const std::string &name) |
static std::string | fromData (const CData &data) |
static std::string | nameFromCN (const CCommonName &cn) |
static std::string | unescape (const std::string &name) |
Static Private Attributes | |
static bool | mEnabled |
static std::set< RenameInterface * > | mRegisteredHandlers |
static std::set< CRegisteredCommonName * > | mSet |
CRegisteredCommonName::CRegisteredCommonName | ( | ) |
Default Constructor
References mSet.
CRegisteredCommonName::CRegisteredCommonName | ( | const CRegisteredCommonName & | src | ) |
CRegisteredCommonName::~CRegisteredCommonName | ( | ) |
Destructor
References mSet.
CRegisteredCommonName::CRegisteredCommonName | ( | const std::string & | name | ) |
|
static |
Deregister and additional handler
RenameInterface | * pRenameHandler |
References mRegisteredHandlers.
|
static |
Update all registered common names which contain the oldCN
const | std::string & oldCN |
const | std::string & newCN |
References mEnabled, mRegisteredHandlers, and mSet.
Referenced by CCompartment::addMetabolite(), CModelExpansion::replaceInMetab(), CMetab::setCompartment(), CDataObject::setObjectName(), and CDataObject::setObjectParent().
|
static |
Check whether the rename handler is enabled
References mEnabled.
Referenced by CDataObject::CDataObject(), CModel::compile(), CModelExpansion::replaceInMetab(), CMetab::setCompartment(), CDataObject::setObjectName(), and CDataObject::setObjectParent().
|
static |
Register and additional handler
RenameInterface | * pRenameHandler |
References mRegisteredHandlers.
|
static |
Old files (before build 171) may have common name where invalid characters have been used. This function sanitizes the name part
References CCommonName::escape(), CCommonName::findNext(), CCommonName::getElementName(), CCommonName::getObjectName(), CCommonName::getObjectType(), CCommonName::getRemainder(), mSet, and CDataObject::sanitizeObjectName().
Referenced by CCopasiXML::fixBuild171().
|
static |
Enable and disable the rename handler
const | bool & enabled |
References mEnabled.
Referenced by CDataObject::CDataObject(), CModel::compile(), CDataModel::importSBML(), CDataModel::importSBMLFromString(), CDataModel::importSEDML(), CDataModel::importSEDMLFromString(), CDataModel::loadModel(), CDataModel::newModel(), CModelExpansion::replaceInMetab(), CMetab::setCompartment(), and CDataModel::~CDataModel().
|
staticprivate |
A flag indicating whether renaming is enabled.
Referenced by handle(), isEnabled(), and setEnabled().
|
staticprivate |
A set of registered handlers
Referenced by deregisterHandler(), handle(), and registerHandler().
|
staticprivate |
A set which contains all registered comon names
Referenced by CRegisteredCommonName(), handle(), sanitizeObjectNames(), and ~CRegisteredCommonName().