55 virtual std::shared_ptr<Data>
create(
56 const std::string& path, std::shared_ptr<IO::BaseIO> io)
const = 0;
77 template<
typename DataT>
98 std::shared_ptr<Data>
create(
const std::string& path,
99 std::shared_ptr<IO::BaseIO> io)
const override
101 return DataT::create(path, io);
115 Data(const std::
string& path, std::shared_ptr<
IO::BaseIO> io);
167 The name of the type)
172 The name of the
namespace)
189template<
typename DTYPE = std::any>
201 DataTyped(
const std::string& path, std::shared_ptr<IO::BaseIO> io)
219 static std::shared_ptr<DataTyped>
create(
220 const std::string& path, std::shared_ptr<AQNWB::IO::BaseIO> io);
241 const std::shared_ptr<Data>& data)
AQNWB::Types::Status Status
Definition BaseIO.hpp:21
AQNWB::Types::SizeArray SizeArray
Definition BaseIO.hpp:22
#define REGISTER_SUBCLASS(T, BASE, NAMESPACE)
Macro to register a subclass with the RegisteredType class registry.
Definition RegisteredType.hpp:547
#define DEFINE_ATTRIBUTE_FIELD(name, default_type, fieldPath, description)
Defines a lazy-loaded attribute field accessor function.
Definition RegisteredType.hpp:580
#define DEFINE_DATASET_FIELD(readName, writeName, default_type, fieldPath, description)
Defines a lazy-loaded dataset field accessor function.
Definition RegisteredType.hpp:619
The configuration for an array dataset.
Definition BaseIO.hpp:321
ArrayDataSetConfig(const BaseDataType &type, const SizeArray &shape, const SizeArray &chunking)
Constructs an ArrayDataSetConfig object with the specified type, shape, and chunking.
Definition BaseIO.cpp:37
Base class for array dataset configuration.
Definition BaseIO.hpp:277
bool isInitialized()
Check whether the dataset has been initialized.
Definition Data.hpp:136
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordData(bool reset=false)
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::AttributeField, VTYPE > > readNeurodataType() const
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readData() const
Status initialize(const IO::BaseArrayDataSetConfig &dataConfig)
Initialize the dataset for the Data object.
Definition Data.cpp:18
Data(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition Data.cpp:13
virtual std::vector< AQNWB::Types::CellValue > readCellValues(const SizeArray &start={}, const SizeArray &count={}, const SizeArray &stride={}, const SizeArray &block={})
Reads a range of cell values from the dataset.
Definition Data.cpp:55
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::AttributeField, VTYPE > > readNamespace() const
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readData() const
DataTyped(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition Data.hpp:201
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordData(bool reset=false)
static std::shared_ptr< DataTyped< DTYPE > > fromData(const std::shared_ptr< Data > &data)
Create a DataTyped object from a Data object.
Definition Data.hpp:240
virtual ~DataTyped() override
Virtual destructor.
Definition Data.hpp:225
static std::shared_ptr< DataTyped > create(const std::string &path, std::shared_ptr< AQNWB::IO::BaseIO > io)
Factor method to create a DataTyped object.
Definition Data.cpp:169
Data(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition Data.cpp:13
Base class for types defined in the NWB schema.
Definition RegisteredType.hpp:48
const std::string & getPath() const
Gets the path of the registered type.
Definition RegisteredType.hpp:59
RegisteredType(const std::string &path, std::shared_ptr< AQNWB::IO::BaseIO > io)
Constructor.
Definition RegisteredType.cpp:18
std::shared_ptr< AQNWB::IO::BaseIO > getIO() const
Get a shared pointer to the IO object.
Definition RegisteredType.hpp:77
The namespace for IO components of AqNWB.
Namespace for all classes related to the NWB data standard.
AQNWB::Types::CellValue CellValue
Definition Data.hpp:14
virtual std::shared_ptr< Data > create(const std::string &path, std::shared_ptr< IO::BaseIO > io) const =0
Create the concrete Data object represented by this spec.
DataSpecBase(const std::string &datasetName, const IO::ArrayDataSetConfig &dataConfig)
Construct the DataSpecBase.
Definition Data.hpp:40
std::string name
Dataset name relative to the owning table/container.
Definition Data.hpp:66
virtual ~DataSpecBase()=default
virtual Status initialize(Data &data) const =0
Initialize the created concrete Data object from this spec.
DataSpec(const std::string &datasetName, const IO::ArrayDataSetConfig &dataConfig)
Construct the typed DataSpec.
Definition Data.hpp:86
std::shared_ptr< Data > create(const std::string &path, std::shared_ptr< IO::BaseIO > io) const override
Create the concrete Data object represented by this typed spec.
Definition Data.hpp:98
Represents a single cell value in a DynamicTable row.
Definition Types.hpp:190