Base class for all wrapped native objects. Provides common facilities to the base classes.
Inherits from IDisposable
Inherited by Wombat.MamaBasicSubscription, Wombat.MamaBridge, Wombat.MamaClientProfile, Wombat.MamaDictionary, Wombat.MamaFieldDescriptor, Wombat.MamaFtMember, Wombat.MamaInbox, Wombat.MamaIo, Wombat.MamaMsg, Wombat.MamaMsgField, Wombat.MamaMsgIterator, Wombat.MamaPayloadBridge, Wombat.MamaPrice, Wombat.MamaPublisher, Wombat.MamaQueue, Wombat.MamaSource, Wombat.MamaSourceGroup, Wombat.MamaSourceGroupManager, Wombat.MamaSourceManager, Wombat.MamaSymbolMapFile, Wombat.MamaTimer, Wombat.MamaTransport
Name | |
---|---|
void | Dispose() Destroys the underlying peer object and unbinds the wrapper from it. |
void | setNativeHandle(IntPtr nHandle) Sets the native handle of the native peer object. Should only be used by subclasses and in the same assembly. |
Name | |
---|---|
MamaWrapper() Constructs a new wrapper object but doesn’t create it. If the object is not explicitly disposed it will remain registered for finalization and will attempt the destroy the native peer object when finalized. |
|
MamaWrapper(IntPtr nativeHandle) Constructs a managed wrapper from an existing native peer. The peer object will not be automatically finalized |
|
virtual void | Dispose(bool disposing, bool destroyNativeHandle =true) The actual implementation of Dispose - called by both the Dispose method and the finalizer. |
virtual abstract MamaStatus.mamaStatus | DestroyNativePeer() =0 Subclasses must do whatever is necessary with the native handle in the overridden method in order to destroy the native peer object. If the destruction went successfully, the overridden method must return MamaStatus.mamaStatus.MAMA_STATUS_OK, or a suitable error code otherwise |
virtual void | OnDispose() |
Name | |
---|---|
IntPtr | nativeHandle the handle to the native peer object |
void Dispose()
Destroys the underlying peer object and unbinds the wrapper from it.
void setNativeHandle(
IntPtr nHandle
)
Sets the native handle of the native peer object. Should only be used by subclasses and in the same assembly.
MamaWrapper()
Constructs a new wrapper object but doesn’t create it. If the object is not explicitly disposed it will remain registered for finalization and will attempt the destroy the native peer object when finalized.
MamaWrapper(
IntPtr nativeHandle
)
Constructs a managed wrapper from an existing native peer. The peer object will not be automatically finalized
Parameters:
virtual void Dispose(
bool disposing,
bool destroyNativeHandle =true
)
The actual implementation of Dispose - called by both the Dispose method and the finalizer.
Parameters:
Reimplemented by: Wombat::MamaPublisher::Dispose
virtual abstract MamaStatus.mamaStatus DestroyNativePeer() =0
Subclasses must do whatever is necessary with the native handle in the overridden method in order to destroy the native peer object. If the destruction went successfully, the overridden method must return MamaStatus.mamaStatus.MAMA_STATUS_OK, or a suitable error code otherwise
Return: MamaStatus.mamaStatus.MAMA_STATUS_OK on success, one of the MamaStatus.mamaStatus.MAMA_STATUS_OK error codes otherwise
Reimplemented by: Wombat::MamaBasicSubscription::DestroyNativePeer, Wombat::MamaBridge::DestroyNativePeer, Wombat::MamaClientProfile::DestroyNativePeer, Wombat::MamaDictionary::DestroyNativePeer, Wombat::MamaFieldDescriptor::DestroyNativePeer, Wombat::MamaFtMember::DestroyNativePeer, Wombat::MamaInbox::DestroyNativePeer, Wombat::MamaIo::DestroyNativePeer, Wombat::MamaMsgIterator::DestroyNativePeer, Wombat::MamaMsg::DestroyNativePeer, Wombat::MamaMsgField::DestroyNativePeer, Wombat::MamaPayloadBridge::DestroyNativePeer, Wombat::MamaPrice::DestroyNativePeer, Wombat::MamaPublisher::DestroyNativePeer, Wombat::MamaQueue::DestroyNativePeer, Wombat::MamaSource::DestroyNativePeer, Wombat::MamaSourceGroup::DestroyNativePeer, Wombat::MamaSourceGroupManager::DestroyNativePeer, Wombat::MamaSourceManager::DestroyNativePeer, Wombat::MamaSymbolMapFile::DestroyNativePeer, Wombat::MamaTimer::DestroyNativePeer, Wombat::MamaTransport::DestroyNativePeer
virtual void OnDispose()
Reimplemented by: Wombat::MamaMsg::OnDispose, Wombat::MamaTransport::OnDispose
IntPtr nativeHandle;
the handle to the native peer object
Updated on 2023-03-31 at 15:29:33 +0100