Groups all the base fuctions available for any plugin (i.e., graph or model).
More...
Groups all the base fuctions available for any plugin (i.e., graph or model).
For more information: https://evoplex.org/docs/creating-plugins
- See also
- AbstractPlugin, AbstractGraph, AbstractModel
◆ attr() [1/2]
const Value & evoplex::AbstractPlugin::attr |
( |
int |
attrId | ) |
const |
|
inline |
Gets the attribute's value for attrId
.
- Exceptions
-
std::out_of_range | if no such data is present. |
◆ attr() [2/2]
Value evoplex::AbstractPlugin::attr |
( |
const QString & |
name, |
|
|
Value |
defaultValue = Value() |
|
) |
| const |
|
inline |
Gets the value of the attribute name
.
- Parameters
-
name | The attribute name. |
defaultValue | A Value to be returned if name is not present. |
- Returns
- The attribute's value.
◆ attrExists() [1/2]
bool evoplex::AbstractPlugin::attrExists |
( |
const char * |
name | ) |
const |
|
inline |
Checks if the plugin's attribute name
exists.
- Parameters
-
name | The name of the plugin's attribute. |
- Returns
- true
name
exists
◆ attrExists() [2/2]
bool evoplex::AbstractPlugin::attrExists |
( |
const QString & |
name | ) |
const |
|
inline |
Checks if the plugin's attribute name
exists.
- Parameters
-
name | The name of the plugin's attribute. |
- Returns
- true
name
exists
◆ attrName()
const QString & evoplex::AbstractPlugin::attrName |
( |
int |
attrId | ) |
const |
|
inline |
Gets the attribute's name for attrId
.
- Exceptions
-
std::out_of_range | if no such data is present. |
◆ init()
virtual bool evoplex::AbstractPlugin::init |
( |
| ) |
|
|
virtual |
Initializes the plugin.
This method is called when the plugin is created and is mainly used to validate inputs and set the environment. The default implementation does nothing.
- Returns
- true if successful
◆ prg()
PRG* evoplex::AbstractPlugin::prg |
( |
| ) |
const |
pseudo-random generator pointer.
This PRG is built with the Trial seed.
◆ rand()
PRG * evoplex::AbstractPlugin::rand |
( |
| ) |
const |
|
inline |