27 Data(
const std::string& path, std::shared_ptr<IO::BaseIO> io);
44 auto dataset =
m_io->createArrayDataSet(dataConfig, this->
m_path);
45 if (dataset ==
nullptr) {
46 return Status::Failure;
49 Status commonAttrsStatus =
m_io->createCommonNWBAttributes(
51 return commonAttrsStatus;
70 The name of the
namespace)
87template<
typename DTYPE = std::any>
97 DataTyped(
const std::string& path, std::shared_ptr<IO::BaseIO> io)
121 return std::make_shared<DataTyped<DTYPE>>(data.
getPath(), data.
getIO());
AQNWB::Types::Status Status
Definition BaseIO.hpp:22
#define REGISTER_SUBCLASS(T, NAMESPACE)
Macro to register a subclass with the RegisteredType class registry.
Definition RegisteredType.hpp:410
#define DEFINE_ATTRIBUTE_FIELD(name, default_type, fieldPath, description)
Defines a lazy-loaded attribute field accessor function.
Definition RegisteredType.hpp:443
#define DEFINE_DATASET_FIELD(readName, writeName, default_type, fieldPath, description)
Defines a lazy-loaded dataset field accessor function.
Definition RegisteredType.hpp:475
The configuration for an array dataset.
Definition BaseIO.hpp:200
bool isInitialized()
Check whether the dataset has been initialized.
Definition Data.hpp:57
std::shared_ptr< IO::BaseRecordingData > recordData(bool reset=false)
virtual ~Data() override
Virtual destructor.
Definition Data.hpp:32
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > readNeurodataType() const
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > readNamespace() const
Status initialize(const IO::ArrayDataSetConfig &dataConfig)
Initialize the dataset for the Data object.
Definition Data.hpp:42
Data(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition Data.cpp:9
std::unique_ptr< IO::ReadDataWrapper< DatasetField, VTYPE > > readData() const
static std::shared_ptr< DataTyped< DTYPE > > fromData(const Data &data)
Create a DataTyped object from a Data object.
Definition Data.hpp:119
DataTyped(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition Data.hpp:97
std::shared_ptr< IO::BaseRecordingData > recordData(bool reset=false)
std::unique_ptr< IO::ReadDataWrapper< DatasetField, VTYPE > > readData() const
virtual ~DataTyped() override
Virtual destructor.
Definition Data.hpp:105
virtual std::string getTypeName() const
Get the name of the class type.
Definition RegisteredType.cpp:60
std::string m_path
The path of the registered type.
Definition RegisteredType.hpp:338
std::shared_ptr< IO::BaseIO > m_io
A shared pointer to the IO object.
Definition RegisteredType.hpp:343
virtual std::string getNamespace() const
Get the schema namespace of the class type.
Definition RegisteredType.cpp:67
RegisteredType(const std::string &path, std::shared_ptr< AQNWB::IO::BaseIO > io)
Constructor.
Definition RegisteredType.cpp:15
std::string getPath() const
Gets the path of the registered type.
Definition RegisteredType.hpp:71
std::shared_ptr< AQNWB::IO::BaseIO > getIO() const
Get a shared pointer to the IO object.
Definition RegisteredType.hpp:89
Namespace for all classes related to the NWB data standard.
Definition TimeSeries.hpp:13