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 5171 of file exprtk.hpp.

Member Typedef Documentation

◆ data_t

Definition at line 5176 of file exprtk.hpp.

◆ type

Definition at line 5175 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 5263 of file exprtk.hpp.

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

◆ 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 5267 of file exprtk.hpp.

5268 : control_block_(control_block::create(size,reinterpret_cast<data_t>(0),true))
5269 {}
std::size_t size() const
Definition exprtk.hpp:5317

◆ 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 5271 of file exprtk.hpp.

5273 {}
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:598

◆ 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 5281 of file exprtk.hpp.

5282 {
5284 }
static void destroy(control_block *&cntrl_blck)
Definition exprtk.hpp:5226

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 5327 of file exprtk.hpp.

5328 {
5329 #ifdef exprtk_enable_debugging
5330 exprtk_debug(("size: %d\taddress:%p\tdestruct:%c\n",
5331 size(),
5332 data(),
5333 (control_block_->destruct ? 'T' : 'F')));
5334
5335 for (std::size_t i = 0; i < size(); ++i)
5336 {
5337 if (5 == i)
5338 exprtk_debug(("\n"));
5339
5340 exprtk_debug(("%15.10f ", data()[i]));
5341 }
5342 exprtk_debug(("\n"));
5343 #endif
5344 }
#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 5346 of file exprtk.hpp.

5347 {
5348 const std::size_t size = min_size(vds0.control_block_,vds1.control_block_);
5349 vds0.control_block_->size = size;
5350 vds1.control_block_->size = size;
5351 }
static std::size_t min_size(const control_block *cb0, const control_block *cb1)
Definition exprtk.hpp:5355

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 5355 of file exprtk.hpp.

5356 {
5357 const std::size_t size0 = cb0->size;
5358 const std::size_t size1 = cb1->size;
5359
5360 if (size0 && size1)
5361 return std::min(size0,size1);
5362 else
5363 return (size0) ? size0 : size1;
5364 }

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 5286 of file exprtk.hpp.

5287 {
5288 if (this != &vds)
5289 {
5290 const std::size_t final_size = min_size(control_block_, vds.control_block_);
5291
5292 vds.control_block_->size = final_size;
5294
5296 {
5298
5299 control_block_ = vds.control_block_;
5301 }
5302 }
5303
5304 return (*this);
5305 }

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 5322 of file exprtk.hpp.

5323 {
5324 return control_block_->data;
5325 }

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: