Turi Create  4.0
turi::any::holder< ValueType > Class Template Reference

#include <core/util/any.hpp>

Classes

struct  registry_type
 

Public Member Functions

 holder (const ValueType &value)
 Construct a holder from a value.
 
 holder (iarchive_soft_fail &arc)
 Construct a holder from an archive.
 
const std::type_info & type () const
 Get the type info of the holder.
 
iholder * clone () const
 Clone a holder.
 
void deep_op_equal (const iholder *other)
 Deep assignment.
 
uint64_t deserializer_id () const
 
std::ostream & print (std::ostream &out) const
 

Static Public Member Functions

static iholder * deserialize (iarchive_soft_fail &arc)
 

Public Attributes

ValueType contents
 The actual contents of the holder.
 

Static Public Attributes

static registry_type registry
 

Detailed Description

template<typename ValueType>
class turi::any::holder< ValueType >

holder is an instantiation of iholder

Definition at line 291 of file any.hpp.

Member Function Documentation

◆ deserialize()

template<typename ValueType >
static iholder* turi::any::holder< ValueType >::deserialize ( iarchive_soft_fail arc)
inlinestatic

The actual deserialization function for this holder type

Definition at line 325 of file any.hpp.

◆ deserializer_id()

template<typename ValueType >
uint64_t turi::any::holder< ValueType >::deserializer_id ( ) const
inline

Get the deserializer id from the static registry associated with this type of holder

Definition at line 312 of file any.hpp.

◆ print()

template<typename ValueType >
std::ostream& turi::any::holder< ValueType >::print ( std::ostream &  out) const
inline

Print the contents or the type if the contents does not support printing

Definition at line 320 of file any.hpp.

Member Data Documentation

◆ registry

template<typename ValueType >
any::holder< ValueType >::registry_type turi::any::holder< ValueType >::registry
static

The registry is a static member that will get constructed before main and used to register the any type

This static membery computes the holder (type specific) deserialization id and also registers it with the global registry.

Definition at line 351 of file any.hpp.


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