tvm
Public Types | Public Member Functions | List of all members
tvm::TracedOptional< T > Class Template Reference

Traced wrapper for Optional objects. More...

#include <traced_object.h>

Collaboration diagram for tvm::TracedOptional< T >:

Public Types

using WrappedT = typename detail::TracedObjectWrapperSelector< T >::Type
 

Public Member Functions

 TracedOptional (const WrappedT &value)
 Implicit conversion from the corresponding non-optional traced wrapper. More...
 
 TracedOptional (Optional< T > optional, ObjectPath path)
 
const Optional< T > & Get () const
 Access the wrapped optional object. More...
 
const ObjectPathGetPath () const
 Get the path of the wrapped optional object. More...
 
bool defined () const
 Returns true iff the object is present. More...
 
WrappedT value () const
 Returns a non-optional traced wrapper, throws if defined() is false. More...
 
 operator bool () const
 Same as defined(). More...
 

Detailed Description

template<typename T>
class tvm::TracedOptional< T >

Traced wrapper for Optional objects.

Member Typedef Documentation

◆ WrappedT

template<typename T>
using tvm::TracedOptional< T >::WrappedT = typename detail::TracedObjectWrapperSelector<T>::Type

Constructor & Destructor Documentation

◆ TracedOptional() [1/2]

template<typename T>
tvm::TracedOptional< T >::TracedOptional ( const WrappedT value)
inline

Implicit conversion from the corresponding non-optional traced wrapper.

◆ TracedOptional() [2/2]

template<typename T>
tvm::TracedOptional< T >::TracedOptional ( Optional< T >  optional,
ObjectPath  path 
)
inlineexplicit

Member Function Documentation

◆ defined()

template<typename T>
bool tvm::TracedOptional< T >::defined ( ) const
inline

Returns true iff the object is present.

◆ Get()

template<typename T>
const Optional<T>& tvm::TracedOptional< T >::Get ( ) const
inline

Access the wrapped optional object.

◆ GetPath()

template<typename T>
const ObjectPath& tvm::TracedOptional< T >::GetPath ( ) const
inline

Get the path of the wrapped optional object.

◆ operator bool()

template<typename T>
tvm::TracedOptional< T >::operator bool ( ) const
inlineexplicit

Same as defined().

◆ value()

template<typename T>
WrappedT tvm::TracedOptional< T >::value ( ) const
inline

Returns a non-optional traced wrapper, throws if defined() is false.


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