Zserio C++ runtime library  1.1.0
Built for Zserio 2.15.0
zserio::pmr Namespace Reference

Classes

class  MemoryResource
 
class  PolymorphicAllocator
 
class  PropagatingPolymorphicAllocator
 

Typedefs

using AnyHolder = zserio::AnyHolder< PropagatingPolymorphicAllocator< uint8_t > >
 
using BytesArrayTraits = BasicBytesArrayTraits< PropagatingPolymorphicAllocator >
 
using StringArrayTraits = BasicStringArrayTraits< PropagatingPolymorphicAllocator >
 
using BitBufferArrayTraits = BasicBitBufferArrayTraits< PropagatingPolymorphicAllocator >
 
using BitBuffer = BasicBitBuffer< PropagatingPolymorphicAllocator< uint8_t > >
 
template<typename T >
using HeapOptionalHolder = zserio::HeapOptionalHolder< T, PropagatingPolymorphicAllocator< T > >
 
using ReflectableServiceData = BasicReflectableServiceData< PropagatingPolymorphicAllocator< uint8_t > >
 
using ObjectServiceData = BasicObjectServiceData< PropagatingPolymorphicAllocator< uint8_t > >
 
using RawServiceDataHolder = BasicRawServiceDataHolder< PropagatingPolymorphicAllocator< uint8_t > >
 
using RawServiceDataView = BasicRawServiceDataView< PropagatingPolymorphicAllocator< uint8_t > >
 
template<typename KEY , typename T , typename COMPARE = std::less<KEY>>
using map = std::map< KEY, T, COMPARE, PropagatingPolymorphicAllocator< std::pair< const KEY, T > >>
 
using ReflectableFactory = BasicReflectableFactory< PropagatingPolymorphicAllocator< uint8_t > >
 
template<typename T , typename COMPARE = std::less<T>>
using set = std::set< T, COMPARE, PropagatingPolymorphicAllocator< T > >
 
using string = zserio::string< PropagatingPolymorphicAllocator< char > >
 
template<typename T >
using unique_ptr = zserio::unique_ptr< T, PropagatingPolymorphicAllocator< T > >
 
template<typename T >
using vector = zserio::vector< T, PropagatingPolymorphicAllocator< T > >
 
using IReflectable = IBasicReflectable< PropagatingPolymorphicAllocator< uint8_t > >
 
using IReflectablePtr = IBasicReflectablePtr< PropagatingPolymorphicAllocator< uint8_t > >
 
using IReflectableConstPtr = IBasicReflectableConstPtr< PropagatingPolymorphicAllocator< uint8_t > >
 
using IServiceData = IBasicServiceData< PropagatingPolymorphicAllocator< uint8_t > >
 
using IServiceDataPtr = IBasicServiceDataPtr< PropagatingPolymorphicAllocator< uint8_t > >
 
using IService = IBasicService< PropagatingPolymorphicAllocator< uint8_t > >
 
using IServiceClient = IBasicServiceClient< PropagatingPolymorphicAllocator< uint8_t > >
 
using ITypeInfo = IBasicTypeInfo< PropagatingPolymorphicAllocator< uint8_t > >
 
using FieldInfo = BasicFieldInfo< PropagatingPolymorphicAllocator< uint8_t > >
 
using ParameterInfo = BasicParameterInfo< PropagatingPolymorphicAllocator< uint8_t > >
 
using FunctionInfo = BasicFunctionInfo< PropagatingPolymorphicAllocator< uint8_t > >
 
using CaseInfo = BasicCaseInfo< PropagatingPolymorphicAllocator< uint8_t > >
 
using ColumnInfo = BasicColumnInfo< PropagatingPolymorphicAllocator< uint8_t > >
 
using TableInfo = BasicTableInfo< PropagatingPolymorphicAllocator< uint8_t > >
 
using TemplateArgumentInfo = BasicTemplateArgumentInfo< PropagatingPolymorphicAllocator< uint8_t > >
 
using MessageInfo = BasicMessageInfo< PropagatingPolymorphicAllocator< uint8_t > >
 
using MethodInfo = BasicMethodInfo< PropagatingPolymorphicAllocator< uint8_t > >
 

Functions

MemoryResourcegetDefaultResource () noexcept
 
MemoryResourcesetDefaultResource (MemoryResource *resource) noexcept
 
bool operator== (const MemoryResource &lhs, const MemoryResource &rhs)
 
bool operator!= (const MemoryResource &lhs, const MemoryResource &rhs)
 
MemoryResourcegetNewDeleteResource () noexcept
 

Typedef Documentation

◆ AnyHolder

Typedef to AnyHolder provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 15 of file AnyHolder.h.

◆ BitBuffer

Typedef to BitBuffer provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 15 of file BitBuffer.h.

◆ BitBufferArrayTraits

Typedef to BitBufferArrayTraits provided for convenience - using PropagatingPolymorphicAllocator.

Definition at line 25 of file ArrayTraits.h.

◆ BytesArrayTraits

Typedef to BytesArrayTraits provided for convenience - using PropagatingPolymorphicAllocator.

Definition at line 15 of file ArrayTraits.h.

◆ CaseInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 18 of file ITypeInfo.h.

◆ ColumnInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 19 of file ITypeInfo.h.

◆ FieldInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 15 of file ITypeInfo.h.

