Loading...
Searching...
No Matches
shlibpp::SharedLibraryClassFactory< T > Class Template Reference

A type-safe wrapper for SharedLibraryFactory, committing to creation/destruction of instances of a particular super-class. More...

`#include <robottestingframework/dll/SharedLibraryClassFactory.h>`

Inheritance diagram for shlibpp::SharedLibraryClassFactory< T >:
[legend]

## Public Member Functions

| SharedLibraryClassFactory ()
| SharedLibraryClassFactory (const char *dll_name, const char *fn_name=0)
T * | create ()
void | destroy (T *obj)
Public Member Functions inherited from shlibpp::SharedLibraryFactory
| SharedLibraryFactory ()
| Constructor for unconfigured factory.
| SharedLibraryFactory (const char *dll_name, const char *fn_name=nullptr)
| Constructor.
virtual | ~SharedLibraryFactory ()
| Destructor.
bool | open (const char *dll_name, const char *fn_name=nullptr)
| Configure the factory.
bool | isValid () const
| Check if factory is configured and present.
int | getStatus () const
| Get the status of the factory.
std::string | getError () const
| Get the latest error of the factory.
const SharedLibraryClassApi & | getApi () const
| Get the factory API, which has creation/deletion methods.
int | getReferenceCount () const
| Get the current reference count of this factory.
int | addRef ()
| Increment the reference count of this factory.
int | removeRef ()
| Decrement the reference count of this factory.
std::string | getName () const
| Get the name associated with this factory.
std::string | getClassName () const
| Get the type associated with this factory.
std::string | getBaseClassName () const
| Get the base type associated with this factory.
bool | useFactoryFunction (void *factory)
| Specify function to use as factory.

## Additional Inherited Members

Public Types inherited from shlibpp::SharedLibraryFactory
enum | { STATUS_NONE , STATUS_OK = VOCAB('o', 'k') , STATUS_LIBRARY_NOT_FOUND = VOCAB('f', 'o', 'u', 'n') , STATUS_LIBRARY_NOT_LOADED = VOCAB('l', 'o', 'a', 'd') , STATUS_FACTORY_NOT_FOUND = VOCAB('f', 'a', 'c', 't') , STATUS_FACTORY_NOT_FUNCTIONAL = VOCAB('r', 'u', 'n') }
| The status of a factory can be: More...

## Detailed Description

template<class T>
class shlibpp::SharedLibraryClassFactory< T >

A type-safe wrapper for SharedLibraryFactory, committing to creation/destruction of instances of a particular super-class.

Note that we take on faith that the named factory method in the named shared library does in fact create the named type.

Definition at line 42 of file SharedLibraryClassFactory.h.

## Constructor & Destructor Documentation

## SharedLibraryClassFactory() [1/2]

template<class T>

shlibpp::SharedLibraryClassFactory< T >::SharedLibraryClassFactory | ( |  | ) |

inline

Definition at line 45 of file SharedLibraryClassFactory.h.

## SharedLibraryClassFactory() [2/2]

template<class T>

shlibpp::SharedLibraryClassFactory< T >::SharedLibraryClassFactory | ( | const char * | dll_name,
|  | const char * | fn_name = 0 )

inline

Definition at line 49 of file SharedLibraryClassFactory.h.

## Member Function Documentation

## create()

template<class T>

T * shlibpp::SharedLibraryClassFactory< T >::create | ( |  | ) |

inline

Definition at line 54 of file SharedLibraryClassFactory.h.

## destroy()

template<class T>

void shlibpp::SharedLibraryClassFactory< T >::destroy | ( | T * | obj | ) |

inline

Definition at line 61 of file SharedLibraryClassFactory.h.

The documentation for this class was generated from the following file:

- src/plugins/dll/include/robottestingframework/dll/SharedLibraryClassFactory.h