Chemical Data Processing Library C++ API - Version 1.1.1
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
 

Public Types

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

Public Member Functions

 ObjectStack (const ObjectStack &stack)
 
 ObjectStack (std::size_t max_pool_size=0)
 
template<typename C >
 ObjectStack (const C &ctor_func, std::size_t max_pool_size)
 
 ~ObjectStack ()
 
ObjectTypeget ()
 
void put ()
 
void putAll ()
 
std::size_t getMaxSize () const
 
void setMaxSize (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

◆ ConstructorFunction

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

◆ 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 >
CDPL::Util::ObjectStack< T >::ObjectStack ( const C &  ctor_func,
std::size_t  max_pool_size 
)
inline

◆ ~ObjectStack()

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

Member Function Documentation

◆ get()

template<typename T >
ObjectType* 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

◆ getMaxSize()

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

◆ setMaxSize()

template<typename T >
void CDPL::Util::ObjectStack< T >::setMaxSize ( 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: