![]() |
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 More... | |
void | configureType (const std::string &columnName, const std::type_info &type) |
configure for the given type More... | |
const std::type_info * | type () const noexcept |
get the type we are configured for More... | |
template<typename T > | |
std::span< const T > | getSpan (const std::string &name) const |
get the configured column as an std::span More... | |
std::size_t | columnSize () const noexcept |
get the size of the column More... | |
void * | columnVoidData () noexcept |
get the data pointer for the column More... | |
Private Attributes | |
std::vector< std::any > | m_data |
a vector of untyped data provided by the user More... | |
const std::type_info * | m_type = nullptr |
the actual type for the column More... | |
std::shared_ptr< void > | m_column |
the column created from m_data More... | |
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 | ) |
|
inlinenoexcept |
|
inlinenoexcept |
void columnar::TestUtils::ManualColumnData::configureType | ( | const std::string & | columnName, |
const std::type_info & | type | ||
) |
|
inline |
get the configured column as an std::span
Definition at line 57 of file ManualColumnData.h.
|
inlinenoexcept |
|
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.