Static abstract class keeping track of a predefined biological processes, their Id's, internal and displayed names as well as various data.
More...
#include <bio_process_registry.h>
|
| static luabind::scope | luaBindings () |
| | Lua bindings. More...
|
| |
|
static void | loadFromXML (const std::string &filename) |
| |
| static BioProcessId | registerBioProcess (const std::string &internalName, const std::string &displayName, int energyCost, double speedFactor, std::vector< std::pair< CompoundId, int >> inputCompounds, std::vector< std::pair< CompoundId, int >> outputCompounds) |
| | Registers a new process type. More...
|
| |
| static std::string | getDisplayName (BioProcessId id) |
| | Obtains the display name of an compound. More...
|
| |
| static std::string | getInternalName (BioProcessId id) |
| | Obtains the internal name of an compound. More...
|
| |
|
static double | getSpeedFactor (BioProcessId id) |
| |
|
static int | getEnergyCost (BioProcessId id) |
| |
| static BioProcessId | getId (const std::string &internalName) |
| | Obtains the Id of an internal name corresponding to a registered process. More...
|
| |
| static const BoostCompoundMapIterator | getList () |
| | Obtains the IDs of all currently registered concepts. More...
|
| |
|
static const std::vector< std::pair< CompoundId, int > > & | getInputCompounds (BioProcessId id) |
| |
|
static const std::vector< std::pair< CompoundId, int > > & | getOutputCompounds (BioProcessId id) |
| |
Static abstract class keeping track of a predefined biological processes, their Id's, internal and displayed names as well as various data.
Preferably this would hold process objects in the future, but currently it just holds data for certain lua considerations
| std::string BioProcessRegistry::getDisplayName |
( |
BioProcessId |
id | ) |
|
|
static |
Obtains the display name of an compound.
- Parameters
-
| id | Id of the concept to obtain display name from |
- Returns
- Name to display to users
| BioProcessId BioProcessRegistry::getId |
( |
const std::string & |
internalName | ) |
|
|
static |
Obtains the Id of an internal name corresponding to a registered process.
- Parameters
-
| internalName | The internal name of the process. Must not already exist in collection or invalid_argument is thrown. |
- Returns
- Id of the process if it is registered. If compound is not registered an out_of_range exception is thrown.
| std::string BioProcessRegistry::getInternalName |
( |
BioProcessId |
id | ) |
|
|
static |
Obtains the internal name of an compound.
- Parameters
-
| id | Id of the compound to obtain internal name from |
- Returns
- Compound name for internal use
| const BoostCompoundMapIterator BioProcessRegistry::getList |
( |
| ) |
|
|
static |
Obtains the IDs of all currently registered concepts.
- Returns
- Array of all registered process IDs
| luabind::scope BioProcessRegistry::luaBindings |
( |
| ) |
|
|
static |
| BioProcessId BioProcessRegistry::registerBioProcess |
( |
const std::string & |
internalName, |
|
|
const std::string & |
displayName, |
|
|
int |
energyCost, |
|
|
double |
speedFactor, |
|
|
std::vector< std::pair< CompoundId, int >> |
inputCompounds, |
|
|
std::vector< std::pair< CompoundId, int >> |
outputCompounds |
|
) |
| |
|
static |
Registers a new process type.
- Parameters
-
| internalName | The name to be used internally for reference across game instances |
| displayName | Name to be displayed to users |
| energyCost | The amount of energy needed for a full cycle of this process |
| speedFactor | Speed of this process |
| inputCompounds | The compounds and amounts needed for this process |
| outputCompounds | The compounds and amounts produced by this process |
- Returns
- Id of new process
The documentation for this class was generated from the following files:
- /home/hhyyrylainen/Projects/thrive_install/thrive/src/microbe_stage/bio_process_registry.h
- /home/hhyyrylainen/Projects/thrive_install/thrive/src/microbe_stage/bio_process_registry.cpp