aqnwb 0.1.0
Loading...
Searching...
No Matches
RecordingObjects.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "Channel.hpp"
4#include "Types.hpp"
6
11namespace AQNWB::NWB
12{
13// Forward declaration
14class RegisteredType;
15} // namespace AQNWB::NWB
16
17namespace AQNWB::IO
18{
19
25
27{
28public:
33
38
43
48
55 const std::shared_ptr<AQNWB::NWB::RegisteredType>& object);
56
61 std::shared_ptr<AQNWB::NWB::RegisteredType> getRecordingObject(
62 const SizeType& objectInd);
63
73 std::shared_ptr<AQNWB::NWB::RegisteredType> getRecordingObject(
74 const std::string& path) const;
75
84 const std::shared_ptr<const AQNWB::NWB::RegisteredType>& object) const;
85
89 void clear() { m_recording_objects.clear(); }
90
97
105
109 inline SizeType size() const { return m_recording_objects.size(); }
110
116 std::string toString() const;
117
118private:
122 std::vector<std::shared_ptr<AQNWB::NWB::RegisteredType>> m_recording_objects;
123
127 std::string m_name;
128};
129
130} // namespace AQNWB::IO
AQNWB::Types::Status Status
Definition BaseIO.hpp:22
AQNWB::Types::SizeType SizeType
Definition Channel.hpp:8
SizeType addRecordingObject(const std::shared_ptr< AQNWB::NWB::RegisteredType > &object)
Adds a RegisteredType object to the recording objects collection.
Definition RecordingObjects.cpp:34
~RecordingObjects()
Destructor for RecordingObjects class.
Definition RecordingObjects.cpp:18
std::string toString() const
Create a string representation of the RecordingObjects contents.
Definition RecordingObjects.cpp:103
std::vector< std::shared_ptr< AQNWB::NWB::RegisteredType > > m_recording_objects
The RegisteredType objects used for recording.
Definition RecordingObjects.hpp:122
Status clearRecordingDataCache()
Clear recording data cache for all RegisteredType objects managed by this RecordingObjects instance....
Definition RecordingObjects.cpp:83
std::shared_ptr< AQNWB::NWB::RegisteredType > getRecordingObject(const SizeType &objectInd)
Gets the RegisteredType object from the recording objects collection.
Definition RecordingObjects.cpp:49
void clear()
Clear the recording objects collection.
Definition RecordingObjects.hpp:89
SizeType getRecordingIndex(const std::shared_ptr< const AQNWB::NWB::RegisteredType > &object) const
Finds the index of a RegisteredType object in the recording objects collection.
Definition RecordingObjects.cpp:20
RecordingObjects()
Constructor for RecordingObjects class.
Definition RecordingObjects.cpp:16
Status finalize()
Finalize all RegisteredType objects managed by this RecordingObjects instance. This method calls fina...
Definition RecordingObjects.cpp:69
RecordingObjects(const RecordingObjects &)=delete
Deleted copy constructor to prevent construction-copying.
std::string m_name
The name of the collection of recording objects.
Definition RecordingObjects.hpp:127
RecordingObjects & operator=(const RecordingObjects &)=delete
Deleted copy assignment operator to prevent copying.
SizeType size() const
Get the number of recording objects.
Definition RecordingObjects.hpp:109
Base class for types defined in the NWB schema.
Definition RegisteredType.hpp:48
The namespace for IO components of AqNWB.
Namespace for all classes related to the NWB data standard.