![]() |
CuteHMI - Modbus (CuteHMI.Modbus.4)
|
Data container. More...
#include <cutehmi/modbus/internal/DataContainer.hpp>
Classes | |
| class | KeysIterator |
| Keys iterator. More... | |
Public Types | |
| typedef T | value_type |
| typedef T & | reference |
| typedef const T & | const_reference |
| typedef T * | pointer |
| typedef const T * | const_pointer |
| typedef std::list< std::size_t > | KeysContainer |
Public Member Functions | |
| DataContainer () | |
| constexpr std::size_t | size () const noexcept |
| Get container size. More... | |
| const T * | at (std::size_t i) const |
| Get value at given index. More... | |
| T * | at (std::size_t i) |
| Get value at given index. More... | |
| T * | value (std::size_t i) |
| Get value at given index. More... | |
| void | insert (std::size_t i, T *value) |
| Insert value. More... | |
| void | clear () |
| Clear container. More... | |
| void | free () |
| Delete container contents. More... | |
| const KeysContainer & | keys () const |
| Get keys container. More... | |
Static Public Attributes | |
| static constexpr std::size_t | ADDRESS_SPACE = N |
Protected Member Functions | |
| QReadWriteLock & | lock () const |
| void | insertKey (std::size_t i) |
Protected Attributes | |
| InternalContainer | m_array |
| KeysContainer | m_keys |
| QReadWriteLock | m_lock |
Friends | |
| class | KeysIterator |
Data container.
| typedef const T* cutehmi::modbus::internal::DataContainer< T, N >::const_pointer |
| typedef const T& cutehmi::modbus::internal::DataContainer< T, N >::const_reference |
| typedef std::list<std::size_t> cutehmi::modbus::internal::DataContainer< T, N >::KeysContainer |
| typedef T* cutehmi::modbus::internal::DataContainer< T, N >::pointer |
| typedef T& cutehmi::modbus::internal::DataContainer< T, N >::reference |
| typedef T cutehmi::modbus::internal::DataContainer< T, N >::value_type |
| cutehmi::modbus::internal::DataContainer< T, N >::DataContainer |
| T * cutehmi::modbus::internal::DataContainer< T, N >::at | ( | std::size_t | i | ) |
Get value at given index.
| i | index. |
nullptr if value does not exist.| const T * cutehmi::modbus::internal::DataContainer< T, N >::at | ( | std::size_t | i | ) | const |
Get value at given index.
| i | index. |
nullptr if value does not exist.| void cutehmi::modbus::internal::DataContainer< T, N >::clear |
Clear container.
Sets all elements to nullptr. No deletion is performed.
| void cutehmi::modbus::internal::DataContainer< T, N >::free |
Delete container contents.
Function deletes all non-null elements and sets all elements to nullptr.
| void cutehmi::modbus::internal::DataContainer< T, N >::insert | ( | std::size_t | i, |
| T * | value | ||
| ) |
Insert value.
| i | index. |
| value | value to be inserted. |
|
protected |
| const DataContainer< T, N >::KeysContainer & cutehmi::modbus::internal::DataContainer< T, N >::keys |
Get keys container.
|
protected |
|
constexprnoexcept |
Get container size.
| T * cutehmi::modbus::internal::DataContainer< T, N >::value | ( | std::size_t | i | ) |
Get value at given index.
If value does not exist it will be default-constructed and inserted into the container.
| i | index. |
|
friend |
|
staticconstexpr |
|
protected |
|
protected |
|
mutableprotected |