SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
smtk::attribute::AssociationRuleManager Class Reference

A Manager for registering/unregistering Association and Dissocation rule types. More...

#include <AssociationRuleManager.h>

Inheritance diagram for smtk::attribute::AssociationRuleManager:
[legend]
Collaboration diagram for smtk::attribute::AssociationRuleManager:
[legend]

Public Member Functions

 smtkTypedefs (smtk::attribute::AssociationRuleManager)
 
 AssociationRuleManager (const AssociationRuleManager &)=delete
 
 AssociationRuleManager (AssociationRuleManager &&)=delete
 
AssociationRuleManageroperator= (const AssociationRuleManager &)=delete
 
AssociationRuleManageroperator= (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< AssociationRuleManagercreate ()
 

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::Managerm_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
 

Detailed Description

A Manager for registering/unregistering Association and Dissocation rule types.

Member Function Documentation

◆ registerResourceManager()

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.


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