GRASP rci-qed
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
cpptoml::value< T > Class Template Reference

#include <cpptoml.h>

Inheritance diagram for cpptoml::value< T >:
Inheritance graph
[legend]
Collaboration diagram for cpptoml::value< T >:
Collaboration graph
[legend]

Classes

struct  make_shared_enabler
 

Public Member Functions

std::shared_ptr< baseclone () const override
 
 value (const make_shared_enabler &, const T &val)
 
bool is_value () const override
 
T & get ()
 
const T & get () const
 
- Public Member Functions inherited from cpptoml::base
virtual ~base ()=default
 
virtual bool is_table () const
 
std::shared_ptr< tableas_table ()
 
virtual bool is_array () const
 
std::shared_ptr< arrayas_array ()
 
virtual bool is_table_array () const
 
std::shared_ptr< table_arrayas_table_array ()
 
template<class T >
std::shared_ptr< value< T > > as ()
 
template<class T >
std::shared_ptr< const value< T > > as () const
 
template<class Visitor , class... Args>
void accept (Visitor &&visitor, Args &&... args) const
 
template<>
std::shared_ptr< value< double > > as ()
 
template<>
std::shared_ptr< const value< double > > as () const
 

Private Member Functions

 value (const T &val)
 
 value (const value &val)=delete
 
valueoperator= (const value &val)=delete
 

Private Attributes

data_
 

Friends

template<class U >
std::shared_ptr< typename value_traits< U >::type > cpptoml::make_value (U &&val)
 

Additional Inherited Members

- Protected Member Functions inherited from cpptoml::base
 base ()
 

Detailed Description

template<class T>
class cpptoml::value< T >

A concrete TOML value representing the "leaves" of the "tree".

Constructor & Destructor Documentation

◆ value() [1/3]

template<class T>
cpptoml::value< T >::value ( const make_shared_enabler ,
const T &  val 
)
inline

◆ value() [2/3]

template<class T>
cpptoml::value< T >::value ( const T &  val)
inlineprivate

Constructs a value from the given data.

◆ value() [3/3]

template<class T>
cpptoml::value< T >::value ( const value< T > &  val)
privatedelete

Member Function Documentation

◆ clone()

template<class T >
std::shared_ptr< base > cpptoml::value< T >::clone ( ) const
overridevirtual

Implements cpptoml::base.

Here is the call graph for this function:

◆ get() [1/2]

template<class T>
T& cpptoml::value< T >::get ( )
inline

Gets the data associated with this value.

Here is the caller graph for this function:

◆ get() [2/2]

template<class T>
const T& cpptoml::value< T >::get ( ) const
inline

Gets the data associated with this value. Const version.

◆ is_value()

template<class T>
bool cpptoml::value< T >::is_value ( ) const
inlineoverridevirtual

Determines if the given TOML element is a value.

Reimplemented from cpptoml::base.

◆ operator=()

template<class T>
value& cpptoml::value< T >::operator= ( const value< T > &  val)
privatedelete

Friends And Related Function Documentation

◆ cpptoml::make_value

template<class T>
template<class U >
std::shared_ptr<typename value_traits<U>::type> cpptoml::make_value ( U &&  val)
friend

Member Data Documentation

◆ data_

template<class T>
T cpptoml::value< T >::data_
private

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