C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
exprtk::details::str_vararg_node< T, VarArgFunction > Class Template Reference

#include <exprtk.hpp>

Inheritance diagram for exprtk::details::str_vararg_node< T, VarArgFunction >:
[legend]
Collaboration diagram for exprtk::details::str_vararg_node< T, VarArgFunction >:
[legend]

Public Types

typedef range_interface< T >::range_t range_t
typedef range_trange_ptr
typedef range_interface< T > irange_t
typedef irange_tirange_ptr
typedef expression_node< T > * expression_ptr
typedef string_base_node< T > * str_base_ptr
typedef std::pair< expression_ptr, bool > branch_t
Public Types inherited from exprtk::details::expression_node< T >
enum  node_type {
  e_none , e_null , e_constant , e_unary ,
  e_binary , e_binary_ext , e_trinary , e_quaternary ,
  e_vararg , e_conditional , e_while , e_repeat ,
  e_for , e_switch , e_mswitch , e_return ,
  e_retenv , e_variable , e_stringvar , e_stringconst ,
  e_stringvarrng , e_cstringvarrng , e_strgenrange , e_strconcat ,
  e_stringvarsize , e_strswap , e_stringsize , e_stringvararg ,
  e_function , e_vafunction , e_genfunction , e_strfunction ,
  e_strcondition , e_strccondition , e_add , e_sub ,
  e_mul , e_div , e_mod , e_pow ,
  e_lt , e_lte , e_gt , e_gte ,
  e_eq , e_ne , e_and , e_nand ,
  e_or , e_nor , e_xor , e_xnor ,
  e_in , e_like , e_ilike , e_inranges ,
  e_ipow , e_ipowinv , e_abs , e_acos ,
  e_acosh , e_asin , e_asinh , e_atan ,
  e_atanh , e_ceil , e_cos , e_cosh ,
  e_exp , e_expm1 , e_floor , e_log ,
  e_log10 , e_log2 , e_log1p , e_neg ,
  e_pos , e_round , e_sin , e_sinc ,
  e_sinh , e_sqrt , e_tan , e_tanh ,
  e_cot , e_sec , e_csc , e_r2d ,
  e_d2r , e_d2g , e_g2d , e_notl ,
  e_sgn , e_erf , e_erfc , e_ncdf ,
  e_frac , e_trunc , e_uvouv , e_vov ,
  e_cov , e_voc , e_vob , e_bov ,
  e_cob , e_boc , e_vovov , e_vovoc ,
  e_vocov , e_covov , e_covoc , e_vovovov ,
  e_vovovoc , e_vovocov , e_vocovov , e_covovov ,
  e_covocov , e_vocovoc , e_covovoc , e_vococov ,
  e_sf3ext , e_sf4ext , e_nulleq , e_strass ,
  e_vector , e_vecsize , e_vecelem , e_veccelem ,
  e_vecelemrtc , e_veccelemrtc , e_rbvecelem , e_rbvecelemrtc ,
  e_rbveccelem , e_rbveccelemrtc , e_vecinit , e_vecvalass ,
  e_vecvecass , e_vecopvalass , e_vecopvecass , e_vecfunc ,
  e_vecvecswap , e_vecvecineq , e_vecvalineq , e_valvecineq ,
  e_vecvecarith , e_vecvalarith , e_valvecarith , e_vecunaryop ,
  e_vecondition , e_break , e_continue , e_swap ,
  e_assert
}
typedef T value_type
typedef expression_node< T > * expression_ptr
typedef node_collector_interface< expression_node< T > > nci_t
typedef nci_t::noderef_list_t noderef_list_t
typedef node_depth_base< expression_node< T > > ndb_t
Public Types inherited from exprtk::details::node_collector_interface< expression_node< T > >
typedef expression_node< T > * node_ptr_t
typedef expression_node< T > ** node_pp_t
typedef std::vector< node_pp_tnoderef_list_t
Public Types inherited from exprtk::details::node_depth_base< expression_node< T > >
typedef expression_node< T > * node_ptr_t
typedef std::pair< node_ptr_t, bool > nb_pair_t
Public Types inherited from exprtk::details::string_base_node< T >
typedef range_data_type< T > range_data_type_t
Public Types inherited from exprtk::details::range_interface< T >
typedef range_pack< T > range_t

