C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
exprtk::symbol_table< T >::control_block Struct Reference

#include <exprtk.hpp>

Collaboration diagram for exprtk::symbol_table< T >::control_block:
[legend]

Classes

struct  st_data

Public Member Functions

 control_block ()
 control_block (st_data *data)
 ~control_block ()
void set_mutability (const symtab_mutability_type mutability)

Static Public Member Functions

static control_block * create ()
template<typename SymTab>
static void destroy (control_block *&cntrl_blck, SymTab *sym_tab)

Public Attributes

std::size_t ref_count
st_data * data_
symtab_mutability_type mutability_

Detailed Description

template<typename T>
struct exprtk::symbol_table< T >::control_block

Definition at line 20696 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ control_block() [1/2]

template<typename T>
exprtk::symbol_table< T >::control_block::control_block ( )
inline

Definition at line 20754 of file exprtk.hpp.

References create(), data_, exprtk::symbol_table< T >::e_mutable, mutability_, and ref_count.

Referenced by create(), and destroy().

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

◆ control_block() [2/2]

template<typename T>
exprtk::symbol_table< T >::control_block::control_block ( st_data * data)
inlineexplicit

Definition at line 20760 of file exprtk.hpp.

20761 : ref_count(1)
20762 , data_(data)
20764 {}

References data_, exprtk::symbol_table< T >::e_mutable, mutability_, and ref_count.

◆ ~control_block()

template<typename T>
exprtk::symbol_table< T >::control_block::~control_block ( )
inline

Definition at line 20766 of file exprtk.hpp.

20767 {
20768 if (data_ && (0 == ref_count))
20769 {
20771 }
20772 }

References data_, exprtk::symbol_table< T >::control_block::st_data::destroy(), and ref_count.

Here is the call graph for this function:

Member Function Documentation

◆ create()

template<typename T>
control_block * exprtk::symbol_table< T >::control_block::create ( )
inlinestatic

Definition at line 20774 of file exprtk.hpp.

20775 {
20776 return (new control_block);
20777 }

References control_block().

Referenced by control_block().

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

◆ destroy()

template<typename T>
template<typename SymTab>
void exprtk::symbol_table< T >::control_block::destroy ( control_block *& cntrl_blck,
SymTab * sym_tab )
inlinestatic

Definition at line 20780 of file exprtk.hpp.

20781 {
20782 if (cntrl_blck)
20783 {
20784 if (
20785 (0 != cntrl_blck->ref_count) &&
20786 (0 == --cntrl_blck->ref_count)
20787 )
20788 {
20789 if (sym_tab)
20790 sym_tab->clear();
20791
20792 delete cntrl_blck;
20793 }
20794
20795 cntrl_blck = 0;
20796 }
20797 }

References control_block(), and ref_count.

Referenced by exprtk::symbol_table< T >::operator=(), and exprtk::symbol_table< T >::~symbol_table().

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

◆ set_mutability()

template<typename T>
void exprtk::symbol_table< T >::control_block::set_mutability ( const symtab_mutability_type mutability)
inline

Definition at line 20799 of file exprtk.hpp.

20800 {
20802 }

References exprtk::symbol_table< T >::mutability(), and mutability_.

Here is the call graph for this function:

Member Data Documentation

◆ data_

template<typename T>
st_data* exprtk::symbol_table< T >::control_block::data_

Definition at line 20805 of file exprtk.hpp.

Referenced by control_block(), control_block(), and ~control_block().

◆ mutability_

template<typename T>
symtab_mutability_type exprtk::symbol_table< T >::control_block::mutability_

Definition at line 20806 of file exprtk.hpp.

Referenced by control_block(), control_block(), and set_mutability().

◆ ref_count

template<typename T>
std::size_t exprtk::symbol_table< T >::control_block::ref_count

Definition at line 20804 of file exprtk.hpp.

Referenced by control_block(), control_block(), destroy(), and ~control_block().


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