GL Studio C++ Runtime API
live_component_accessor.h
Go to the documentation of this file.
1/*! \file
2 \brief The disti::LiveComponentAccessor class.
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
41#ifndef _LIVE_COMPONENT_ACCESSOR_H
42#define _LIVE_COMPONENT_ACCESSOR_H
43
44#include "gls_include.h"
45#include "gls_version.h"
46#include <string>
47
48namespace disti
49{
50class LiveComponentLibRef;
51class ComponentBase;
52/** LiveComponentAccessor keeps the LiveComponent library loaded in the application.
53 * and stores the information necessary to safely delete the component.*/
55{
56public:
57 typedef void ( *CreateCb )( ComponentBase* ); ///< Typedef for an on create callback function pointer.
58
59private:
60 LiveComponentLibRef* _liveComponentLibRef; ///< Reference to the library the component was loaded from (freed by the LiveComponentAccessor).
61 std::string _className; ///< The ClassName of the component.
62 ComponentBase* _component; ///< The component to be freed by the LiveComponentAccessor.
63
64 //** Private constructor: see CreateInstance() */
65 GLS_EXPORT LiveComponentAccessor( LiveComponentLibRef* lib, const char* className, ComponentBase* comp );
67
68public:
69 /// Creates a LiveComponentAccessor and associates it with the given component.
70 /// \param lib Pointer to the underlying library the component was loaded from.
71 /// \param className The generated class name for the component.
72 /// \param comp Pointer to the component reference.
73 /// \return A new LiveComponentAccessor object.
75
76 /// Clone the LiveComponentAccessor to apply to a new component instance.
77 /// \param newComp The component reference to make a clone from.
78 /// \return A new LiveComponentAccessor object.
80
81 /// Deletes the LiveComponentAccessor, it's associated component, and the LiveComponentLibRef.
82 virtual GLS_EXPORT void Delete();
83
84 /// \return The RSO library version info.
86
87 /// \return The RSO library path.
89
90 /// \return The RSO's class name.
92};
93
94} // namespace disti
95
96#endif
Definition: component_base.h:68
Definition: gls_version.h:234
Definition: live_component_accessor.h:55
const char * LoadedClassName()
virtual LiveComponentAccessor * Clone(ComponentBase *newComp)
virtual void Delete()
Deletes the LiveComponentAccessor, it's associated component, and the LiveComponentLibRef.
const GlsBuiltVersionInfo & BuiltVersion()
static LiveComponentAccessor * CreateInstance(LiveComponentLibRef *lib, const char *className, ComponentBase *comp)
void(* CreateCb)(ComponentBase *)
Typedef for an on create callback function pointer.
Definition: live_component_accessor.h:57
Definition: live_component_lib_ref.h:67
A file for all GL Studio files to include.
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:52
Used for matching version of libraries and headers.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47