SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A predicate used to collect resources that fit a given role. More...
#include <GatherResources.h>
Public Types | |
using | Entry = std::weak_ptr< smtk::resource::Resource > |
Public Attributes | |
std::string | m_role |
The required role. If empty, any role is allowed. | |
unsigned int | m_minimumCount |
The minimum number of resources that must be collected to satisfy the requirement. More... | |
int | m_maximumCount |
The maximum number of resources that can be collected while still satisfying the requirement. More... | |
std::string | m_type |
The resource typename regex; typically just a resource typename. | |
std::function< bool(const smtk::resource::Resource &, const ResourceSet &)> | m_validator |
A lambda used to determine whether the given resource is acceptable. | |
std::set< Entry, std::owner_less< Entry > > | m_resources |
The set of resources being managed that are selected by the validator. | |
A predicate used to collect resources that fit a given role.
int smtk::task::GatherResources::ResourceSet::m_maximumCount |
The maximum number of resources that can be collected while still satisfying the requirement.
Note that if 0, the resourceSet is forcing the task to reject all resources that the validator selects (i.e., no resources of the given type are allowed). If negative, then there is no maximum number of validated resources.
unsigned int smtk::task::GatherResources::ResourceSet::m_minimumCount |
The minimum number of resources that must be collected to satisfy the requirement.
If 0, then resources selected by the validator are not required (but may be accepted).