A class which wraps a block of data and marks whether or not it is valid. More...
#include <uhal/ValMem.hpp>
Public Types | |
| typedef std::vector< T >::iterator | iterator |
| typedef iterator to be that of the underlying storage type More... | |
| typedef std::vector< T >::const_iterator | const_iterator |
| typedef iterator to be that of the underlying storage type More... | |
| typedef std::vector< T >::reverse_iterator | reverse_iterator |
| typedef iterator to be that of the underlying storage type More... | |
| typedef std::vector< T >::const_reverse_iterator | const_reverse_iterator |
| typedef iterator to be that of the underlying storage type More... | |
Public Member Functions | |
| ValVector (const std::vector< T > &aValues) | |
| Constructor. More... | |
| ValVector (const ValVector &aValues) | |
| Copy Constructor. More... | |
| ValVector (const uint32_t &aSize) | |
| Constructor. More... | |
| ValVector () | |
| Default constructor. More... | |
| bool | valid () |
| Return whether the Validated memory is marked as valid. More... | |
| void | valid (bool aValid) |
| Change the validatity state of the Validated memory. More... | |
| template<class InputIterator > | |
| void | assign (InputIterator aBegin, InputIterator aEnd) |
| Assignment operator - including check on whether the data has previously been marked as valid. More... | |
| void | push_back (const T &aValue) |
| If the memory has not previously been marked as valid, add an entry to the end of it. More... | |
| const T & | operator[] (std::size_t aIndex) const |
| If the memory has previously been marked as valid, give random access into memory. More... | |
| const T & | at (std::size_t aIndex) const |
| If the memory has previously been marked as valid, give random access into memory. More... | |
| std::size_t | size () const |
| Return the size of the underlying memory. More... | |
| const T * | data () const |
| Return the address of the underlying memory. More... | |
| void | clear () |
| Clear the underlying memory and set Validity to false. More... | |
| const_iterator | begin () const |
| If the memory has previously been marked as valid, return a const iterator to the beginning of the underlying memory. More... | |
| const_iterator | end () const |
| If the memory has previously been marked as valid, return a const iterator to the end (one past last entry) of the underlying memory. More... | |
| const_reverse_iterator | rbegin () const |
| If the memory has previously been marked as valid, return a const reverse iterator to the reverse beginning (the last entry) of the underlying memory. More... | |
| const_reverse_iterator | rend () const |
| If the memory has previously been marked as valid, return a const reverse iterator to the reverse end (one before the zero'th entry) of the underlying memory. More... | |
| std::vector< T > | value () const |
| Return the value of the validated memory with check on validity. More... | |
| void | value (const std::vector< T > &aValue) |
| If the memory has not previously been marked as valid, set the value. More... | |
Private Attributes | |
| std::shared_ptr< _ValVector_< T > > | mMembers |
| A shared pointer to a ValVector struct, so that every copy of this ValVector points to the same underlying memory. More... | |
Friends | |
| class | ClientInterface |
| Make ClientInterface a friend so that it can access the members to get the info associated with the raw data space. More... | |
| class | ValHeader |
| Make the ValHeader class a friend so we can downcast the members. More... | |
A class which wraps a block of data and marks whether or not it is valid.
Definition at line 272 of file ValMem.hpp.
| typedef std::vector<T>::const_iterator uhal::ValVector< T >::const_iterator |
typedef iterator to be that of the underlying storage type
Definition at line 284 of file ValMem.hpp.
| typedef std::vector<T>::const_reverse_iterator uhal::ValVector< T >::const_reverse_iterator |
typedef iterator to be that of the underlying storage type
Definition at line 288 of file ValMem.hpp.
| typedef std::vector<T>::iterator uhal::ValVector< T >::iterator |
typedef iterator to be that of the underlying storage type
Definition at line 282 of file ValMem.hpp.
| typedef std::vector<T>::reverse_iterator uhal::ValVector< T >::reverse_iterator |
typedef iterator to be that of the underlying storage type
Definition at line 286 of file ValMem.hpp.
| uhal::ValVector< T >::ValVector | ( | const std::vector< T > & | aValues | ) |
Constructor.
| aValues | a vector of values to which the validated memory will be initialized |
Definition at line 189 of file ValMem.cpp.
| uhal::ValVector< T >::ValVector | ( | const ValVector< T > & | aValues | ) |
| uhal::ValVector< T >::ValVector | ( | const uint32_t & | aSize | ) |
Constructor.
| aSize | the initial size of the validated memory |
Definition at line 203 of file ValMem.cpp.
| uhal::ValVector< T >::ValVector |
Default constructor.
Definition at line 210 of file ValMem.cpp.
| void uhal::ValVector< T >::assign | ( | InputIterator | aBegin, |
| InputIterator | aEnd | ||
| ) |
Assignment operator - including check on whether the data has previously been marked as valid.
| aBegin | Iterator to the beginning of a block of data to be copied to the Validated Memory |
| aEnd | Iterator to the end (one past last entry) of a block of data to be copied to the Validated Memory |
Definition at line 56 of file ValMem.hxx.
| const T & uhal::ValVector< T >::at | ( | std::size_t | aIndex | ) | const |
If the memory has previously been marked as valid, give random access into memory.
| aIndex | index of the data to be retrieved |
Definition at line 264 of file ValMem.cpp.
References uhal::log().
Referenced by pycohal::convert_to_string(), uhal::tests::for(), pycohal::ValVectorIndexingSuite< T >::getItem(), pycohal::ValVectorIndexingSuite< T >::getSlice(), and uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES().
| ValVector< T >::const_iterator uhal::ValVector< T >::begin |
If the memory has previously been marked as valid, return a const iterator to the beginning of the underlying memory.
Definition at line 311 of file ValMem.cpp.
Referenced by uhal::tests::PerfTester::buffersEqual(), PYBIND11_MODULE(), uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(), and uhal::tests::PerfTester::validation_test_block_write_read().
| void uhal::ValVector< T >::clear |
Clear the underlying memory and set Validity to false.
Definition at line 303 of file ValMem.cpp.
| const T * uhal::ValVector< T >::data |
Return the address of the underlying memory.
Definition at line 287 of file ValMem.cpp.
Referenced by PYBIND11_MODULE().
| ValVector< T >::const_iterator uhal::ValVector< T >::end |
If the memory has previously been marked as valid, return a const iterator to the end (one past last entry) of the underlying memory.
Definition at line 327 of file ValMem.cpp.
Referenced by uhal::tests::PerfTester::buffersEqual(), PYBIND11_MODULE(), uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(), and uhal::tests::PerfTester::validation_test_block_write_read().
| const T & uhal::ValVector< T >::operator[] | ( | std::size_t | aIndex | ) | const |
If the memory has previously been marked as valid, give random access into memory.
| aIndex | index of the data to be retrieved |
Definition at line 248 of file ValMem.cpp.
| void uhal::ValVector< T >::push_back | ( | const T & | aValue | ) |
If the memory has not previously been marked as valid, add an entry to the end of it.
| aValue | aValue to append to the block |
Definition at line 232 of file ValMem.cpp.
Referenced by uhal::tests::PerfTester::runValidationTest().
| ValVector< T >::const_reverse_iterator uhal::ValVector< T >::rbegin |
If the memory has previously been marked as valid, return a const reverse iterator to the reverse beginning (the last entry) of the underlying memory.
Definition at line 343 of file ValMem.cpp.
| ValVector< T >::const_reverse_iterator uhal::ValVector< T >::rend |
If the memory has previously been marked as valid, return a const reverse iterator to the reverse end (one before the zero'th entry) of the underlying memory.
Definition at line 359 of file ValMem.cpp.
| std::size_t uhal::ValVector< T >::size |
Return the size of the underlying memory.
Definition at line 280 of file ValMem.cpp.
Referenced by pycohal::convert_to_string(), uhal::tests::for(), pycohal::ValVectorIndexingSuite< T >::getItem(), pycohal::ValVectorIndexingSuite< T >::getSlice(), uhal::tests::job_multiple(), PYBIND11_MODULE(), and uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES().
| bool uhal::ValVector< T >::valid |
Return whether the Validated memory is marked as valid.
Definition at line 217 of file ValMem.cpp.
Referenced by uhal::tests::for(), uhal::tests::job_multiple(), PYBIND11_MODULE(), and uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES().
| void uhal::ValVector< T >::valid | ( | bool | aValid | ) |
Change the validatity state of the Validated memory.
| aValid | the new validity state of the Validated memory |
Definition at line 224 of file ValMem.cpp.
| std::vector< T > uhal::ValVector< T >::value |
Return the value of the validated memory with check on validity.
Definition at line 375 of file ValMem.cpp.
Referenced by uhal::tests::for(), and uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES().
| void uhal::ValVector< T >::value | ( | const std::vector< T > & | aValue | ) |
If the memory has not previously been marked as valid, set the value.
| aValue | the value of the validated memory |
Definition at line 390 of file ValMem.cpp.
|
friend |
Make ClientInterface a friend so that it can access the members to get the info associated with the raw data space.
Definition at line 275 of file ValMem.hpp.
|
friend |
Make the ValHeader class a friend so we can downcast the members.
Definition at line 278 of file ValMem.hpp.
|
private |
A shared pointer to a ValVector struct, so that every copy of this ValVector points to the same underlying memory.
Definition at line 404 of file ValMem.hpp.
Referenced by uhal::ClientInterface::CreateValVector().