Evoplex  0.2.1
Classes | Public Member Functions | List of all members
evoplex::AGDiffFunctions Class Reference

This class is used to generate a set of Attributes using different functions for each attribute. More...

#include <attrsgenerator.h>

Inheritance diagram for evoplex::AGDiffFunctions:
evoplex::AttrsGenerator evoplex::AttrsGeneratorInterface

Classes

struct  AttrCmd
 The attribute's command struct. More...
 

Public Member Functions

 AGDiffFunctions (const AttributesScope &attrsScope, const int size, const std::vector< AttrCmd > &attrCmds)
 Constructor. More...
 
SetOfAttributes create (int size=-1, std::function< void(int)> progress=[](int){}) override
 Creates a set of attributes. More...
 
const std::vector< AttrCmd > & attrCmds () const
 Gets the attribute's commands.
 
- Public Member Functions inherited from evoplex::AttrsGenerator
virtual ~AttrsGenerator ()=default
 Destructor.
 
AttributesScope attrsScope () const
 Gets the attribute's scope.
 
const QString & command ()
 Gets the source command for the AttrsGenerator object.
 
int size () const
 Gets the size of the set of attributes.
 
- Public Member Functions inherited from evoplex::AttrsGeneratorInterface
virtual ~AttrsGeneratorInterface ()=default
 Destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from evoplex::AttrsGenerator
static AttrsGeneratorPtr parse (const AttributesScope &attrsScope, const QString &cmd, QString &error)
 Creates a AttrsGenerator object from a command. More...
 
static Value parseRandSeed (QString seedStr)
 Parse a 'rand_seed' command. More...
 
- Protected Member Functions inherited from evoplex::AttrsGenerator
 AttrsGenerator (const AttributesScope &attrsScope, const int size)
 Constructor. More...
 
- Protected Attributes inherited from evoplex::AttrsGenerator
const AttributesScope m_attrsScope
 
const int m_size
 
QString m_command
 

Detailed Description

This class is used to generate a set of Attributes using different functions for each attribute.

See also
AttrsGenerator, AGDiffFunctions

Constructor & Destructor Documentation

◆ AGDiffFunctions()

evoplex::AGDiffFunctions::AGDiffFunctions ( const AttributesScope &  attrsScope,
const int  size,
const std::vector< AttrCmd > &  attrCmds 
)
explicit

Constructor.

Parameters
attrsScopeThe attribute's scope.
sizeThe size of the generated set of attributes.
attrCmdsThe attribute's commands.
See also
AttrsGenerator::parse

Member Function Documentation

◆ create()

SetOfAttributes evoplex::AGDiffFunctions::create ( int  size = -1,
std::function< void(int)>  progress = [](int){} 
)
overridevirtual

Creates a set of attributes.

Parameters
sizeThe number of Atributes objects.
progressA callback std::function that can be used to track the progress, which is an integer from 0 to size.
Returns
A vector of Attributes.

Implements evoplex::AttrsGeneratorInterface.


The documentation for this class was generated from the following file: