BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface software
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
fc::static_variant< Types > Class Template Reference

#include <raw_fwd.hpp>

Classes

struct  import_helper
 
struct  import_helper< T, type_in_typelist< T > >
 
struct  tag
 
struct  type_eq
 
struct  type_lt
 

Public Types

using tag_type = int64_t
 
using list = typelist::list< Types... >
 
using flat_set_type = flat_set< static_variant, type_lt >
 

Public Member Functions

 static_variant ()
 
template<typename... Other>
 static_variant (const static_variant< Other... > &cpy)
 
 static_variant (const static_variant &cpy)
 
 static_variant (static_variant &&mv)
 
template<typename... Other>
 static_variant (static_variant< Other... > &&mv)
 
template<typename X , typename = type_in_typelist<X>>
 static_variant (const X &v)
 
template<typename X , typename = type_in_typelist<X>>
 static_variant (X &&v)
 
 ~static_variant ()
 
template<typename X , typename = type_in_typelist<X>>
static_variantoperator= (const X &v)
 
static_variantoperator= (const static_variant &v)
 
static_variantoperator= (static_variant &&v)
 
template<typename X , typename = type_in_typelist<X>>
X & get ()
 
template<typename X , typename = type_in_typelist<X>>
const X & get () const
 
template<typename visitor >
visitor::result_type visit (visitor &v)
 
template<typename visitor >
visitor::result_type visit (const visitor &v)
 
template<typename visitor >
visitor::result_type visit (visitor &v) const
 
template<typename visitor >
visitor::result_type visit (const visitor &v) const
 
void set_which (tag_type tag)
 
tag_type which () const
 
template<typename T >
bool is_type () const
 

Static Public Member Functions

template<typename... Other>
static static_variant import_from (const static_variant< Other... > &other)
 
template<typename... Other>
static static_variant import_from (static_variant< Other... > &&other)
 
template<typename visitor >
static visitor::result_type visit (tag_type tag, visitor &v, void *data)
 
template<typename visitor >
static visitor::result_type visit (tag_type tag, const visitor &v, void *data)
 
template<typename visitor >
static visitor::result_type visit (tag_type tag, visitor &v, const void *data)
 
template<typename visitor >
static visitor::result_type visit (tag_type tag, const visitor &v, const void *data)
 
static constexpr size_t count ()
 

Protected Types

template<typename X >
using type_in_typelist = std::enable_if_t< typelist::index_of< list, X >()!=-1 >
 

Protected Member Functions

template<typename X , typename = type_in_typelist<X>>
void init (const X &x)
 
template<typename X , typename = type_in_typelist<X>>
void init (X &&x)
 
void init_from_tag (tag_type tag)
 
void clean ()
 

Protected Attributes

tag_type _tag
 
impl::dynamic_storage storage
 

Friends

bool operator== (const static_variant &a, const static_variant &b)
 

Detailed Description

template<typename... Types>
class fc::static_variant< Types >

Definition at line 27 of file raw_fwd.hpp.

Member Typedef Documentation

template<typename... Types>
using fc::static_variant< Types >::flat_set_type = flat_set<static_variant, type_lt>

Definition at line 130 of file static_variant.hpp.

template<typename... Types>
using fc::static_variant< Types >::list = typelist::list<Types...>

Definition at line 47 of file static_variant.hpp.

template<typename... Types>
using fc::static_variant< Types >::tag_type = int64_t

Definition at line 46 of file static_variant.hpp.

template<typename... Types>
template<typename X >
using fc::static_variant< Types >::type_in_typelist = std::enable_if_t<typelist::index_of<list, X>() != -1>
protected

Definition at line 56 of file static_variant.hpp.

Constructor & Destructor Documentation

template<typename... Types>
fc::static_variant< Types >::static_variant ( )
inline

Definition at line 151 of file static_variant.hpp.

template<typename... Types>
template<typename... Other>
fc::static_variant< Types >::static_variant ( const static_variant< Other... > &  cpy)
inline

Definition at line 157 of file static_variant.hpp.

template<typename... Types>
fc::static_variant< Types >::static_variant ( const static_variant< Types > &  cpy)
inline

Definition at line 164 of file static_variant.hpp.

template<typename... Types>
fc::static_variant< Types >::static_variant ( static_variant< Types > &&  mv)
inline

Definition at line 171 of file static_variant.hpp.

template<typename... Types>
template<typename... Other>
fc::static_variant< Types >::static_variant ( static_variant< Other... > &&  mv)
inline

Definition at line 179 of file static_variant.hpp.

template<typename... Types>
template<typename X , typename = type_in_typelist<X>>
fc::static_variant< Types >::static_variant ( const X &  v)
inline

Definition at line 187 of file static_variant.hpp.

template<typename... Types>
template<typename X , typename = type_in_typelist<X>>
fc::static_variant< Types >::static_variant ( X &&  v)
inline

Definition at line 191 of file static_variant.hpp.

template<typename... Types>
fc::static_variant< Types >::~static_variant ( )
inline

Definition at line 195 of file static_variant.hpp.

