Chemical Data Processing Library C++ API - Version 1.0.0
Classes | Public Types | Public Member Functions | List of all members
CDPL::Util::ObjectStack< T > Class Template Reference

ObjectStack. More...

#include <ObjectStack.hpp>

+ Inheritance diagram for CDPL::Util::ObjectStack< T >:

Classes

struct  DefaultConstructor
 
struct  DefaultDestructor
 

Public Types

typedef T ObjectType
 
typedef std::shared_ptr< ObjectTypeSharedObjectPointer
 
typedef std::function< ObjectType *()> ConstructorFunction
 
typedef std::function< void(ObjectType *)> DestructorFunction
 
typedef std::function< void(ObjectType &)> ObjectFunction
 

Public Member Functions

 ObjectStack (const ObjectStack &stack)
 
 ObjectStack (std::size_t max_pool_size=0)
 
template<typename C , typename D >
 ObjectStack (const C &ctor_func, const D &dtor_func, std::size_t max_pool_size=0)
 
 ~ObjectStack ()
 
ObjectTypegetRaw ()
 
const SharedObjectPointerget ()
 
void put ()
 
void putAll ()
 
std::size_t getMaxPoolSize () const
 
void setMaxPoolSize (std::size_t max_size)
 
void freeMemory (bool unused_only=true)
 
void setInitFunction (const ObjectFunction &func)
 
void setCleanupFunction (const ObjectFunction &func)
 
ObjectStackoperator= (const ObjectStack &stack)
 

Detailed Description

template<typename T>
class CDPL::Util::ObjectStack< T >

ObjectStack.

Member Typedef Documentation

◆ ObjectType

template<typename T >
typedef T CDPL::Util::ObjectStack< T >::ObjectType

◆ SharedObjectPointer

template<typename T >
typedef std::shared_ptr<ObjectType> CDPL::Util::ObjectStack< T >::SharedObjectPointer

◆ ConstructorFunction

template<typename T >
typedef std::function<ObjectType*()> CDPL::Util::ObjectStack< T >::ConstructorFunction

◆ DestructorFunction

template<typename T >
typedef std::function<void(ObjectType*)> CDPL::Util::ObjectStack< T >::DestructorFunction

◆ ObjectFunction

template<typename T >
typedef std::function<void(ObjectType&)> CDPL::Util::ObjectStack< T >::ObjectFunction

Constructor & Destructor Documentation

◆ ObjectStack() [1/3]

template<typename T >
CDPL::Util::ObjectStack< T >::ObjectStack ( const ObjectStack< T > &  stack)
inline

◆ ObjectStack() [2/3]

template<typename T >
CDPL::Util::ObjectStack< T >::ObjectStack ( std::size_t  max_pool_size = 0)
inline

◆ ObjectStack() [3/3]

template<typename T >
template<typename C , typename D >
CDPL::Util::ObjectStack< T >::ObjectStack ( const C &  ctor_func,
const D &  dtor_func,
std::size_t  max_pool_size = 0 
)
inline

◆ ~ObjectStack()

template<typename T >
CDPL::Util::ObjectStack< T >::~ObjectStack ( )
inline

Member Function Documentation

◆ getRaw()

template<typename T >
ObjectType* CDPL::Util::ObjectStack< T >::getRaw ( )
inline

◆ get()

template<typename T >
const SharedObjectPointer& CDPL::Util::ObjectStack< T >::get ( )
inline

◆ put()

template<typename T >
void CDPL::Util::ObjectStack< T >::put ( )
inline

◆ putAll()

template<typename T >
void CDPL::Util::ObjectStack< T >::putAll ( )
inline

◆ getMaxPoolSize()

template<typename T >
std::size_t CDPL::Util::ObjectStack< T >::getMaxPoolSize ( ) const
inline

◆ setMaxPoolSize()

template<typename T >
void CDPL::Util::ObjectStack< T >::setMaxPoolSize ( std::size_t  max_size)
inline

◆ freeMemory()

template<typename T >
void CDPL::Util::ObjectStack< T >::freeMemory ( bool  unused_only = true)
inline

◆ setInitFunction()

template<typename T >
void CDPL::Util::ObjectStack< T >::setInitFunction ( const ObjectFunction func)
inline

◆ setCleanupFunction()

template<typename T >
void CDPL::Util::ObjectStack< T >::setCleanupFunction ( const ObjectFunction func)
inline

◆ operator=()

template<typename T >
ObjectStack& CDPL::Util::ObjectStack< T >::operator= ( const ObjectStack< T > &  stack)
inline

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