26 VectorData(
const std::string& path, std::shared_ptr<IO::BaseIO> io);
44 const std::string& path,
45 std::shared_ptr<IO::BaseIO> io,
46 const std::string& description,
47 const std::vector<std::string>& references)
49 Status dataStatus = io->createReferenceDataSet(path, references);
50 if (dataStatus != Status::Success) {
54 auto vectorData = std::make_shared<VectorData>(path, io);
55 Status commonAttrsStatus = io->createCommonNWBAttributes(
56 path, vectorData->getNamespace(), vectorData->getTypeName());
57 Status attrStatus = io->createAttribute(description, path,
"description");
58 if ((attrStatus && commonAttrsStatus) != Status::Success) {
75 const std::string& description)
79 m_io->createAttribute(description,
m_path,
"description");
80 return dataStatus && attrStatus;
86 Description of what these vectors represent)
103template<
typename DTYPE = std::any>
139 return std::make_shared<VectorDataTyped<DTYPE>>(data.
getPath(),
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
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::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
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
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > readDescription() const
VectorData(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition VectorData.cpp:8
Status initialize(const IO::ArrayDataSetConfig &dataConfig, const std::string &description)
Initialize the dataset for the VectorData object.
Definition VectorData.hpp:74
static std::shared_ptr< VectorData > createReferenceVectorData(const std::string &path, std::shared_ptr< IO::BaseIO > io, const std::string &description, const std::vector< std::string > &references)
Create a VectorData object with a reference dataset.
Definition VectorData.hpp:43
virtual ~VectorData() override
Virtual destructor.
Definition VectorData.hpp:31
static std::shared_ptr< VectorDataTyped< DTYPE > > fromVectorData(const VectorData &data)
Create a VectorDataTyped object from a Data object.
Definition VectorData.hpp:136
std::shared_ptr< IO::BaseRecordingData > recordData(bool reset=false)
std::unique_ptr< IO::ReadDataWrapper< DatasetField, VTYPE > > readData() const
VectorDataTyped(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition VectorData.hpp:113
virtual ~VectorDataTyped() override
Virtual destructor.
Definition VectorData.hpp:121
Namespace for all classes related to the NWB data standard.
Definition TimeSeries.hpp:13
const std::string namespaceName
Definition hdmf_common.hpp:21