|
NcEngine
|
A proxy for ComponentRegistry providing filtered access to data pools. More...
#include <AccessPolicy.h>
Public Types | |
| using | FilterType = std::conditional_t< Base==FilterBase::All, detail::AllFilter, std::conditional_t< Base==FilterBase::Basic, detail::MatchFilter< Entity, Hierarchy, Tag, Transform, Includes... >, detail::MatchFilter< Includes... > > > |
| The policy's filter type. | |
Public Member Functions | |
| AccessPolicy (ComponentRegistry ®istry) noexcept | |
| Construct an AccessPolicy object. | |
|
template<FilterBase TargetBase, class... TargetIncludes> requires ConvertibleTo<TargetBase, TargetIncludes...> | |
| operator AccessPolicy< TargetBase, TargetIncludes... > () const noexcept | |
| Implicit conversion operator to a more restricted policy. | |
|
template<RegistryType T> requires HasAccess<T> | |
| auto | GetPool () const -> decltype(auto) |
| Get the pool for a given type. | |
|
template<RegistryType T> requires HasAccess<T> | |
| auto | GetPool () -> decltype(auto) |
| Get the pool for a given type. | |
| auto | GetFreeComponentPool () -> decltype(auto) |
| Get the pool for all FreeComponents. | |
| auto | GetFreeComponentPool () const -> decltype(auto) |
| Get the pool for all FreeComponents. | |
| auto | GetComponentPools () |
| Get a range of pointers to all ComponentPoolBase instances. | |
Static Public Attributes | |
| static constexpr auto | base = Base |
| The value of the policy's FilterBase. | |
| template<class... TargetIncludes> | |
| static constexpr bool | HasAccess = (FilterType::template included<TargetIncludes> && ...) |
| Indicates whether all requested types are accessible by the policy. | |
| template<FilterBase TargetBase> | |
| static constexpr bool | BaseContains = Base >= TargetBase |
| Indicates the policy's FilterBase is at least as permissive as the requested base. | |
| template<FilterBase TargetBase, class... TargetIncludes> | |
| static constexpr bool | ConvertibleTo = BaseContains<TargetBase> && HasAccess<TargetIncludes...> |
| Indicates whether the policy is convertible to another policy with the requested ruleset. | |
A proxy for ComponentRegistry providing filtered access to data pools.
| Base | A FilterBase value indicating a baseline set of types to be added to the policy. |
| Includes | A list types to include in addition to the base set. |