aqnwb 0.4.0
Loading...
Searching...
No Matches
MeaningsTable.hpp
Go to the documentation of this file.
1#pragma once
2
3// Common STL includes
4#include <memory>
5#include <optional>
6#include <string>
7#include <vector>
8// Base AqNWB includes for IO and RegisteredType
9#include "io/BaseIO.hpp"
10#include "io/ReadIO.hpp"
12// Include for parent type
14// Forward declarations for referenced types
15namespace AQNWB::NWB
16{
18class VectorData;
19} // namespace AQNWB::NWB
20// Include for the namespace schema header
21#include "spec/hdmf_common.hpp"
22
23namespace AQNWB::NWB
24{
25
38{
39public:
43 virtual ~MeaningsTable() override {}
44
52 const std::vector<DataSpecPtr>& dataSpecs) const override;
53
61 static std::vector<DataSpecPtr> createDefaultDataSpecs(
62 const AQNWB::IO::BaseDataType& valueDataType,
63 const SizeType rowChunkSize = 100);
64
75 Status initialize(const VectorData& targetVectorData,
76 const AQNWB::IO::BaseDataType& valueDataType,
77 const std::string& description =
78 "A table to store information about the meanings of "
79 "values in a referenced VectorData object.",
80 const std::vector<DataSpecPtr>& columnSpecs = {});
81
85 "value",
86 "The value of a row in the referenced VectorData object.")
87
90 AQNWB::NWB::VectorDataTyped<std::string>,
91 "meaning",
92 "The meaning of the value in the referenced VectorData object.")
93
96 "target",
97 "Reference to the VectorData object for "
98 "which this table provides meanings.")
99
102 AQNWB::SPEC::HDMF_COMMON::namespaceName)
103
104protected:
110 MeaningsTable(const std::string& path, std::shared_ptr<AQNWB::IO::BaseIO> io);
111};
112
113} // namespace AQNWB::NWB
AQNWB::Types::Status Status
Definition BaseIO.hpp:21
AQNWB::Types::SizeType SizeType
Definition Channel.hpp:8
#define DEFINE_REFERENCED_REGISTERED_FIELD(name, registeredType, fieldPath, description)
Defines a lazy-loaded accessor function for reading fields that are RegisteredTypes that are linked t...
Definition RegisteredType.hpp:766
#define REGISTER_SUBCLASS(T, BASE, NAMESPACE)
Macro to register a subclass with the RegisteredType class registry.
Definition RegisteredType.hpp:547
#define DEFINE_REGISTERED_FIELD(name, registeredType, fieldPath, description)
Defines a lazy-loaded accessor function for reading fields that are RegisteredTypes.
Definition RegisteredType.hpp:672
Represents a base data type.
Definition BaseIO.hpp:47
Status initialize()
Initialize the container.
Definition Container.cpp:20
Represents a group containing multiple datasets that are aligned on the first dimension.
Definition DynamicTable.hpp:32
DynamicTable(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition DynamicTable.cpp:19
A list of unique identifiers for values within a dataset, e.g. rows of a DynamicTable.
Definition ElementIdentifiers.hpp:13
Status validateDataSpecs(const std::vector< DataSpecPtr > &dataSpecs) const override
Validates the provided data specifications for the MeaningsTable.
Definition MeaningsTable.cpp:20
MeaningsTable(const std::string &path, std::shared_ptr< AQNWB::IO::BaseIO > io)
Constructor.
Definition MeaningsTable.cpp:14
static std::vector< DataSpecPtr > createDefaultDataSpecs(const AQNWB::IO::BaseDataType &valueDataType, const SizeType rowChunkSize=100)
Creates the default data specs for the MeaningsTable.
Definition MeaningsTable.cpp:37
std::shared_ptr< RTYPE > readMeaningColumn() const
std::shared_ptr< RTYPE > readTarget() const
std::shared_ptr< RTYPE > readValueColumn() const
virtual ~MeaningsTable() override
Virtual destructor.
Definition MeaningsTable.hpp:43
An n-dimensional dataset representing a column of a DynamicTable.
Definition VectorData.hpp:23
A typed n-dimensional dataset representing a column of a DynamicTable.
Definition VectorData.hpp:143
The namespace for IO components of AqNWB.
Namespace for all classes related to the NWB data standard.
The namespace for managing format schema and namespaces.
The main namespace for AqNWB.
Definition Channel.hpp:11