SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A Manager for registering/unregistering Association and Dissocation rule types. More...
#include <AssociationRuleManager.h>
Public Member Functions | |
smtkTypedefs (smtk::attribute::AssociationRuleManager) | |
AssociationRuleManager (const AssociationRuleManager &)=delete | |
AssociationRuleManager (AssociationRuleManager &&)=delete | |
AssociationRuleManager & | operator= (const AssociationRuleManager &)=delete |
AssociationRuleManager & | operator= (AssociationRuleManager &&)=delete |
bool | registerResourceManager (smtk::resource::Manager::Ptr &) |
Register to a resource manager. More... | |
bool | registerRulesTo (smtk::attribute::Resource::Ptr &resource) const |
Explicilty add the contained custom rules to an attribute resource. | |
template<typename CustomRuleType > | |
bool | registerAssociationRule (const std::string &alias) |
Register a custom association rule type with a given alias. | |
template<typename CustomRuleType > | |
bool | registerDissociationRule (const std::string &alias) |
Register a custom dissociation rule type with a given alias. | |
template<typename CustomRuleType > | |
bool | unregisterAssociationRule () |
Unregister a custom association rule type. | |
template<typename CustomRuleType > | |
bool | unregisterDissociationRule () |
Unregister a custom dissociation rule type. | |
Static Public Member Functions | |
static std::shared_ptr< AssociationRuleManager > | create () |
Protected Member Functions | |
AssociationRuleManager (const std::shared_ptr< smtk::resource::Manager > &) | |
template<typename BaseRuleType , typename CustomRuleType > | |
bool | registerRule (const std::string &alias) |
Register <CustomRuleType> to all attribute resources. | |
template<typename BaseRuleType , typename CustomRuleType > | |
bool | unregisterRule () |
Unregister <CustomRuleType> from all attribute resources. | |
Protected Attributes | |
std::weak_ptr< smtk::resource::Manager > | m_manager |
std::unordered_map< std::size_t, std::function< void(smtk::attribute::Resource &)> > | m_associationRegisterFunctions |
std::unordered_map< std::size_t, std::function< void(smtk::attribute::Resource &)> > | m_dissociationRegisterFunctions |
std::unordered_map< std::size_t, smtk::resource::Observers::Key > | m_associationObservers |
std::unordered_map< std::size_t, smtk::resource::Observers::Key > | m_dissociationObservers |
Friends | |
template<typename BaseRuleType , bool > | |
struct | Trait |
A Manager for registering/unregistering Association and Dissocation rule types.
bool smtk::attribute::AssociationRuleManager::registerResourceManager | ( | smtk::resource::Manager::Ptr & | ) |
Register to a resource manager.
All attribute resources managed by the resource manager (both preexisting and resources subsequently added to the resource manager) will be able to read, write and create attributes that contain rules registered to this class.