#include <CKeyFactory.h>
List of all members.
Classes |
| class | CDecisionVector |
| class | HashTable |
Public Member Functions |
| | CKeyFactory () |
| | ~CKeyFactory () |
| std::string | add (const std::string &prefix, CCopasiObject *pObject) |
| bool | addFix (const std::string &key, CCopasiObject *pObject) |
| bool | remove (const std::string &key) |
| CCopasiObject * | get (const std::string &key) |
Static Public Member Functions |
| static bool | isValidKey (const std::string &key, const std::string &prefix="") |
Protected Attributes |
| std::map< std::string, HashTable > | mKeyTable |
Static Protected Attributes |
| static CDecisionVector | isDigit |
| static CDecisionVector | isPrefix |
Constructor & Destructor Documentation
| CKeyFactory::CKeyFactory |
( |
| ) |
|
| CKeyFactory::~CKeyFactory |
( |
| ) |
|
Member Function Documentation
| std::string CKeyFactory::add |
( |
const std::string & |
prefix, |
|
|
CCopasiObject * |
pObject |
|
) |
| |
Add an object with a key generated from the given prefix to the key map. The return value is the actually generated key.
- Parameters:
-
- Returns:
- std::string key
| bool CKeyFactory::addFix |
( |
const std::string & |
key, |
|
|
CCopasiObject * |
pObject |
|
) |
| |
Add an object with a fix given key. The return value indicate whether the key was actually inserted.
- Parameters:
-
- Returns:
- bool success
Retreive the object referred by key from the key map.
- Parameters:
-
- Returns:
- CCopasiObject * pObject
| bool CKeyFactory::isValidKey |
( |
const std::string & |
key, |
|
|
const std::string & |
prefix = "" |
|
) |
| [static] |
check whether the key is valid
- Parameters:
-
| const | std::string & key |
| const | std::string & prefix (default: check for [_a-zA-Z]+_+) |
- Returns:
- bool isValid
CKeyFactory class. This class is used to create a unique key whithin COPASI. It also allows retreival of the CCopasiObject the key is assigned to.
Created for Copasi by Stefan Hoops 2003 Copyright Stefan Hoops
| bool CKeyFactory::remove |
( |
const std::string & |
key | ) |
|
Remove the key and the related object from the key map.
- Parameters:
-
- Returns:
- bool success
Member Data Documentation
Fast way to decide whether a character is a digit.
Fast way to decide whether a character is a valid part of the prefix.
A map of hash tables for the prefixes.
The documentation for this class was generated from the following files: