GL Studio C++ Runtime API
rso_interface_2.h
Go to the documentation of this file.
1/*! \file
2 \brief Defines the RSO interface v2, which provides a generic way of accessing RSOs and other content, disti::RSOInterface2.
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 _RSO_INTERFACE_2_H
41#define _RSO_INTERFACE_2_H
42
43#include "rso_interface_1.h"
44
45namespace disti
46{
47////////////////////////////////////////////////////////////////////////////////
48// In order for the RSO to be discovered in a .DLL or .so file,
49// The following "C" funtions need to be defined.
50// They are only comments here.
51////////////////////////////////////////////////////////////////////////////////
52// RSOInterface1* CreateRSOInterface2_ClassNameHere()
53// Optionally:
54// const char* GlsDefaultClassName()
55////////////////////////////////////////////////////////////////////////////////
56
57/** The RSOInterface2 class defines an abstract interface to an RSO instance.
58 */
60{
61public:
62 ////////////////////////////////////////////////////////////////////////////////
63 // The RSO Interface methods
64 ////////////////////////////////////////////////////////////////////////////////
65 typedef unsigned int ResourceHandle; ///< Typedef for a unique resource identifier.
66
67 // Explicitly carry these methods forward from the base class, as we're creating overloads of them here.
70
71 /// Obtains a resource handle to a given named resource
72 /// This handle must be disposed of with the ReleaseResourceHandle method once it
73 /// is no longer needed.
74 /// If this method fails, the return value will not be a valid handle; this can
75 /// be determined by calling IsResourceHandleValid.
76 /// \param resourceName The resource name to create a handle for.
77 /// \return A handle to the desired resource.
78 virtual ResourceHandle CreateResourceHandle( const char* resourceName ) = 0;
79
80 /// Disposes of a resource handle.
81 /// \param resourceHandle The resource handle to release.
82 virtual void ReleaseResourceHandle( ResourceHandle resourceHandle ) = 0;
83
84 /// Checks if a given resource handle is valid.
85 /// \param resourceHandle The resource handle to check.
86 /// \return Whether or not the handle is valid.
87 virtual bool IsResourceHandleValid( ResourceHandle resourceHandle ) = 0;
88
89 /// Set the string value for a resource specified by handle
90 /// \param resourceHandle The handle of the resource to set.
91 /// \param resourceVal The new string value to set.
92 virtual void SetResource( ResourceHandle resourceHandle, const char* resourceVal ) = 0;
93
94 /// \return The string value for a resource specified by handle.
95 /// \param resourceHandle The handle to return the string value for.
96 virtual const char* GetResource( ResourceHandle resourceHandle ) = 0;
97
98 /// Set the value as an integer for a given named resource.
99 /// \param resourceName The name of the resource to set.
100 /// \param resourceVal The new integer value to set.
101 virtual void SetIntResource( const char* resourceName, long resourceVal ) = 0;
102
103 /// \return The value as an integer for a given named resource.
104 /// \param resourceName The name to return the integer value for.
105 virtual long GetIntResource( const char* resourceName ) = 0;
106
107 /// Set the value as an integer for a resource specified by handle.
108 /// \param handle The handle of the resource to set.
109 /// \param resourceVal The new integer value to set.
110 virtual void SetIntResource( ResourceHandle handle, long resourceVal ) = 0;
111
112 /// \return The value as an integer for a resource specified by handle.
113 /// \param resourceHandle The handle to return the integer value for.
114 virtual long GetIntResource( ResourceHandle resourceHandle ) = 0;
115
116 /// Set the value as a float for a given named resource.
117 /// \param resourceName The name of the resource to set.
118 /// \param resourceVal The new float value to set.
119 virtual void SetFloatResource( const char* resourceName, double resourceVal ) = 0;
120
121 /// \return The value as a float for a given named resource.
122 /// \param resourceName The name to return the float value for.
123 virtual double GetFloatResource( const char* resourceName ) = 0;
124
125 /// Set the value as a float for a resource specified by handle.
126 /// \param handle The handle of the resource to set.
127 /// \param resourceVal The new float value to set.
128 virtual void SetFloatResource( ResourceHandle handle, double resourceVal ) = 0;
129
130 /// \return The value as a float for a resource specified by handle.
131 /// \param resourceHandle The handle to return the integer value for.
132 virtual double GetFloatResource( ResourceHandle resourceHandle ) = 0;
133
134protected:
135 ////////////////////////////////////////////////////////////////////////////////
136 /// Protected destructor so it can't be deleted directly.
137 ////////////////////////////////////////////////////////////////////////////////
138 virtual ~RSOInterface2() {}
139};
140
141} // end namespace disti
142
143#endif
Definition: rso_interface_1.h:61
virtual void SetResource(const char *resourceName, const char *resourceVal)=0
virtual const char * GetResource(const char *resourceName)=0
Definition: rso_interface_2.h:60
virtual void SetFloatResource(const char *resourceName, double resourceVal)=0
virtual bool IsResourceHandleValid(ResourceHandle resourceHandle)=0
virtual const char * GetResource(ResourceHandle resourceHandle)=0
virtual void SetIntResource(ResourceHandle handle, long resourceVal)=0
virtual void SetFloatResource(ResourceHandle handle, double resourceVal)=0
virtual double GetFloatResource(ResourceHandle resourceHandle)=0
virtual void SetResource(ResourceHandle resourceHandle, const char *resourceVal)=0
virtual void ReleaseResourceHandle(ResourceHandle resourceHandle)=0
virtual void SetIntResource(const char *resourceName, long resourceVal)=0
virtual ~RSOInterface2()
Protected destructor so it can't be deleted directly.
Definition: rso_interface_2.h:138
virtual long GetIntResource(ResourceHandle resourceHandle)=0
virtual long GetIntResource(const char *resourceName)=0
virtual double GetFloatResource(const char *resourceName)=0
unsigned int ResourceHandle
Typedef for a unique resource identifier.
Definition: rso_interface_2.h:65
virtual ResourceHandle CreateResourceHandle(const char *resourceName)=0
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,...