PLaSK library
Loading...
Searching...
No Matches
plask::ConstValueLazyDataImpl< T > Struct Template Reference

Lazy data vector of consts. More...

#include <plask/lazydata.hpp>

Inheritance diagram for plask::ConstValueLazyDataImpl< T >:
[legend]
Collaboration diagram for plask::ConstValueLazyDataImpl< T >:
[legend]

Public Member Functions

 ConstValueLazyDataImpl (std::size_t size, const T &value)
 
at (std::size_t) const override
 Get index-th value from vector.
 
std::size_t size () const override
 Get the number of elements in this vector.
 
DataVector< const T > getAll () const override
 Get all values as non-lazy vector.
 
- Public Member Functions inherited from plask::LazyDataImpl< T >
virtual ~LazyDataImpl ()
 
virtual DataVector< T > claim () const
 

Public Attributes

value_
 
std::size_t size_
 

Additional Inherited Members

- Public Types inherited from plask::LazyDataImpl< T >
typedefCellType
 

Detailed Description

template<typename T>
struct plask::ConstValueLazyDataImpl< T >

Lazy data vector of consts.

Definition at line 83 of file lazydata.hpp.

Constructor & Destructor Documentation

◆ ConstValueLazyDataImpl()

template<typename T >
plask::ConstValueLazyDataImpl< T >::ConstValueLazyDataImpl ( std::size_t  size,
const T &  value 
)
inline

Definition at line 88 of file lazydata.hpp.

Member Function Documentation

◆ at()

template<typename T >
T plask::ConstValueLazyDataImpl< T >::at ( std::size_t  index) const
inlineoverridevirtual

Get index-th value from vector.

Parameters
indexshould be a value from 0 to size()-1
Returns
index-th value from vector

Implements plask::LazyDataImpl< T >.

Definition at line 90 of file lazydata.hpp.

◆ getAll()

template<typename T >
DataVector< const T > plask::ConstValueLazyDataImpl< T >::getAll ( ) const
inlineoverridevirtual

Get all values as non-lazy vector.

Returns
non-lazy representation of this

Reimplemented from plask::LazyDataImpl< T >.

Definition at line 94 of file lazydata.hpp.

◆ size()

template<typename T >
std::size_t plask::ConstValueLazyDataImpl< T >::size ( ) const
inlineoverridevirtual

Get the number of elements in this vector.

Returns
the number of elements in this vector

Implements plask::LazyDataImpl< T >.

Definition at line 92 of file lazydata.hpp.

Member Data Documentation

◆ size_

template<typename T >
std::size_t plask::ConstValueLazyDataImpl< T >::size_

Definition at line 86 of file lazydata.hpp.

◆ value_

template<typename T >
T plask::ConstValueLazyDataImpl< T >::value_

Definition at line 85 of file lazydata.hpp.


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