KiCad PCB EDA Suite
Loading...
Searching...
No Matches
calc_parser::RESULT< T > Class Template Reference

#include <text_eval_types.h>

Public Member Functions

 RESULT (T aValue)
 
 RESULT (std::string aError)
 
bool HasValue () const
 
bool HasError () const
 
const T & GetValue () const
 
const std::string & GetError () const
 
 operator bool () const
 

Private Attributes

std::variant< T, std::string > m_data
 

Detailed Description

template<typename T>
class calc_parser::RESULT< T >

Definition at line 32 of file text_eval_types.h.

Constructor & Destructor Documentation

◆ RESULT() [1/2]

template<typename T>
calc_parser::RESULT< T >::RESULT ( T aValue)
inline

Definition at line 35 of file text_eval_types.h.

References m_data, move, and T.

◆ RESULT() [2/2]

template<typename T>
calc_parser::RESULT< T >::RESULT ( std::string aError)
inline

Definition at line 36 of file text_eval_types.h.

References m_data, and move.

Member Function Documentation

◆ GetError()

template<typename T>
const std::string & calc_parser::RESULT< T >::GetError ( ) const
inline

Definition at line 42 of file text_eval_types.h.

References m_data.

Referenced by calc_parser::EVAL_VISITOR::evaluateFunction().

◆ GetValue()

template<typename T>
const T & calc_parser::RESULT< T >::GetValue ( ) const
inline

Definition at line 41 of file text_eval_types.h.

References m_data, and T.

Referenced by calc_parser::EVAL_VISITOR::evaluateFunction(), and calc_parser::DOC_PROCESSOR::Process().

◆ HasError()

template<typename T>
bool calc_parser::RESULT< T >::HasError ( ) const
inline

Definition at line 39 of file text_eval_types.h.

References m_data.

◆ HasValue()

template<typename T>
bool calc_parser::RESULT< T >::HasValue ( ) const
inline

Definition at line 38 of file text_eval_types.h.

References m_data.

Referenced by operator bool().

◆ operator bool()

template<typename T>
calc_parser::RESULT< T >::operator bool ( ) const
inlineexplicit

Definition at line 44 of file text_eval_types.h.

References HasValue().

Member Data Documentation

◆ m_data

template<typename T>
std::variant<T, std::string> calc_parser::RESULT< T >::m_data
private

Definition at line 47 of file text_eval_types.h.

Referenced by GetError(), GetValue(), HasError(), HasValue(), RESULT(), and RESULT().


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