GL Studio C++ Runtime API
gls_rso_container_util.h
Go to the documentation of this file.
1/*! \file
2 \brief Standard GL Studio implementation of the rso interface (container side), disti::GlsRSO1_ResourceFilterImpl.
3
4 \par Copyright Information
5
6 Copyright (c) 2017 by The DiSTI Corporation.<br>
7 11301 Corporate Blvd; Suite 100<br>
8 Orlando, Florida 32817<br>
9 USA<br>
10 <br>
11 All rights reserved.<br>
12
13 This Software contains proprietary trade secrets of DiSTI and may not be
14reproduced, in whole or part, in any form, or by any means of electronic,
15mechanical, or otherwise, without the written permission of DiSTI. Said
16permission may be derived through the purchase of applicable DiSTI product
17licenses which detail the distribution rights of this content and any
18Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37State of Florida and the United States of America.
38
39*/
40#ifndef _GLS_RSO_CONTAINER_UTIL_H
41#define _GLS_RSO_CONTAINER_UTIL_H
42
43#include "gls_resources.h"
44
45#ifdef GLES
46# include "rso_interface_es_1.h"
47typedef disti::RSOInterfaceES1 RsoImplBaseInterface; ///< Typedef for the original RSO interface.
48#else
49# include "rso_interface_1.h"
50typedef disti::RSOInterface1 RsoImplBaseInterface; ///< Typedef for the original RSO interface.
51#endif
52
53namespace disti
54{
55/** Standard implmentation for the RSO1_ResourceFilter interface
56* This wraps the GlsResourceFilter class
57*/
59{
60protected:
61 /// Reference to the GlsResourceFilter object being wrapped.
62 /// The GlsRSO1_ResourceFilterImpl does not delete this object.
64
65public:
66 /// Constructor
67 /// \param filter The filter object to wrap.
69 : _filter( filter )
70 {}
71
73
74 /// Change the filter object that this interface is wrapping.
75 /// \param filter The new filter to set.
76 void Filter( GlsResourceFilter* filter ) { _filter = filter; }
77
78 /// \return The current filter object.
80
81 /// \return The current levels of qualification to show in the name. -1 means full qualification.
82 virtual int LevelsUp() const { return _filter ? _filter->LevelsUp() : -1; }
83
84 /// How many levels of qualification to show in the name. -1 means full qualification.
85 /// \param value the new qualification level to set
86 virtual void LevelsUp( int value )
87 {
88 if( _filter )
89 {
90 _filter->LevelsUp( value );
91 }
92 }
93
94 /// \return The current levels of children to show.
95 virtual int GroupLevelsDown() const { return _filter ? _filter->GroupLevelsDown() : 0; }
96
97 /// How many levels of children to show.
98 /// 0 means don't show any children properties
99 /// -1 means all the way down.
100 /// \param value The new levels of children to show.
101 virtual void GroupLevelsDown( int value )
102 {
103 if( _filter )
104 {
105 _filter->GroupLevelsDown( value );
106 }
107 }
108
109 /// \return Whether or not to show names, or names and values.
110 virtual bool NamesOnly() const { return _filter ? _filter->NamesOnly() : false; }
111
112 /// If true, only a list of names will be returned.
113 /// Values will not be returned.
114 /// The format changes to not include the ":".
115 /// \param value The new name format flag to set.
116 virtual void NamesOnly( bool value )
117 {
118 if( _filter )
119 {
120 _filter->NamesOnly( value );
121 }
122 }
123
124 /// Manage the exclude list. Takes precedence over includes.
125 /// \param str The new name to add to the exclude list.
126 virtual void AddExclude( const char* str )
127 {
128 if( _filter )
129 {
130 _filter->AddExclude( str );
131 }
132 }
133
134 /// \return The number of items in the exclusion list.
135 virtual int ExcludeCount() const { return _filter ? _filter->ExcludeCount() : 0; }
136
137 /// \return The name of the exclude item associated with the index.
138 /// \param index The index whose name is to be returned.
139 virtual const char* GetExclude( int index ) const { return ( _filter ) ? ( _filter->GetExclude( index ) ) : ( NULL ); }
140
141 /// Manage the include list.
142 /// \param str The new name to add to the include list.
143 virtual void AddInclude( const char* str )
144 {
145 if( _filter )
146 {
147 _filter->AddInclude( str );
148 }
149 }
150
151 /// \return The number of items in the inclusion list.
152 virtual int IncludeCount() const { return _filter ? _filter->IncludeCount() : 0; }
153
154 /// \return The name of the include item associated with the index.
155 /// \param index The index whose name is to be returned.
156 virtual const char* GetInclude( int index ) const { return ( _filter ) ? ( _filter->GetInclude( index ) ) : ( NULL ); }
157
158 /// Check a name against the filter.
159 /// \param name The name to check against the filter.
160 /// \return Whether or not the name passes the filter (to be included in the results).
161 virtual bool PassFilter( const char* name ) const { return _filter ? _filter->PassFilter( name ) : true; }
162};
163
164} // namespace disti
165
166#endif
Definition: gls_rso_container_util.h:59
GlsResourceFilter * _filter
Definition: gls_rso_container_util.h:63
GlsResourceFilter * Filter()
Definition: gls_rso_container_util.h:79
virtual void NamesOnly(bool value)
Definition: gls_rso_container_util.h:116
virtual void LevelsUp(int value)
Definition: gls_rso_container_util.h:86
GlsRSO1_ResourceFilterImpl(GlsResourceFilter *filter)
Definition: gls_rso_container_util.h:68
virtual void GroupLevelsDown(int value)
Definition: gls_rso_container_util.h:101
virtual const char * GetInclude(int index) const
Definition: gls_rso_container_util.h:156
virtual void AddExclude(const char *str)
Definition: gls_rso_container_util.h:126
virtual int IncludeCount() const
Definition: gls_rso_container_util.h:152
virtual int GroupLevelsDown() const
Definition: gls_rso_container_util.h:95
virtual void AddInclude(const char *str)
Definition: gls_rso_container_util.h:143
virtual const char * GetExclude(int index) const
Definition: gls_rso_container_util.h:139
virtual bool NamesOnly() const
Definition: gls_rso_container_util.h:110
virtual bool PassFilter(const char *name) const
Definition: gls_rso_container_util.h:161
virtual int ExcludeCount() const
Definition: gls_rso_container_util.h:135
void Filter(GlsResourceFilter *filter)
Definition: gls_rso_container_util.h:76
virtual int LevelsUp() const
Definition: gls_rso_container_util.h:82
Definition: gls_resources.h:51
void LevelsUp(int value)
Definition: gls_resources.h:84
unsigned int IncludeCount() const
const char * GetInclude(unsigned int index) const
unsigned int ExcludeCount() const
const char * GetExclude(unsigned int index) const
void NamesOnly(bool value)
Definition: gls_resources.h:112
void AddInclude(const char *name)
virtual bool PassFilter(const char *name)
void AddExclude(const char *name)
void GroupLevelsDown(int value)
Definition: gls_resources.h:103
Definition: rso_interface_1.h:650
Definition: rso_interface_1.h:61
disti::GlsResourceFilter classes and methods.
disti::RSOInterface1 RsoImplBaseInterface
Typedef for the original RSO interface.
Definition: gls_rso_container_util.h:50
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
Defines the RSO interface, which provides a generic way of accessing RSOs and other content,...