Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.DataManagement.DynamicResources.Search.ResourceTypeFilter< T > Class Template Reference

Detailed Description

Encapsulates common Query logic for components filtering.

In case if resource is GameObject => Looking for Component with HandlingType. Otherwise compares object type itself.

Type Constraints
T :UnityEngine.Object 
Inheritance diagram for Doloro.DataManagement.DynamicResources.Search.ResourceTypeFilter< T >:
Collaboration diagram for Doloro.DataManagement.DynamicResources.Search.ResourceTypeFilter< T >:

Public Member Functions

virtual bool IsResourcePassingFilter (GameObject resource, out UnityEngine.Object filteredResource)
 Looking for component with a type defined at the HandlingType property. More...
 
virtual bool IsResourcePassingFilter (UnityEngine.Object resource, out UnityEngine.Object filteredResource)
 Checks is the resource is can be casted to the HandlingType and handles it if possible. More...
 
bool IsResourcePassingFilter (UnityEngine.GameObject resource, out UnityEngine.Object filteredResource)
 Passing the resource through the query filter. More...
 

Protected Member Functions

virtual bool OnResourceFilter (object resource, out UnityEngine.Object filteredResource)
 A query filter logic those defies separately for each filter according with its purposes. More...
 

Properties

virtual Type HandlingType [get]
 Type that will be handled by the query. More...
 
bool IsComponentsHandler [get]
 Checks is handling type is component-like.
 
virtual string GetStaticSignature [get]
 Returns a signature of the filter by the value. Using to hashing filters into history. More...
 

Member Function Documentation

◆ IsResourcePassingFilter() [1/3]

virtual bool Doloro.DataManagement.DynamicResources.Search.ResourceTypeFilter< T >.IsResourcePassingFilter ( GameObject  resource,
out UnityEngine.Object  filteredResource 
)
virtual

Looking for component with a type defined at the HandlingType property.

Handle it via OnResourceFilter(object, out UnityEngine.Object) if found.

Parameters
resourceInput resource for check.
filteredResourceSub-resource that was selected by filter as the target. Will be registered in filter->resource pair in Resource collection.
Returns
Checks is the resource passing the filter. False if check is impossible.

◆ IsResourcePassingFilter() [2/3]

bool Doloro.DataManagement.DynamicResources.Search.IResourceFilter.IsResourcePassingFilter ( UnityEngine.GameObject  resource,
out UnityEngine.Object  filteredResource 
)
inherited

Passing the resource through the query filter.

Parameters
resourceComparable resource.
filteredResourceSub-resource that was selected by filter as the target. Will be registered in filter->resource pair in Resource collection.
Returns
True if the resource passing query filter.

◆ IsResourcePassingFilter() [3/3]

virtual bool Doloro.DataManagement.DynamicResources.Search.ResourceTypeFilter< T >.IsResourcePassingFilter ( UnityEngine.Object  resource,
out UnityEngine.Object  filteredResource 
)
virtual

Checks is the resource is can be casted to the HandlingType and handles it if possible.

Parameters
resourceInput resource for check.
Returns
Parameters
filteredResourceSub-resource that was selected by filter as the target. Will be registered in filter->resource pair in Resource collection.
Checks is the resource passing the filter. False if check is impossible.

Implements Doloro.DataManagement.DynamicResources.Search.IResourceFilter.

◆ OnResourceFilter()

virtual bool Doloro.DataManagement.DynamicResources.Search.ResourceTypeFilter< T >.OnResourceFilter ( object  resource,
out UnityEngine.Object  filteredResource 
)
protectedvirtual

A query filter logic those defies separately for each filter according with its purposes.

Parameters
resourceInstance that passed through IsResourcePassingFilter(GameObject, out UnityEngine.Object) or similar handler.
filteredResourceSub-resource that was selected by filter as the target. Will be registered in filter->resource pair in Resource collection.
Returns
Result of resource content filtering. Always true if not overridden.

Reimplemented in Doloro.DataManagement.DynamicResources.Search.SignatureFilter< T >, Doloro.DataManagement.DynamicResources.Search.TagsAbsenceFilter< T >, and Doloro.DataManagement.DynamicResources.Search.TagsDefinitionFilter< T >.

Property Documentation

◆ GetStaticSignature

virtual string Doloro.DataManagement.DynamicResources.Search.ResourceTypeFilter< T >.GetStaticSignature
get

Returns a signature of the filter by the value. Using to hashing filters into history.

Default: HandlingType.FullName

Implements Doloro.DataManagement.DynamicResources.Search.IResourceFilter.

◆ HandlingType

Type that will be handled by the query.

Could be:

  • Inherited from the UnityEngine.Component for UnityEngine.GameObject resources.
  • Could be interface or parent class for UnityEngine.Object resources.

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