Public Member Functions

template<typename Allocator, template< typename, typename > class Sequence>
 str_vararg_node (const Sequence< expression_ptr, Allocator > &arg_list)
value () const
std::string str () const
char_cptr base () const
std::size_t size () const
range_trange_ref ()
const range_trange_ref () const
expression_node< T >::node_type type () const
bool valid () const
void collect_nodes (typename expression_node< T >::noderef_list_t &node_delete_list)
std::size_t node_depth () const
Public Member Functions inherited from exprtk::details::expression_node< T >
virtual ~expression_node ()
virtual expression_node< T > * branch (const std::size_t &index=0) const
Public Member Functions inherited from exprtk::details::node_collector_interface< expression_node< T > >
virtual ~node_collector_interface ()
virtual void collect_nodes (noderef_list_t &)
Public Member Functions inherited from exprtk::details::node_depth_base< expression_node< T > >
 node_depth_base ()
virtual ~node_depth_base ()
std::size_t compute_node_depth (const expression_node< T > *const &node) const
std::size_t compute_node_depth (const nb_pair_t &branch) const
std::size_t compute_node_depth (const nb_pair_t(&branch)[N]) const
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1) const
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2) const
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1) const
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2) const
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
std::size_t compute_node_depth (const Sequence< node_ptr_t, Allocator > &branch_list) const
std::size_t compute_node_depth (const Sequence< nb_pair_t, Allocator > &branch_list) const
void collect (node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
void collect (const nb_pair_t &branch, NodeSequence &delete_node_list) const
void collect (expression_node< T > *&node, NodeSequence &delete_node_list) const
void collect (const nb_pair_t(&branch)[N], NodeSequence &delete_node_list) const
void collect (const Sequence< nb_pair_t, Allocator > &branch, NodeSequence &delete_node_list) const
void collect (const Sequence< node_ptr_t, Allocator > &branch_list, NodeSequence &delete_node_list) const
void collect (const Sequence< node_ptr_t, AllocatorT > &branch_list, const Sequence< Boolean, AllocatorB > &branch_deletable_list, NodeSequence &delete_node_list) const
Public Member Functions inherited from exprtk::details::string_base_node< T >
virtual ~string_base_node ()
Public Member Functions inherited from exprtk::details::range_interface< T >
virtual ~range_interface ()

Private Attributes

bool initialised_
branch_t final_node_
str_base_ptr str_base_ptr_
irange_ptr str_range_ptr_
std::vector< branch_targ_list_

Additional Inherited Members

Public Attributes inherited from exprtk::details::node_depth_base< expression_node< T > >
bool depth_set
std::size_t depth

Detailed Description

template<typename T, typename VarArgFunction>
class exprtk::details::str_vararg_node< T, VarArgFunction >

Definition at line 11761 of file exprtk.hpp.

Member Typedef Documentation

◆ branch_t

template<typename T, typename VarArgFunction>
typedef std::pair<expression_ptr,bool> exprtk::details::str_vararg_node< T, VarArgFunction >::branch_t

Definition at line 11774 of file exprtk.hpp.

◆ expression_ptr

template<typename T, typename VarArgFunction>
typedef expression_node<T>* exprtk::details::str_vararg_node< T, VarArgFunction >::expression_ptr

Definition at line 11772 of file exprtk.hpp.

◆ irange_ptr

template<typename T, typename VarArgFunction>
typedef irange_t* exprtk::details::str_vararg_node< T, VarArgFunction >::irange_ptr

Definition at line 11771 of file exprtk.hpp.

◆ irange_t

template<typename T, typename VarArgFunction>
typedef range_interface<T> exprtk::details::str_vararg_node< T, VarArgFunction >::irange_t

Definition at line 11770 of file exprtk.hpp.

◆ range_ptr

template<typename T, typename VarArgFunction>
typedef range_t* exprtk::details::str_vararg_node< T, VarArgFunction >::range_ptr

Definition at line 11769 of file exprtk.hpp.

◆ range_t

template<typename T, typename VarArgFunction>
typedef range_interface<T>::range_t exprtk::details::str_vararg_node< T, VarArgFunction >::range_t

Definition at line 11768 of file exprtk.hpp.

◆ str_base_ptr

template<typename T, typename VarArgFunction>
typedef string_base_node<T>* exprtk::details::str_vararg_node< T, VarArgFunction >::str_base_ptr

Definition at line 11773 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ str_vararg_node()

template<typename T, typename VarArgFunction>
template<typename Allocator, template< typename, typename > class Sequence>
exprtk::details::str_vararg_node< T, VarArgFunction >::str_vararg_node ( const Sequence< expression_ptr, Allocator > & arg_list)
inlineexplicit

Definition at line 11778 of file exprtk.hpp.

11779 : initialised_(false)
11780 , str_base_ptr_ (0)
11781 , str_range_ptr_(0)
11782 {
11784
11785 if (0 == final_node_.first)
11786 return;
11787 else if (!is_generally_string_node(final_node_.first))
11788 return;
11789
11790 str_base_ptr_ = dynamic_cast<str_base_ptr>(final_node_.first);
11791
11792 if (0 == str_base_ptr_)
11793 return;
11794
11795 str_range_ptr_ = dynamic_cast<irange_ptr>(final_node_.first);
11796
11797 if (0 == str_range_ptr_)
11798 return;
11799
11800 if (arg_list.size() > 1)
11801 {
11802 const std::size_t arg_list_size = arg_list.size() - 1;
11803
11804 arg_list_.resize(arg_list_size);
11805
11806 for (std::size_t i = 0; i < arg_list_size; ++i)
11807 {
11808 if (arg_list[i] && arg_list[i]->valid())
11809 {
11811 }
11812 else
11813 {
11814 arg_list_.clear();
11815 return;
11816 }
11817 }
11818
11819 initialised_ = true;
11820 }
11821
11823 assert(valid());
11824 }
std::vector< branch_t > arg_list_
Definition exprtk.hpp:11894
string_base_node< T > * str_base_ptr
Definition exprtk.hpp:11773
expression_node< T > * expression_ptr
Definition exprtk.hpp:11772
void construct_branch_pair(std::pair< expression_node< T > *, bool >(&branch)[N], expression_node< T > *b, const std::size_t &index)
Definition exprtk.hpp:6799
bool is_generally_string_node(const expression_node< T > *node)
Definition exprtk.hpp:19264

References arg_list_, exprtk::details::construct_branch_pair(), final_node_, initialised_, exprtk::details::is_generally_string_node(), str_base_ptr_, str_range_ptr_, and valid().

Here is the call graph for this function:

Member Function Documentation

◆ base()

template<typename T, typename VarArgFunction>
char_cptr exprtk::details::str_vararg_node< T, VarArgFunction >::base ( ) const
inlinevirtual

Implements exprtk::details::string_base_node< T >.

Definition at line 11843 of file exprtk.hpp.

11844 {
11845 return str_base_ptr_->base();
11846 }

References exprtk_override, and str_base_ptr_.

◆ collect_nodes()

template<typename T, typename VarArgFunction>
void exprtk::details::str_vararg_node< T, VarArgFunction >::collect_nodes ( typename expression_node< T >::noderef_list_t & node_delete_list)
inline

Definition at line 11875 of file exprtk.hpp.

11876 {
11879 }
void collect(node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
Definition exprtk.hpp:6358

References arg_list_, exprtk::details::node_depth_base< expression_node< T > >::collect(), exprtk_override, and final_node_.

Here is the call graph for this function:

◆ node_depth()

template<typename T, typename VarArgFunction>
std::size_t exprtk::details::str_vararg_node< T, VarArgFunction >::node_depth ( ) const
inlinevirtual

Reimplemented from exprtk::details::node_depth_base< expression_node< T > >.

Definition at line 11881 of file exprtk.hpp.

References arg_list_, exprtk::details::node_depth_base< expression_node< T > >::compute_node_depth(), exprtk_override, and final_node_.

Here is the call graph for this function:

◆ range_ref() [1/2]

template<typename T, typename VarArgFunction>
range_t & exprtk::details::str_vararg_node< T, VarArgFunction >::range_ref ( )
inlinevirtual

Implements exprtk::details::range_interface< T >.

Definition at line 11853 of file exprtk.hpp.

11854 {
11855 return str_range_ptr_->range_ref();
11856 }

References exprtk_override, and str_range_ptr_.

◆ range_ref() [2/2]

template<typename T, typename VarArgFunction>
const range_t & exprtk::details::str_vararg_node< T, VarArgFunction >::range_ref ( ) const
inlinevirtual

Implements exprtk::details::range_interface< T >.

Definition at line 11858 of file exprtk.hpp.

11859 {
11860 return str_range_ptr_->range_ref();
11861 }

References exprtk_override, and str_range_ptr_.

◆ size()

template<typename T, typename VarArgFunction>
std::size_t exprtk::details::str_vararg_node< T, VarArgFunction >::size ( ) const
inlinevirtual

Implements exprtk::details::string_base_node< T >.

Definition at line 11848 of file exprtk.hpp.

11849 {
11850 return str_base_ptr_->size();
11851 }

References exprtk_override, and str_base_ptr_.

◆ str()

template<typename T, typename VarArgFunction>
std::string exprtk::details::str_vararg_node< T, VarArgFunction >::str ( ) const
inlinevirtual

Implements exprtk::details::string_base_node< T >.

Definition at line 11838 of file exprtk.hpp.

11839 {
11840 return str_base_ptr_->str();
11841 }

References exprtk_override, and str_base_ptr_.

◆ type()

template<typename T, typename VarArgFunction>
expression_node< T >::node_type exprtk::details::str_vararg_node< T, VarArgFunction >::type ( ) const
inlinevirtual

◆ valid()

template<typename T, typename VarArgFunction>
bool exprtk::details::str_vararg_node< T, VarArgFunction >::valid ( ) const
inlinevirtual

Reimplemented from exprtk::details::expression_node< T >.

Definition at line 11868 of file exprtk.hpp.

11869 {
11870 return
11871 initialised_ &&
11872 final_node_.first && final_node_.first->valid();
11873 }

References exprtk_override, final_node_, and initialised_.

Referenced by str_vararg_node().

Here is the caller graph for this function:

◆ value()

template<typename T, typename VarArgFunction>
T exprtk::details::str_vararg_node< T, VarArgFunction >::value ( ) const
inlinevirtual

Reimplemented from exprtk::details::expression_node< T >.

Definition at line 11826 of file exprtk.hpp.

11827 {
11828 if (!arg_list_.empty())
11829 {
11831 }
11832
11833 final_node_.first->value();
11834
11836 }

References arg_list_, exprtk_override, and final_node_.

Member Data Documentation

◆ arg_list_

template<typename T, typename VarArgFunction>
std::vector<branch_t> exprtk::details::str_vararg_node< T, VarArgFunction >::arg_list_
private

Definition at line 11894 of file exprtk.hpp.

Referenced by collect_nodes(), node_depth(), str_vararg_node(), and value().

◆ final_node_

template<typename T, typename VarArgFunction>
branch_t exprtk::details::str_vararg_node< T, VarArgFunction >::final_node_
private

Definition at line 11891 of file exprtk.hpp.

Referenced by collect_nodes(), node_depth(), str_vararg_node(), valid(), and value().

◆ initialised_

template<typename T, typename VarArgFunction>
bool exprtk::details::str_vararg_node< T, VarArgFunction >::initialised_
private

Definition at line 11890 of file exprtk.hpp.

Referenced by str_vararg_node(), and valid().

◆ str_base_ptr_

template<typename T, typename VarArgFunction>
str_base_ptr exprtk::details::str_vararg_node< T, VarArgFunction >::str_base_ptr_
private

Definition at line 11892 of file exprtk.hpp.

Referenced by base(), size(), str(), and str_vararg_node().

◆ str_range_ptr_

template<typename T, typename VarArgFunction>
irange_ptr exprtk::details::str_vararg_node< T, VarArgFunction >::str_range_ptr_
private

Definition at line 11893 of file exprtk.hpp.

Referenced by range_ref(), range_ref(), and str_vararg_node().


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