![]() |
ATLAS Offline Software
|
a class that holds manually specified column data More...
#include <ManualColumnData.h>
Public Member Functions | |
| ManualColumnData (std::vector< std::any > &&data) | |
| standard constructor | |
| void | configureType (const std::string &columnName, const std::type_info &type) |
| configure for the given type | |
| const std::type_info * | type () const noexcept |
| get the type we are configured for | |
| template<typename T> | |
| std::span< const T > | getSpan (const std::string &name) const |
| get the configured column as an std::span | |
| std::size_t | columnSize () const noexcept |
| get the size of the column | |
| void * | columnVoidData () noexcept |
| get the data pointer for the column | |
Private Attributes | |
| std::vector< std::any > | m_data |
| a vector of untyped data provided by the user | |
| const std::type_info * | m_type = nullptr |
| the actual type for the column | |
| std::shared_ptr< void > | m_column |
| the column created from m_data | |
a class that holds manually specified column data
This is for use in unit test code to allow users specifying a column as a simple list of values, e.g.
Internally this represents the user data as a vector of std::any, and then converts it to the appropriate type when asked. This is not particularly efficient, but it is only meant for use in unit tests, where ease of use is more important than efficiency.
Definition at line 38 of file ManualColumnData.h.
| columnar::TestUtils::ManualColumnData::ManualColumnData | ( | std::vector< std::any > && | data | ) |
standard constructor
Definition at line 63 of file ManualColumnData.cxx.
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
get the data pointer for the column
Definition at line 71 of file ManualColumnData.h.
| void columnar::TestUtils::ManualColumnData::configureType | ( | const std::string & | columnName, |
| const std::type_info & | type ) |
configure for the given type
Definition at line 71 of file ManualColumnData.cxx.
|
inlinenodiscard |
get the configured column as an std::span
Definition at line 57 of file ManualColumnData.h.
|
inlinenodiscardnoexcept |
|
private |
the column created from m_data
Definition at line 87 of file ManualColumnData.h.
|
private |
a vector of untyped data provided by the user
Definition at line 81 of file ManualColumnData.h.
|
private |
the actual type for the column
Definition at line 84 of file ManualColumnData.h.