NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes
CStructWrapper< TData > Class Template Reference

Search Toolkit Book for CStructWrapper

#include <algo/blast/api/setup_factory.hpp>

+ Inheritance diagram for CStructWrapper< TData >:
+ Collaboration diagram for CStructWrapper< TData >:

List of all members.

Public Types

typedef TData *( TDelete )(TData *)
 type definition for a function that deallocated memory associated with an object.

Public Member Functions

 CStructWrapper (TData *obj, TDelete *dfun)
 Constructor.
 ~CStructWrapper ()
 Destructor.
TData * GetPointer ()
 The a pointer to the wrapped object.
TData & operator* ()
 The a reference to the wrapped object.
TData * operator-> ()
 The a pointer to the wrapped object.

Private Member Functions

 CStructWrapper (CStructWrapper< TData > &x)
 Prohibit copy constructor.
CStructWrapperoperator= (CStructWrapper< TData > &x)
 Prohibit assignment operator.

Private Attributes

TData * m_Data
 the pointer managed by this object
TDeletem_DeleteFunction
 deallocation function for the pointer above

Detailed Description

template<class TData>
class CStructWrapper< TData >

Definition at line 94 of file setup_factory.hpp.


Member Typedef Documentation

template<class TData>
typedef TData*( CStructWrapper< TData >::TDelete)(TData *)

type definition for a function that deallocated memory associated with an object.

This functions return value is ignored; it would be void, except that most existing deletion functions return "NULL".

Definition at line 100 of file setup_factory.hpp.


Constructor & Destructor Documentation

template<class TData>
CStructWrapper< TData >::CStructWrapper ( TData *  obj,
TDelete dfun 
) [inline]

Constructor.

Parameters:
objobject to wrap [in]
dfundeallocation function for object above [in]

Definition at line 105 of file setup_factory.hpp.

template<class TData>
CStructWrapper< TData >::~CStructWrapper ( ) [inline]

Destructor.

Definition at line 111 of file setup_factory.hpp.

template<class TData>
CStructWrapper< TData >::CStructWrapper ( CStructWrapper< TData > &  x) [private]

Prohibit copy constructor.


Member Function Documentation

template<class TData>
TData* CStructWrapper< TData >::GetPointer ( void  ) [inline]
template<class TData>
TData& CStructWrapper< TData >::operator* ( ) [inline]

The a reference to the wrapped object.

Definition at line 126 of file setup_factory.hpp.

template<class TData>
TData* CStructWrapper< TData >::operator-> ( ) [inline]

The a pointer to the wrapped object.

Definition at line 132 of file setup_factory.hpp.

template<class TData>
CStructWrapper& CStructWrapper< TData >::operator= ( CStructWrapper< TData > &  x) [private]

Prohibit assignment operator.


Member Data Documentation

template<class TData>
TData* CStructWrapper< TData >::m_Data [private]

the pointer managed by this object

Definition at line 144 of file setup_factory.hpp.

template<class TData>
TDelete* CStructWrapper< TData >::m_DeleteFunction [private]

deallocation function for the pointer above

Definition at line 146 of file setup_factory.hpp.


The documentation for this class was generated from the following file:
Modified on Fri Aug 22 18:21:52 2014 by modify_doxy.py rev. 426318