C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
exprtk::details::swap_string_node< T > Class Template Reference
Inheritance diagram for exprtk::details::swap_string_node< T >:
[legend]
Collaboration diagram for exprtk::details::swap_string_node< T >:
[legend]

Public Types

typedef range_interface< T >::range_t range_t
 
typedef range_trange_ptr
 
typedef range_interface< Tirange_t
 
typedef irange_tirange_ptr
 
typedef expression_node< T > * expression_ptr
 
typedef stringvar_node< T > * strvar_node_ptr
 
typedef string_base_node< T > * str_base_ptr
 
- Public Types inherited from exprtk::details::binary_node< T >
typedef expression_node< T > * expression_ptr
 
typedef std::pair< expression_ptr, boolbranch_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< Trange_data_type_t
 
- Public Types inherited from exprtk::details::range_interface< T >
typedef range_pack< Trange_t
 

Public Member Functions

 swap_string_node (expression_ptr branch0, expression_ptr branch1)
 
T 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
 
- Public Member Functions inherited from exprtk::details::binary_node< T >
 binary_node (const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
 
operator_type operation ()
 
expression_node< T > * branch (const std::size_t &index=0) 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 ()
 
- 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 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
 
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
 
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_
 
strvar_node_ptr str0_node_ptr_
 
strvar_node_ptr str1_node_ptr_
 

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>
class exprtk::details::swap_string_node< T >

Definition at line 10795 of file exprtk.hpp.

Member Typedef Documentation

◆ expression_ptr

Definition at line 10806 of file exprtk.hpp.

◆ irange_ptr

Definition at line 10805 of file exprtk.hpp.

◆ irange_t

Definition at line 10804 of file exprtk.hpp.

◆ range_ptr

Definition at line 10803 of file exprtk.hpp.

◆ range_t

Definition at line 10802 of file exprtk.hpp.

◆ str_base_ptr

Definition at line 10808 of file exprtk.hpp.

◆ strvar_node_ptr

Definition at line 10807 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ swap_string_node()

template<typename T >
exprtk::details::swap_string_node< T >::swap_string_node ( expression_ptr  branch0,
expression_ptr  branch1 
)
inline

Definition at line 10812 of file exprtk.hpp.

10814 , initialised_(false)
10815 , str0_node_ptr_(0)
10816 , str1_node_ptr_(0)
10817 {
10818 if (is_string_node(branch(0)))
10819 {
10820 str0_node_ptr_ = static_cast<strvar_node_ptr>(branch(0));
10821 }
10822
10823 if (is_string_node(branch(1)))
10824 {
10825 str1_node_ptr_ = static_cast<strvar_node_ptr>(branch(1));
10826 }
10827
10829 assert(valid());
10830 }
expression_node< T > * branch(const std::size_t &index=0) const
Definition exprtk.hpp:7118
stringvar_node< T > * strvar_node_ptr
Definition exprtk.hpp:10807
bool match_impl(const Iterator pattern_begin, const Iterator pattern_end, const Iterator data_begin, const Iterator data_end, const typename std::iterator_traits< Iterator >::value_type &zero_or_more, const typename std::iterator_traits< Iterator >::value_type &exactly_one)
Definition exprtk.hpp:605
bool is_string_node(const expression_node< T > *node)
Definition exprtk.hpp:19118

References exprtk::details::binary_node< T >::branch(), exprtk::details::swap_string_node< T >::initialised_, exprtk::details::is_string_node(), exprtk::details::match_impl(), exprtk::details::swap_string_node< T >::str0_node_ptr_, exprtk::details::swap_string_node< T >::str1_node_ptr_, and exprtk::details::swap_string_node< T >::valid().

Here is the call graph for this function:

Member Function Documentation

◆ base()

template<typename T >
char_cptr exprtk::details::swap_string_node< T >::base ( ) const
inlinevirtual

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

Definition at line 10847 of file exprtk.hpp.

10848 {
10849 return str0_node_ptr_->base();
10850 }

References exprtk::details::stringvar_node< T >::base(), and exprtk::details::swap_string_node< T >::str0_node_ptr_.

Here is the call graph for this function:

◆ range_ref() [1/2]

template<typename T >
range_t & exprtk::details::swap_string_node< T >::range_ref ( )
inlinevirtual

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

Definition at line 10857 of file exprtk.hpp.

10858 {
10859 return str0_node_ptr_->range_ref();
10860 }

References exprtk::details::stringvar_node< T >::range_ref(), and exprtk::details::swap_string_node< T >::str0_node_ptr_.

Here is the call graph for this function:

◆ range_ref() [2/2]

template<typename T >
const range_t & exprtk::details::swap_string_node< T >::range_ref ( ) const
inlinevirtual

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

Definition at line 10862 of file exprtk.hpp.

10863 {
10864 return str0_node_ptr_->range_ref();
10865 }

References exprtk::details::stringvar_node< T >::range_ref(), and exprtk::details::swap_string_node< T >::str0_node_ptr_.

Here is the call graph for this function:

◆ size()

template<typename T >
std::size_t exprtk::details::swap_string_node< T >::size ( ) const
inlinevirtual

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

Definition at line 10852 of file exprtk.hpp.

10853 {
10854 return str0_node_ptr_->size();
10855 }

References exprtk::details::stringvar_node< T >::size(), and exprtk::details::swap_string_node< T >::str0_node_ptr_.

Here is the call graph for this function:

◆ str()

template<typename T >
std::string exprtk::details::swap_string_node< T >::str ( ) const
inlinevirtual

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

Definition at line 10842 of file exprtk.hpp.

10843 {
10844 return str0_node_ptr_->str();
10845 }

References exprtk::details::stringvar_node< T >::str(), and exprtk::details::swap_string_node< T >::str0_node_ptr_.

Here is the call graph for this function:

◆ type()

template<typename T >
expression_node< T >::node_type exprtk::details::swap_string_node< T >::type ( ) const
inlinevirtual

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

Definition at line 10867 of file exprtk.hpp.

◆ valid()

template<typename T >
bool exprtk::details::swap_string_node< T >::valid ( ) const
inlinevirtual

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

Definition at line 10872 of file exprtk.hpp.

10873 {
10875 }

References exprtk::details::swap_string_node< T >::initialised_, and exprtk::details::binary_node< T >::valid().

Referenced by exprtk::details::swap_string_node< T >::swap_string_node().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value()

template<typename T >
T exprtk::details::swap_string_node< T >::value ( ) const
inlinevirtual

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

Definition at line 10832 of file exprtk.hpp.

10833 {
10834 branch(0)->value();
10835 branch(1)->value();
10836
10837 std::swap(str0_node_ptr_->ref(), str1_node_ptr_->ref());
10838
10839 return std::numeric_limits<T>::quiet_NaN();
10840 }

References exprtk::details::binary_node< T >::branch(), exprtk::details::stringvar_node< T >::ref(), exprtk::details::swap_string_node< T >::str0_node_ptr_, and exprtk::details::swap_string_node< T >::str1_node_ptr_.

Here is the call graph for this function:

Member Data Documentation

◆ initialised_

template<typename T >
bool exprtk::details::swap_string_node< T >::initialised_
private

◆ str0_node_ptr_

template<typename T >
strvar_node_ptr exprtk::details::swap_string_node< T >::str0_node_ptr_
private

◆ str1_node_ptr_

template<typename T >
strvar_node_ptr exprtk::details::swap_string_node< T >::str1_node_ptr_
private

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