GlsRSOLoader API  1.3.2
GlsResourceFilter Class Reference

#include <gls_rso_loader.h>

Inheritance diagram for GlsResourceFilter:
RSOInterface1::ResourceFilter

Public Member Functions

 GlsResourceFilter (GlsResourceFilter &source)
 Copy constructor.
 
int LevelsUp () const
 
void LevelsUp (int value)
 
int GroupLevelsDown () const
 
void GroupLevelsDown (int value)
 
bool NamesOnly () const
 
void NamesOnly (bool value)
 
void AddExclude (const char *name)
 
int ExcludeCount () const
 Returns the number of exclude entries in the filter.
 
const char * GetExclude (int index) const
 
void RemoveExclude (unsigned int index)
 
void ClearExcludes ()
 Removes all entries from the exclude list.
 
void AddInclude (const char *name)
 
int IncludeCount () const
 Returns the number of includes in the filter.
 
const char * GetInclude (int index) const
 
void RemoveInclude (unsigned int index)
 
void ClearIncludes ()
 Removes all entries from the include list.
 
virtual bool PassFilter (const char *name) const
 Test a resource name against the filter.
 
GlsResourceFilteroperator= (const GlsResourceFilter &rhs)
 assignment operator
 

Public Attributes

int _levelsUp
 
int _groupLevelsDown
 
std::vector< std::string > _excludeList
 
std::vector< std::string > _includeList
 
bool _namesOnly
 

Detailed Description

Used for specifiying a filter for accessing resources

Member Function Documentation

void AddExclude ( const char *  name)
virtual

Add a resource name to the exclude filter Resources on the exclude list will not pass the filter. Excludes take precedence over includes

Implements RSOInterface1::ResourceFilter.

void AddInclude ( const char *  name)
virtual

Add a resource name to the include filter If there are no includes specified, all resources will pass the filter by default. If IncludeCount() > 0, then only resources that are included will pass the filter.

Implements RSOInterface1::ResourceFilter.

const char* GetExclude ( int  index) const
virtual

Returns the resource name for the given exclude list entry

Precondition
index < ExcludeCount()

Implements RSOInterface1::ResourceFilter.

const char* GetInclude ( int  index) const
virtual

Returns the resource name for the given include list entry

Precondition
index < IncludeCount()

Implements RSOInterface1::ResourceFilter.

int GroupLevelsDown ( ) const
inlinevirtual

How many levels of children to show. This is different from LevelsUp because this is based on the draw heirarchy (Groups rather than components). For example with: GroupLevelsDown = 0, only the specified object's resources will be shown. GroupLevelsDown = 1, only the immeadiate children of the object's resources will be shown. GroupLevelsDown = -1, means all children will be shown. Note that the name stays fully qualified for the children. For example: if GroupLevelsDown == 1 the results would include: Altimeter.Visible: 1 Altimeter.Group1.Visible: 1 but NOT: Altimeter.Group1.Poly.Visible: 1

Implements RSOInterface1::ResourceFilter.

int LevelsUp ( ) const
inlinevirtual

How many levels of qualification above the starting point to show in the attribute names. This is based on the component heirarchy, not the draw hierarchy. For example if you call Altimeter->GetResources() with: LevelsUp = 0, expect: Altitude: 1000 LevelsUp = 1, expect: Altimeter.Altitude: LevelsUp = 2, expect: Cockpit.Altimeter.Altitude: -1 means full qualification.

Implements RSOInterface1::ResourceFilter.

bool NamesOnly ( ) const
inlinevirtual

If true, only a list of names will be returned. Values will not be returned. The format changes to not include the ":".

Implements RSOInterface1::ResourceFilter.

void RemoveExclude ( unsigned int  index)

Removes a entry from the exclude list This will reduce the ExcludeCount()

Precondition
index < ExcludeCount()
void RemoveInclude ( unsigned int  index)

Removes a entry from the include list This will reduce the IncludeCount()

Precondition
index < IncludeCount()

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