GL Studio C++ Runtime API
|
#include <gls_resources.h>
Public Member Functions | |
GlsResourceFilter (GlsResourceFilter *source) | |
GlsResourceFilter (GlsResourceFilter &source) | |
void | LevelsUp (int value) |
int | LevelsUp () |
void | GroupLevelsDown (int value) |
int | GroupLevelsDown () |
void | NamesOnly (bool value) |
bool | NamesOnly () |
void | AddExclude (const char *name) |
unsigned int | ExcludeCount () const |
const char * | GetExclude (unsigned int index) const |
void | RemoveExclude (unsigned int index) |
void | ClearExcludes () |
Removes all entries from the exclude list. | |
void | AddInclude (const char *name) |
unsigned int | IncludeCount () const |
const char * | GetInclude (unsigned int index) const |
void | RemoveInclude (unsigned int index) |
void | ClearIncludes () |
Removes all entries from the include list. | |
virtual bool | PassFilter (const char *name) |
void | PushParentName (const char *parent) |
unsigned int | ParentNameCount () const |
const char * | GetParentName (unsigned int index) const |
void | PopParentName () |
Removes the top entry on the parent name stack. | |
void | ClearParentNames () |
Removes all entries on the parent name stack. | |
GlsResourceFilter & | operator= (const GlsResourceFilter &rhs) |
Static Public Member Functions | |
static std::string | BuildHierarchyName (DisplayFrame *frame, GlsResourceFilter *filter) |
static std::string | BuildHierarchyName (DisplayObject *obj, GlsResourceFilter *filter) |
Public Attributes | |
int | _levelsUp |
Levels of qualification to show in names, -1 is fully qualified. | |
int | _groupLevelsDown |
How many levels to recurse through groups, -1 is fully recursive. | |
DynamicArray< char * > | _excludeList |
List of names to exclude from the filter, takes precedence over includes. | |
DynamicArray< char * > | _includeList |
List of names to include, if empty all names are acceptable. | |
bool | _namesOnly |
If true, will return names only, and not names and values. | |
DynamicArray< const char * > | _parentNameStack |
List of parent names, used to append to the name during traversal. | |
Used for specifiying a filter for accessing resources
GlsResourceFilter | ( | GlsResourceFilter * | source | ) |
Copy constructor
source | The object to copy from. |
GlsResourceFilter | ( | GlsResourceFilter & | source | ) |
Copy constructor
source | The object to copy from. |
void AddExclude | ( | const char * | name | ) |
Add a resource name to the exclude filter Resources on the exclude list will not pass the filter. Excludes take precedence over includes.
name | The new name to add to the exclude list. |
void AddInclude | ( | const char * | name | ) |
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.
name | The new name to add to the include list. |
|
static |
frame | The object to build the name for. |
filter | The filter currently in use (as this is a static function). |
|
static |
obj | The object to build the name for. |
filter | The filter currently in use (as this is a static function). |
unsigned int ExcludeCount | ( | ) | const |
const char * GetExclude | ( | unsigned int | index | ) | const |
index | < ExcludeCount() |
const char * GetInclude | ( | unsigned int | index | ) | const |
index | < IncludeCount() |
const char * GetParentName | ( | unsigned int | index | ) | const |
index | The index of the parent name to return. |
|
inline |
|
inline |
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
value | The new group traversal level to set. |
unsigned int IncludeCount | ( | ) | const |
|
inline |
|
inline |
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.
value | The new qualification level value to set. |
|
inline |
|
inline |
If true, only a list of names will be returned. Values will not be returned. The format changes to not include the ":".
value | The new names only flag to set. |
GlsResourceFilter & operator= | ( | const GlsResourceFilter & | rhs | ) |
Assignment operator
rhs | The object to copy from. |
unsigned int ParentNameCount | ( | ) | const |
|
virtual |
Test a resource name against the filter.
name | The name to test against the filter. |
void PushParentName | ( | const char * | parent | ) |
Pushes a parent name onto the filter's parent stack. This is a list of names of objects that represents the hierarchy above this object; this should be used by the BuildHierarchyName to prepend the parent names when in the editor, as we don't have the ComponentBase's Parent frame pointers available.
parent | The new parent name to push onto the stack. |
void RemoveExclude | ( | unsigned int | index | ) |
Removes a entry from the exclude list This will reduce the ExcludeCount()
index | < ExcludeCount() |
void RemoveInclude | ( | unsigned int | index | ) |
Removes a entry from the include list. This will reduce the IncludeCount().
index | < IncludeCount() |