|
|
|
class TLibAssoc : public TLibAssocBase;
Associates a dynamically loadable DLL and an instance of a class that, typically, will have been created using the ordinal 1 function of that DLL.
An object of this type is useful when cleanup behaviour requires that a class instance be deleted and the associated DLL be closed.
The DLL is expected to be already open when the TLibAssoc object is created.
TLibAssocBase -
This is an implementation base class for TLibAssoc.
TLibAssoc - ...
Defined in TLibAssoc:
Ptr()Gets a pointer to the class instance.PtrC()constGets a pointer to the const class instance.Set(const RLibrary &,T *)Makes an association between the specified DLL and an instance of the specified ...TLibAssoc()Default constructor.TLibAssoc(const RLibrary &,T *)Constructs the object taking the specified DLL and an instance of the specified ...Unload()Deletes the class instance and calls Close() on the associated DLL.operator T *()Conversion operator.operator TCleanupItem()The TCleanupItem conversion operator.operator TLibAssoc *()operator const T *()constConst conversion operator.operator->()Dereferencing operator.operator->()constConst dereferencing operator.Inherited from TLibAssocBase:
DoUnload(TAny *)Calls Close() on the associated DLL.IsNull()constTests whether the pointer to the class instance is NULL.Set(const RLibrary &,TAny *)Implements TLibAssoc::Set(const RLibrary &,T *).TLibAssocBase(const RLibrary &,TAny *)Constructs the object taking the specified DLL and a class instance.iPtrA Pointer to the class instance. inline TLibAssoc();
Default constructor.
An association between a DLL and a class instance can be made after construction using the TLibAssoc::Set(const RLibrary &,T *) function.
inline TLibAssoc(const RLibrary &aLib, T *aClass);
Constructs the object taking the specified DLL and an instance of the specified class.
|
inline void Set(const RLibrary &aLib, T *aClass);
Makes an association between the specified DLL and an instance of the specified class.
|
inline void Unload();
Deletes the class instance and calls Close() on the associated DLL.
RLibrary::Close()Closes the DLL.inline operator TCleanupItem();
The TCleanupItem conversion operator.
Invoked by the compiler when a TLibAssoc<T> type is passed to a function that is prototyped to take a TCleanupItem type.
The most common usage is to put a cleanup item onto the cleanup stack using CleanupStack::PushL(TAny *). The cleanup operation is represented by the private static function TLibAssoc::Cleanup(TAny *).
For example, if we declare
TLibAssoc<A> a;
then we can simply put a cleanup item onto the cleanup stack by calling
CleanupStack::PushL(a);
|
TCleanupItem...CleanupStack::PushL(TAny *)Pushes a pointer to an object onto the cleanup stack.inline T* Ptr();
Gets a pointer to the class instance.
|
inline const T* PtrC() const;
Gets a pointer to the const class instance.
|
inline operator T *();
Conversion operator.
Invoked by the compiler when a TLibAssoc<T> type is passed to a function that is prototyped to take a T* type.
|
inline operator const T *() const;
Const conversion operator.
Invoked by the compiler when a TLibAssoc<T> type is passed to a function that is prototyped to take a const T* type.
|
inline T* operator->();
Dereferencing operator.
|
inline const T* operator->() const;
Const dereferencing operator.
|