Evoplex  0.2.1
Functions
Base Plugin

Groups all the base fuctions available for any plugin (i.e., graph or model). More...

Functions

virtual bool evoplex::AbstractPlugin::init ()
 Initializes the plugin. More...
 
PRGevoplex::AbstractPlugin::prg () const
 pseudo-random generator pointer. More...
 
PRGevoplex::AbstractPlugin::rand () const
 prg() alias More...
 
const Attributesevoplex::AbstractPlugin::attrs () const
 Gets the plugin's attributes.
 
const QString & evoplex::AbstractPlugin::attrName (int attrId) const
 Gets the attribute's name for attrId. More...
 
const Valueevoplex::AbstractPlugin::attr (int attrId) const
 Gets the attribute's value for attrId. More...
 
Value evoplex::AbstractPlugin::attr (const QString &name, Value defaultValue=Value()) const
 Gets the value of the attribute name. More...
 
bool evoplex::AbstractPlugin::attrExists (const char *name) const
 Checks if the plugin's attribute name exists. More...
 
bool evoplex::AbstractPlugin::attrExists (const QString &name) const
 Checks if the plugin's attribute name exists. More...
 

Detailed Description

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

Function Documentation

◆ attr() [1/2]

const Value & evoplex::AbstractPlugin::attr ( int  attrId) const
inline

Gets the attribute's value for attrId.

Exceptions
std::out_of_rangeif 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
nameThe attribute name.
defaultValueA 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
nameThe 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
nameThe 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_rangeif 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

prg() alias

See also
prg()