C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
exprtk::lexer::helper::numeric_checker< T > Class Template Reference

#include <exprtk.hpp>

Inheritance diagram for exprtk::lexer::helper::numeric_checker< T >:
[legend]
Collaboration diagram for exprtk::lexer::helper::numeric_checker< T >:
[legend]

Public Member Functions

 numeric_checker ()
bool result ()
void reset ()
bool operator() (const lexer::token &t)
std::size_t error_count () const
std::size_t error_index (const std::size_t &i) const
void clear_errors ()
virtual bool operator() (const token &, const token &)
virtual bool operator() (const token &, const token &, const token &)
virtual bool operator() (const token &, const token &, const token &, const token &)
Public Member Functions inherited from exprtk::lexer::token_scanner
virtual ~token_scanner ()
 token_scanner (const std::size_t &stride)
std::size_t process (generator &g)
Public Member Functions inherited from exprtk::lexer::helper_interface
virtual void init ()
virtual ~helper_interface ()

Private Attributes

std::size_t current_index_
std::vector< std::size_t > error_list_

Detailed Description

template<typename T>
class exprtk::lexer::helper::numeric_checker< T >

Definition at line 3865 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ numeric_checker()

template<typename T>
exprtk::lexer::helper::numeric_checker< T >::numeric_checker ( )
inline

Definition at line 3871 of file exprtk.hpp.

3872 : token_scanner (1)
3873 , current_index_(0)
3874 {}
token_scanner(const std::size_t &stride)
Definition exprtk.hpp:3181

References current_index_, and exprtk::lexer::token_scanner::token_scanner().

Here is the call graph for this function:

Member Function Documentation

◆ clear_errors()

template<typename T>
void exprtk::lexer::helper::numeric_checker< T >::clear_errors ( )
inline

Definition at line 3917 of file exprtk.hpp.

3918 {
3919 error_list_.clear();
3920 }
std::vector< std::size_t > error_list_
Definition exprtk.hpp:3925

References error_list_.

Referenced by exprtk::parser< Type >::run_assemblies().

Here is the caller graph for this function:

◆ error_count()

template<typename T>
std::size_t exprtk::lexer::helper::numeric_checker< T >::error_count ( ) const
inline

Definition at line 3904 of file exprtk.hpp.

3905 {
3906 return error_list_.size();
3907 }

References error_list_.

Referenced by exprtk::parser< Type >::run_assemblies().

Here is the caller graph for this function:

◆ error_index()

template<typename T>
std::size_t exprtk::lexer::helper::numeric_checker< T >::error_index ( const std::size_t & i) const
inline

Definition at line 3909 of file exprtk.hpp.

3910 {
3911 if (i < error_list_.size())
3912 return error_list_[i];
3913 else
3915 }

References error_list_.

Referenced by exprtk::parser< Type >::run_assemblies().

Here is the caller graph for this function:

◆ operator()() [1/4]

template<typename T>
bool exprtk::lexer::helper::numeric_checker< T >::operator() ( const lexer::token & t)
inlinevirtual

Reimplemented from exprtk::lexer::token_scanner.

Definition at line 3887 of file exprtk.hpp.

3888 {
3889 if (token::e_number == t.type)
3890 {
3891 T v;
3892
3894 {
3895 error_list_.push_back(current_index_);
3896 }
3897 }
3898
3900
3901 return true;
3902 }

References current_index_, exprtk::lexer::token::e_number, error_list_, exprtk_override, and exprtk::details::string_to_real().

Here is the call graph for this function:

◆ operator()() [2/4]

template<typename T>
virtual bool exprtk::lexer::token_scanner::operator() ( const token & ,
const token &  )
inlinevirtual

Reimplemented from exprtk::lexer::token_scanner.

Definition at line 3263 of file exprtk.hpp.

3264 {
3265 return false;
3266 }

◆ operator()() [3/4]

template<typename T>
virtual bool exprtk::lexer::token_scanner::operator() ( const token & ,
const token & ,
const token &  )
inlinevirtual

Reimplemented from exprtk::lexer::token_scanner.

Definition at line 3268 of file exprtk.hpp.

3269 {
3270 return false;
3271 }

◆ operator()() [4/4]

template<typename T>
virtual bool exprtk::lexer::token_scanner::operator() ( const token & ,
const token & ,
const token & ,
const token &  )
inlinevirtual

Reimplemented from exprtk::lexer::token_scanner.

Definition at line 3273 of file exprtk.hpp.

3274 {
3275 return false;
3276 }

◆ reset()

template<typename T>
void exprtk::lexer::helper::numeric_checker< T >::reset ( )
inlinevirtual

Reimplemented from exprtk::lexer::helper_interface.

Definition at line 3881 of file exprtk.hpp.

3882 {
3883 error_list_.clear();
3884 current_index_ = 0;
3885 }

References current_index_, error_list_, and exprtk_override.

◆ result()

template<typename T>
bool exprtk::lexer::helper::numeric_checker< T >::result ( )
inlinevirtual

Reimplemented from exprtk::lexer::helper_interface.

Definition at line 3876 of file exprtk.hpp.

3877 {
3878 return error_list_.empty();
3879 }

References error_list_, and exprtk_override.

Member Data Documentation

◆ current_index_

template<typename T>
std::size_t exprtk::lexer::helper::numeric_checker< T >::current_index_
private

Definition at line 3924 of file exprtk.hpp.

Referenced by numeric_checker(), operator()(), and reset().

◆ error_list_

template<typename T>
std::vector<std::size_t> exprtk::lexer::helper::numeric_checker< T >::error_list_
private

Definition at line 3925 of file exprtk.hpp.

Referenced by clear_errors(), error_count(), error_index(), operator()(), reset(), and result().


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