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

Classes

struct  control_block
 

Public Types

typedef vec_data_store< Ttype
 
typedef Tdata_t
 

Public Member Functions

 vec_data_store ()
 
 vec_data_store (const std::size_t &size)
 
 vec_data_store (const std::size_t &size, data_t data, bool dstrct=false)
 
 vec_data_store (const type &vds)
 
 ~vec_data_store ()
 
typeoperator= (const type &vds)
 
data_t data ()
 
data_t data () const
 
std::size_t size () const
 
data_tref ()
 
void dump () const
 

Static Public Member Functions

static void match_sizes (type &vds0, type &vds1)
 

Static Private Member Functions

static std::size_t min_size (const control_block *cb0, const control_block *cb1)
 

Private Attributes

control_blockcontrol_block_
 

Detailed Description

template<typename T>
class exprtk::details::vec_data_store< T >

Definition at line 5298 of file exprtk.hpp.

Member Typedef Documentation

◆ data_t

Definition at line 5303 of file exprtk.hpp.

◆ type

Definition at line 5302 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ vec_data_store() [1/4]

template<typename T >
exprtk::details::vec_data_store< T >::vec_data_store ( )
inline

Definition at line 5390 of file exprtk.hpp.

5392 {}
static control_block * create(const std::size_t &dsize, data_t data_ptr=data_t(0), bool dstrct=false)
Definition exprtk.hpp:5340

◆ vec_data_store() [2/4]

template<typename T >
exprtk::details::vec_data_store< T >::vec_data_store ( const std::size_t &  size)
inlineexplicit

Definition at line 5394 of file exprtk.hpp.

5395 : control_block_(control_block::create(size,reinterpret_cast<data_t>(0),true))
5396 {}
std::size_t size() const
Definition exprtk.hpp:5444

◆ vec_data_store() [3/4]

template<typename T >
exprtk::details::vec_data_store< T >::vec_data_store ( const std::size_t &  size,
data_t  data,
bool  dstrct = false 
)
inline

Definition at line 5398 of file exprtk.hpp.

5400 {}
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

◆ vec_data_store() [4/4]

template<typename T >
exprtk::details::vec_data_store< T >::vec_data_store ( const type vds)
inline

◆ ~vec_data_store()

Definition at line 5408 of file exprtk.hpp.

5409 {
5411 }
static void destroy(control_block *&cntrl_blck)
Definition exprtk.hpp:5353

References exprtk::details::vec_data_store< T >::control_block_, and exprtk::details::vec_data_store< T >::control_block::destroy().

Here is the call graph for this function:

Member Function Documentation

◆ data() [1/2]

template<typename T >
data_t exprtk::details::vec_data_store< T >::data ( )
inline

◆ data() [2/2]

template<typename T >
data_t exprtk::details::vec_data_store< T >::data ( ) const
inline

◆ dump()

template<typename T >
void exprtk::details::vec_data_store< T >::dump ( ) const
inline

Definition at line 5454 of file exprtk.hpp.

5455 {
5456 #ifdef exprtk_enable_debugging
5457 exprtk_debug(("size: %d\taddress:%p\tdestruct:%c\n",
5458 size(),
5459 data(),
5460 (control_block_->destruct ? 'T' : 'F')));
5461
5462 for (std::size_t i = 0; i < size(); ++i)
5463 {
5464 if (5 == i)
5465 exprtk_debug(("\n"));
5466
5467 exprtk_debug(("%15.10f ", data()[i]));
5468 }
5469 exprtk_debug(("\n"));
5470 #endif
5471 }
#define exprtk_debug(params)
Definition exprtk.hpp:64

References exprtk::details::vec_data_store< T >::control_block_, exprtk::details::vec_data_store< T >::data(), exprtk::details::vec_data_store< T >::control_block::destruct, exprtk_debug, exprtk::details::match_impl(), and exprtk::details::vec_data_store< T >::size().

Here is the call graph for this function:

◆ match_sizes()

template<typename T >
static void exprtk::details::vec_data_store< T >::match_sizes ( type vds0,
type vds1 
)
inlinestatic

Definition at line 5473 of file exprtk.hpp.

5474 {
5475 const std::size_t size = min_size(vds0.control_block_,vds1.control_block_);
5476 vds0.control_block_->size = size;
5477 vds1.control_block_->size = size;
5478 }
static std::size_t min_size(const control_block *cb0, const control_block *cb1)
Definition exprtk.hpp:5482

References exprtk::details::match_impl(), exprtk::details::vec_data_store< T >::min_size(), and exprtk::details::vec_data_store< T >::size().

Referenced by exprtk::details::assignment_vecvec_node< T >::assignment_vecvec_node(), and exprtk::details::assignment_vecvec_op_node< T, Operation >::assignment_vecvec_op_node().

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

◆ min_size()

template<typename T >
static std::size_t exprtk::details::vec_data_store< T >::min_size ( const control_block cb0,
const control_block cb1 
)
inlinestaticprivate

Definition at line 5482 of file exprtk.hpp.

5483 {
5484 const std::size_t size0 = cb0->size;
5485 const std::size_t size1 = cb1->size;
5486
5487 if (size0 && size1)
5488 return std::min(size0,size1);
5489 else
5490 return (size0) ? size0 : size1;
5491 }

References exprtk::details::match_impl().

Referenced by exprtk::details::vec_data_store< T >::match_sizes(), and exprtk::details::vec_data_store< T >::operator=().

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

◆ operator=()

template<typename T >
type & exprtk::details::vec_data_store< T >::operator= ( const type vds)
inline

Definition at line 5413 of file exprtk.hpp.

5414 {
5415 if (this != &vds)
5416 {
5417 const std::size_t final_size = min_size(control_block_, vds.control_block_);
5418
5419 vds.control_block_->size = final_size;
5421
5423 {
5425
5426 control_block_ = vds.control_block_;
5428 }
5429 }
5430
5431 return (*this);
5432 }

References exprtk::details::vec_data_store< T >::control_block_, exprtk::details::vec_data_store< T >::control_block::data, exprtk::details::vec_data_store< T >::control_block::destroy(), exprtk::details::vec_data_store< T >::control_block::destruct, exprtk::details::match_impl(), exprtk::details::vec_data_store< T >::min_size(), exprtk::details::vec_data_store< T >::control_block::ref_count, and exprtk::details::vec_data_store< T >::control_block::size.

Here is the call graph for this function:

◆ ref()

template<typename T >
data_t & exprtk::details::vec_data_store< T >::ref ( )
inline

Definition at line 5449 of file exprtk.hpp.

5450 {
5451 return control_block_->data;
5452 }

References exprtk::details::vec_data_store< T >::control_block_, and exprtk::details::vec_data_store< T >::control_block::data.

Referenced by exprtk::details::vector_node< T >::vector_node(), and exprtk::details::vector_node< T >::~vector_node().

Here is the caller graph for this function:

◆ size()

template<typename T >
std::size_t exprtk::details::vec_data_store< T >::size ( ) const
inline

Member Data Documentation

◆ control_block_

template<typename T >
control_block* exprtk::details::vec_data_store< T >::control_block_
private

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