◆ FunctionInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 17 of file ITypeInfo.h.

◆ HeapOptionalHolder

Typedef to HeapOptionalHolder provided for convenience - using PropagatingPolymorphicAllocator.

Definition at line 16 of file HeapOptionalHolder.h.

◆ IReflectable

Typedef to reflectable interface provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 21 of file IReflectable.h.

◆ IReflectableConstPtr

Typedef to reflectable interface provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 23 of file IReflectable.h.

◆ IReflectablePtr

Typedef to reflectable interface provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 22 of file IReflectable.h.

◆ IService

Typedef to service interface provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 19 of file IService.h.

◆ IServiceClient

Typedef to service interface provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 20 of file IService.h.

◆ IServiceData

Typedef to service interface provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 17 of file IService.h.

◆ IServiceDataPtr

Typedef to service interface provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 18 of file IService.h.

◆ ITypeInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 14 of file ITypeInfo.h.

◆ map

template<typename KEY , typename T , typename COMPARE = std::less<KEY>>
using zserio::pmr::map = typedef std::map<KEY, T, COMPARE, PropagatingPolymorphicAllocator<std::pair<const KEY, T> >>

Typedef to std::map provided for convenience - using PropagatingPolymorphicAllocator.

Definition at line 17 of file Map.h.

◆ MessageInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 22 of file ITypeInfo.h.

◆ MethodInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 23 of file ITypeInfo.h.

◆ ObjectServiceData

◆ ParameterInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 16 of file ITypeInfo.h.

◆ RawServiceDataHolder

◆ RawServiceDataView

◆ ReflectableFactory

Typedef to the reflectable factroy provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 15 of file Reflectable.h.

◆ ReflectableServiceData

Typedef to service data implementation provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 27 of file IService.h.

◆ set

template<typename T , typename COMPARE = std::less<T>>
using zserio::pmr::set = typedef std::set<T, COMPARE, PropagatingPolymorphicAllocator<T> >

Typedef to std::set provided for convenience - using PropagatingPolymorphicAllocator.

Definition at line 17 of file Set.h.

◆ string

Typedef to std::string provided for convenience - using PropagatingPolymorphicAllocator<char>.

Definition at line 15 of file String.h.

◆ StringArrayTraits

Typedef to StringArrayTraits provided for convenience - using PropagatingPolymorphicAllocator.

Definition at line 20 of file ArrayTraits.h.

◆ TableInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 20 of file ITypeInfo.h.

◆ TemplateArgumentInfo

Typedef provided for convenience - using default PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 21 of file ITypeInfo.h.

◆ unique_ptr

template<typename T >
using zserio::pmr::unique_ptr = typedef zserio::unique_ptr<T, PropagatingPolymorphicAllocator<T> >

Typedef to std::unique_ptr provided for convenience - using PropagatingPolymorphicAllocator<uint8_t>.

Definition at line 16 of file UniquePtr.h.

◆ vector

template<typename T >
using zserio::pmr::vector = typedef zserio::vector<T, PropagatingPolymorphicAllocator<T> >

Typedef to std::vector provided for convenience - using PropagatingPolymorphicAllocator.

Definition at line 16 of file Vector.h.

Function Documentation

◆ getDefaultResource()

MemoryResource * zserio::pmr::getDefaultResource ( )
noexcept

Returns default memory resource, which is the resource set by previous call to setDefaultResource, or zserio::pmr::NewDeleteResource if no call to setDefaultResource was done.

Warning
This function does not synchronize with setDefaultResource.
Returns
Default memory resource.

Definition at line 23 of file MemoryResource.cpp.

◆ getNewDeleteResource()

MemoryResource * zserio::pmr::getNewDeleteResource ( )
noexcept

Gets pointer to (default) new delete resource.

Definition at line 8 of file NewDeleteResource.cpp.

◆ operator!=()

bool zserio::pmr::operator!= ( const MemoryResource lhs,
const MemoryResource rhs 
)
inline

Compares the memory resources lhs and rhs for non-equality.

Parameters
lhsFirst memory resource to compare.
rhsSecond memory resource to compare.
Returns
True when the two resources are NOT equal, false otherwise.

Definition at line 154 of file MemoryResource.h.

◆ operator==()

bool zserio::pmr::operator== ( const MemoryResource lhs,
const MemoryResource rhs 
)
inline

Compares the memory resources lhs and rhs for equality.

Parameters
lhsFirst memory resource to compare.
rhsSecond memory resource to compare.
Returns
True when the two resources are equal, false otherwise.

Definition at line 141 of file MemoryResource.h.

◆ setDefaultResource()

MemoryResource * zserio::pmr::setDefaultResource ( MemoryResource resource)
noexcept

If resource is not null, sets the default memory resource pointer to resource, otherwise, sets the default memory resource pointer to zserio::pmr::NewDeleteResource. All subsequent calls to getDefaultResource() returns resource set by this function.

Warning
This function does not synchronize with getDefaultResource or other calls to setDefaultResource. It is undefined behavior to call setDefaultResource together with getDefaultResource concurrently.
Parameters
resourceResource to be set as default, or nullptr to use zserio::pmr::NewDeleteResource.
Returns
Previous default resource.

Definition at line 28 of file MemoryResource.cpp.