SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A factory for generating association rules. More...
#include <AssociationRuleFactory.h>
Public Member Functions | |
template<typename Type > | |
void | addAlias (const std::string &alias) |
void | addAlias (const std::string &typeName, const std::string &alias) |
Add an alternative constructor name for an association rule. | |
bool | containsAlias (const std::string &alias) const |
Determine whether or not a Type is available using its alias. | |
template<typename... Args> | |
std::unique_ptr< Rule > | createFromAlias (const std::string &alias, Args &&... args) const |
Create an instance of a Type using its type name. | |
const std::map< std::string, std::string > & | aliases () const |
const std::map< std::string, std::string > & | reverseLookup () const |
Public Member Functions inherited from smtk::common::Factory< Rule, void > | |
bool | registerType () |
Register a Type to the factory. | |
bool | registerType (Metadata &&metadata) |
Register a Typeusing the Type's Metadata. | |
bool | registerTypes () |
Register a tuple of Types. | |
bool | unregisterType () |
Unregister a Type. | |
bool | unregisterType (const std::string &typeName) |
Unregister a Type using its type name. | |
bool | unregisterType (const std::size_t &typeIndex) |
Unregister a Type using its type index. | |
bool | unregisterTypes () |
Unregister a tuple of Types. | |
bool | contains () const |
Determine whether or not a Type is available. | |
bool | contains (const std::string &typeName) const |
Determine whether or not a Type is available using its type name. | |
bool | contains (const std::size_t typeIndex) const |
Determine whether or not a Type is available using its type index. | |
std::unique_ptr< Type > | create (Args &&... args) const |
Create an instance of a Type. | |
std::unique_ptr< Rule > | createFromName (const std::string &typeName, Args &&... args) const |
Create an instance of a Type using its type name. | |
std::unique_ptr< Rule > | createFromIndex (const std::size_t &typeIndex, Args &&... args) const |
Create an instance of a Type using its type name. | |
std::shared_ptr< Type > | make (Args &&... args) const |
Make a shared instance of a Type. | |
std::shared_ptr< Rule > | makeFromName (const std::string &typeName, Args &&... args) const |
Make a shared instance of a Type using its type name. | |
std::shared_ptr< Rule > | makeFromIndex (const std::size_t &typeIndex, Args &&... args) const |
Create an instance of a Type using its type name. | |
Interface< TagType, true > | get () const |
Access a convenience Interface for creating objects that singles out one of the three modes of creation: by type, by type name and by type index. | |
A factory for generating association rules.
AssociationRuleFactory is an implementation of a common factory for Rule types, with additional logic for handling human-readable aliases.