PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
plask::LazyDataDelegateImpl< T > Struct Template Reference

Call functor to get data. More...

`#include <plask/lazydata.hpp>`

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

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

## Protected Attributes
std::size_t | siz
std::function< T(std::size_t)> | func

## Additional Inherited Members
Public Types inherited from plask::LazyDataImpl< T >
typedef T | CellType

## Detailed Description

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

Call functor to get data.

Definition at line 123 of file lazydata.hpp.

## Constructor & Destructor Documentation

## ◆ LazyDataDelegateImpl()

template<typename T >

plask::LazyDataDelegateImpl< T >::LazyDataDelegateImpl | ( | std::size_t | size,
|  | std::function< T(std::size_t)> | func
| ) |  |
| inline

Definition at line 130 of file lazydata.hpp.

## Member Function Documentation

## ◆ at()

template<typename T >

T plask::LazyDataDelegateImpl< T >::at | ( | std::size_t | index | ) | const
| inline override virtual

Get index-th value from vector.

Parameters

  index | should be a value from 0 to size()-1

Returns
  index-th value from vector

Implements plask::LazyDataImpl< T >.

Definition at line 132 of file lazydata.hpp.

## ◆ size()

template<typename T >

std::size_t plask::LazyDataDelegateImpl< T >::size | ( |  | ) | const
| inline override virtual

Get the number of elements in this vector.

Returns
  the number of elements in this vector

Implements plask::LazyDataImpl< T >.

Definition at line 134 of file lazydata.hpp.

## Member Data Documentation

## ◆ func

template<typename T >

std::function<T(std::size_t)> plask::LazyDataDelegateImpl< T >::func
| protected

Definition at line 127 of file lazydata.hpp.

## ◆ siz

template<typename T >

std::size_t plask::LazyDataDelegateImpl< T >::siz
| protected

Definition at line 126 of file lazydata.hpp.

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

- plask/lazydata.hpp