Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::Placeholder< PlaceholderT, SizeV > Union Template Reference

#include <Any.h>

Classes

struct  Size
 

Public Member Functions

 Placeholder ()
 
void erase ()
 
bool isLocal () const
 
void setLocal (bool local) const
 
PlaceholderT * content () const
 

Private Types

typedef std::aligned_storage< SizeV+1 >::type AlignerType
 

Private Attributes

PlaceholderT * pHolder
 
char holder [SizeV+1]
 
AlignerType aligner
 

Friends

class Any
 
class Dynamic::Var
 
class Dynamic::VarHolder
 
template<class >
class Dynamic::VarHolderImpl
 

Detailed Description

template<typename PlaceholderT, unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
union Poco::Placeholder< PlaceholderT, SizeV >

ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for small object optimization, when enabled).

If Holder<Type> fits into POCO_SMALL_OBJECT_SIZE bytes of storage, it will be placement-new-allocated into the local buffer (i.e. there will be no heap-allocation). The local buffer size is one byte larger - [POCO_SMALL_OBJECT_SIZE + 1], additional byte value indicating where the object was allocated (0 => heap, 1 => local).

Definition at line 45 of file Any.h.

Member Typedef Documentation

◆ AlignerType

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
typedef std::aligned_storage<SizeV+1>::type Poco::Placeholder< PlaceholderT, SizeV >::AlignerType
private

Definition at line 93 of file Any.h.

Constructor & Destructor Documentation

◆ Placeholder()

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
Poco::Placeholder< PlaceholderT, SizeV >::Placeholder ( )
inline

Definition at line 61 of file Any.h.

Member Function Documentation

◆ content()

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
PlaceholderT * Poco::Placeholder< PlaceholderT, SizeV >::content ( ) const
inline

Definition at line 81 of file Any.h.

◆ erase()

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
void Poco::Placeholder< PlaceholderT, SizeV >::erase ( )
inline

Definition at line 66 of file Any.h.

◆ isLocal()

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
bool Poco::Placeholder< PlaceholderT, SizeV >::isLocal ( ) const
inline

Definition at line 71 of file Any.h.

◆ setLocal()

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
void Poco::Placeholder< PlaceholderT, SizeV >::setLocal ( bool local) const
inline

Definition at line 76 of file Any.h.

Friends And Related Symbol Documentation

◆ Any

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
friend class Any
friend

Definition at line 99 of file Any.h.

◆ Dynamic::Var

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
friend class Dynamic::Var
friend

Definition at line 100 of file Any.h.

◆ Dynamic::VarHolder

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
friend class Dynamic::VarHolder
friend

Definition at line 101 of file Any.h.

◆ Dynamic::VarHolderImpl

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
template<class >
friend class Dynamic::VarHolderImpl
friend

Definition at line 102 of file Any.h.

Member Data Documentation

◆ aligner

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
AlignerType Poco::Placeholder< PlaceholderT, SizeV >::aligner
private

Definition at line 97 of file Any.h.

◆ holder

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
char Poco::Placeholder< PlaceholderT, SizeV >::holder[SizeV+1]
mutableprivate

Definition at line 96 of file Any.h.

◆ pHolder

template<typename PlaceholderT , unsigned int SizeV = POCO_SMALL_OBJECT_SIZE>
PlaceholderT* Poco::Placeholder< PlaceholderT, SizeV >::pHolder
private

Definition at line 95 of file Any.h.


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