DynaMix  1.3.7
A new take on polymorphism in C++
mutation_rule.hpp File Reference
#include "global.hpp"
#include "mixin_collection.hpp"
#include <memory>

Classes

class  dynamix::mutation_rule
 Base class for all mutation rules. More...
 

Functions

mutation_rule_id DYNAMIX_API dynamix::add_new_mutation_rule (mutation_rule *rule)
 
mutation_rule_id DYNAMIX_API dynamix::add_mutation_rule (mutation_rule *rule)
 
mutation_rule_id DYNAMIX_API dynamix::add_mutation_rule (std::shared_ptr< mutation_rule > rule)
 
std::shared_ptr< mutation_rule > DYNAMIX_API dynamix::remove_mutation_rule (mutation_rule_id id)
 

Detailed Description

Functions and classes related to mutation rules.

Function Documentation

mutation_rule_id DYNAMIX_API dynamix::add_new_mutation_rule ( mutation_rule rule)

DEPRECATED: Adds a mutation rule to the domain. Takes ownership of the pointer and assumes it's created with new. Returns the mutation rule id by whitch it can be removed.

Does not perform a topological sort of the rules. It is the user's responsibility to add the mutation rules in the appropriate order.

mutation_rule_id DYNAMIX_API dynamix::add_mutation_rule ( mutation_rule rule)

Adds a mutation rule to the domain. Takes ownership of the pointer and assumes it's created with new. Returns the mutation rule id by whitch it can be removed.

Does not perform a topological sort of the rules. It is the user's responsibility to add the mutation rules in the appropriate order.

mutation_rule_id DYNAMIX_API dynamix::add_mutation_rule ( std::shared_ptr< mutation_rule rule)

Adds a mutation rule to the domain via a shared pointer. Returns the mutation rule id by whitch it can be removed.

Does not perform a topological sort of the rules. It is the user's responsibility to add the mutation rules in the appropriate order.

std::shared_ptr<mutation_rule> DYNAMIX_API dynamix::remove_mutation_rule ( mutation_rule_id  id)

Removes a mutation rule from the domain by id. Returns a shared pointer to the rule which the user might use to persist it, or null if no such mutation rule exists