DataDirector API
DDD_ConverterFactory.h
Go to the documentation of this file.
1 #ifndef _DDD_ConverterFactory_h_
2 #define _DDD_ConverterFactory_h_
3 
4 /*! \file DDD_ConverterFactory.h
5  \brief The DDD_ConverterFactory class. Factory for creating Data Director converters.
6 
7  \par Copyright Information
8 
9  Copyright (c) 2012 The DiSTI Corporation.<br>
10  11301 Corporate Blvd; Suite 100<br>
11  Orlando, Florida 32817<br>
12  USA<br>
13  <br>
14  All rights reserved.<br>
15 
16  This Software contains proprietary trade secrets of DiSTI and may not be
17 reproduced, in whole or part, in any form, or by any means of electronic,
18 mechanical, or otherwise, without the written permission of DiSTI. Said
19 permission may be derived through the purchase of applicable DiSTI product
20 licenses which detail the distribution rights of this content and any
21 Derivative Works based on this or other copyrighted DiSTI Software.
22 
23  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
24 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
25 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
26 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
27 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
28 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
29 
30  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
31 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
32 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
33 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
34 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
35 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBLITY
36 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
37 EXCEED FIVE DOLLARS (US$5.00).
38 
39  The aforementioned terms and restrictions are governed by the laws of the
40 State of Florida and the United States of America.
41 
42 */
43 
44 #include "DDD_Include.h"
45 #include "DDD_LogFacade.h"
46 #include "DDD_ConvertBase.h"
47 #include "DDD_StringList.h"
48 #include "DDD_DynamicLibrary.h"
49 #include <string>
50 
51 
52 namespace disti
53 {
54 
55 class DDD_ConverterLibrary;
56 /** \brief The DDD_ConverterFactory class. Factory for creating Data Director converters.
57  */
58 class DDD_EXPORT DDD_ConverterFactory : public DDD_LogFacade
59 {
60 private:
61 
63 
64  ConverterLibraryList _loadedLibs; /**< List of loaded converter libraries */
65 
66  /** Constructor. Only the static Instance() interface can create this */
68 
69  /** Destructor. */
71 
72  /** Intalls the built-in converters into the factory */
73  void InstallBuiltInConverters();
74 
75 public:
76 
77  /** Public interface to the singleton
78  * \return Returns a pointer to the singleton instance
79  */
80  static DDD_ConverterFactory& Instance();
81 
82  /** Creates a new converter of the requested type
83  * \param className The name of the converter class to instantiate
84  * \param observer An attribute observer that will be notified when the converter fires.
85  * \return Returns a pointer to instantiated converter, or null if converter cannot be instantiated
86  */
87  DDD_ConvertBase* InstantiateNewConverter(const std::string& className,DDD_AttributeObserver *observer);
88 
89  /** Attempts to load multiple converters that are stored into a single plugin file
90  * \param libFileName The name of the library file to search
91  * \return Returns true if any were discovered and successfully added
92  */
93  bool FindAllConverters(const std::string& libFileName);
94 
95  /** \return Returns a list of known converter types
96  */
97  DDD_StringList& GetKnownConverterTypes();
98 };
99 
100 
101 } // end namespace disti
102 
103 
104 #endif
105 
A templated array of objects. The array dynamically resizes as needed.
Definition: dynamic_array.h:61
Abstract base class for all DDD_DataDirector converters.
Definition: DDD_ConvertBase.h:68
A cross-platform class for loading dynamic link libraries and shared objects.
The DDD_ConvertBase class. Base class for Data Director converters.
Facade to provide a simpler interface to the DDD_Log singleton. Its second purpose is for decoupling;...
Definition: DDD_LogFacade.h:50
A virtual interface class for observers of attributes. AttributeObserver-derived objects are able to ...
Definition: DDD_AttributeBase.h:66
The DDD_ConverterFactory class. Factory for creating Data Director converters.
Definition: DDD_ConverterFactory.h:58
Definition: AttributeChangedEmitter.h:46