Member Function Documentation

template<typename... Types>
void fc::static_variant< Types >::clean ( )
inlineprotected

Definition at line 87 of file static_variant.hpp.

template<typename... Types>
static constexpr size_t fc::static_variant< Types >::count ( )
inlinestatic

Definition at line 305 of file static_variant.hpp.

template<typename... Types>
template<typename X , typename = type_in_typelist<X>>
X& fc::static_variant< Types >::get ( )
inline

Definition at line 234 of file static_variant.hpp.

template<typename... Types>
template<typename X , typename = type_in_typelist<X>>
const X& fc::static_variant< Types >::get ( ) const
inline

Definition at line 242 of file static_variant.hpp.

template<typename... Types>
template<typename... Other>
static static_variant fc::static_variant< Types >::import_from ( const static_variant< Other... > &  other)
inlinestatic

Import the value from a foreign static_variant with types not in this one, and throw if the value is an incompatible type

Definition at line 135 of file static_variant.hpp.

template<typename... Types>
template<typename... Other>
static static_variant fc::static_variant< Types >::import_from ( static_variant< Other... > &&  other)
inlinestatic

Import the value from a foreign static_variant with types not in this one, and throw if the value is an incompatible type

Definition at line 144 of file static_variant.hpp.

template<typename... Types>
template<typename X , typename = type_in_typelist<X>>
void fc::static_variant< Types >::init ( const X &  x)
inlineprotected

Definition at line 62 of file static_variant.hpp.

template<typename... Types>
template<typename X , typename = type_in_typelist<X>>
void fc::static_variant< Types >::init ( X &&  x)
inlineprotected

Definition at line 69 of file static_variant.hpp.

template<typename... Types>
void fc::static_variant< Types >::init_from_tag ( tag_type  tag)
inlineprotected

Definition at line 75 of file static_variant.hpp.

template<typename... Types>
template<typename T >
bool fc::static_variant< Types >::is_type ( ) const
inline

Definition at line 316 of file static_variant.hpp.

template<typename... Types>
template<typename X , typename = type_in_typelist<X>>
static_variant& fc::static_variant< Types >::operator= ( const X &  v)
inline

Definition at line 200 of file static_variant.hpp.

template<typename... Types>
static_variant& fc::static_variant< Types >::operator= ( const static_variant< Types > &  v)
inline

Definition at line 205 of file static_variant.hpp.

template<typename... Types>
static_variant& fc::static_variant< Types >::operator= ( static_variant< Types > &&  v)
inline

Definition at line 214 of file static_variant.hpp.

template<typename... Types>
void fc::static_variant< Types >::set_which ( tag_type  tag)
inline

Definition at line 306 of file static_variant.hpp.

template<typename... Types>
template<typename visitor >
visitor::result_type fc::static_variant< Types >::visit ( visitor &  v)
inline

Definition at line 250 of file static_variant.hpp.

template<typename... Types>
template<typename visitor >
visitor::result_type fc::static_variant< Types >::visit ( const visitor &  v)
inline

Definition at line 255 of file static_variant.hpp.

template<typename... Types>
template<typename visitor >
visitor::result_type fc::static_variant< Types >::visit ( visitor &  v) const
inline

Definition at line 260 of file static_variant.hpp.

template<typename... Types>
template<typename visitor >
visitor::result_type fc::static_variant< Types >::visit ( const visitor &  v) const
inline

Definition at line 265 of file static_variant.hpp.

template<typename... Types>
template<typename visitor >
static visitor::result_type fc::static_variant< Types >::visit ( tag_type  tag,
visitor &  v,
void *  data 
)
inlinestatic

Definition at line 270 of file static_variant.hpp.

template<typename... Types>
template<typename visitor >
static visitor::result_type fc::static_variant< Types >::visit ( tag_type  tag,
const visitor &  v,
void *  data 
)
inlinestatic

Definition at line 279 of file static_variant.hpp.

template<typename... Types>
template<typename visitor >
static visitor::result_type fc::static_variant< Types >::visit ( tag_type  tag,
visitor &  v,
const void *  data 
)
inlinestatic

Definition at line 288 of file static_variant.hpp.

template<typename... Types>
template<typename visitor >
static visitor::result_type fc::static_variant< Types >::visit ( tag_type  tag,
const visitor &  v,
const void *  data 
)
inlinestatic

Definition at line 297 of file static_variant.hpp.

template<typename... Types>
tag_type fc::static_variant< Types >::which ( ) const
inline

Definition at line 313 of file static_variant.hpp.

Friends And Related Function Documentation

template<typename... Types>
bool operator== ( const static_variant< Types > &  a,
const static_variant< Types > &  b 
)
friend

Definition at line 224 of file static_variant.hpp.

Member Data Documentation

template<typename... Types>
tag_type fc::static_variant< Types >::_tag
protected

Definition at line 58 of file static_variant.hpp.

template<typename... Types>
impl::dynamic_storage fc::static_variant< Types >::storage
protected

Definition at line 59 of file static_variant.hpp.


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