38 std::optional<std::string>
age = std::nullopt;
47 std::optional<std::string>
genotype = std::nullopt;
49 std::optional<std::string>
sex = std::nullopt;
51 std::optional<std::string>
species = std::nullopt;
53 std::optional<std::string>
strain = std::nullopt;
56 std::optional<std::string>
subjectId = std::nullopt;
58 std::optional<std::string>
weight = std::nullopt;
67 age = std::move(value);
123 sex = std::move(value);
145 strain = std::move(value);
168 weight = std::move(value);
179 static std::shared_ptr<Subject>
create(std::shared_ptr<IO::BaseIO> io);
199 "Age of subject. Can be supplied instead of date_of_birth.")
206 "Date of birth of subject. Can be supplied instead of age.")
212 "Description of subject and where subject came from "
213 "(e.g. - breeder - if animal).")
219 "Genetic strain. If absent - assume Wild Type (WT).")
235 "ID of animal/person used/participating in experiment (lab convention).")
241 "Weight at time of experiment - at time of surgery and "
242 "at other important times.")
248 "Age is with reference to this event. Can be birth or gestational. If "
249 "reference is omitted - birth is implied.")
256 explicit
Subject(std::shared_ptr<
IO::BaseIO> io);
263 Subject(const std::
string& path, std::shared_ptr<
AQNWB::
IO::BaseIO> io);
AQNWB::Types::Status Status
Definition BaseIO.hpp:21
#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
An abstract data type for a generic container storing collections of data and metadata....
Definition NWBContainer.hpp:25
Status initialize()
Initialize the object.
Definition NWBContainer.cpp:17
NWBContainer(const std::string &path, std::shared_ptr< AQNWB::IO::BaseIO > io)
Constructor.
Definition NWBContainer.cpp:11
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordGenotype(bool reset=false)
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readSpecies() const
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordDescription(bool reset=false)
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordAge(bool reset=false)
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordStrain(bool reset=false)
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readWeight() const
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordDateOfBirth(bool reset=false)
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordSpecies(bool reset=false)
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readDescription() const
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readStrain() const
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordSubjectId(bool reset=false)
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readSubjectId() const
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readGenotype() const
Subject(std::shared_ptr< IO::BaseIO > io)
Constructor for Subject.
Definition Subject.cpp:12
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readAge() const
static std::shared_ptr< Subject > create(const std::string &path, std::shared_ptr< AQNWB::IO::BaseIO > io)
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::AttributeField, VTYPE > > readAgeReference() const
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordWeight(bool reset=false)
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readSex() const
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordSex(bool reset=false)
virtual ~Subject() override
Virtual destructor.
Definition Subject.hpp:184
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readDateOfBirth() const
The namespace for IO components of AqNWB.
Namespace for all classes related to the NWB data standard.
const std::string namespaceName
Definition core.hpp:21
The main namespace for AqNWB.
Definition Channel.hpp:11
Metadata about the experimental subject.
Definition Subject.hpp:36
std::optional< std::string > species
Species of subject.
Definition Subject.hpp:51
SubjectSpec & withSex(std::string value)
Set the biological sex of the subject.
Definition Subject.hpp:121
std::optional< std::string > strain
Strain of subject.
Definition Subject.hpp:53
std::optional< std::string > dateOfBirth
Date of birth of subject as iso formatted date string.
Definition Subject.hpp:43
SubjectSpec & withStrain(std::string value)
Set the strain of the subject.
Definition Subject.hpp:143
std::optional< std::string > subjectId
ID of animal/person used/participating in experiment (lab convention).
Definition Subject.hpp:56
std::optional< std::string > description
Description of subject and where subject came from.
Definition Subject.hpp:45
SubjectSpec & withWeight(std::string value)
Set the weight of the subject.
Definition Subject.hpp:166
std::optional< std::string > ageReference
Age is with reference to this event. Can be ‘birth’ or ‘gestational’. If reference is omitted,...
Definition Subject.hpp:41
SubjectSpec & withAge(std::string value)
Set the age of the subject.
Definition Subject.hpp:65
SubjectSpec & withDateOfBirth(std::string value)
Set the date of birth of the subject.
Definition Subject.hpp:88
std::optional< std::string > age
Age of subject (e.g., "P90D" for 90 days post-natal).
Definition Subject.hpp:38
SubjectSpec & withSpecies(std::string value)
Set the species of the subject.
Definition Subject.hpp:132
std::optional< std::string > weight
Weight at time of experiment.
Definition Subject.hpp:58
std::optional< std::string > sex
Biological sex of subject.
Definition Subject.hpp:49
SubjectSpec & withGenotype(std::string value)
Set the genotype of the subject.
Definition Subject.hpp:110
std::optional< std::string > genotype
Genetic strain. If absent, assume Wild Type (WT).
Definition Subject.hpp:47
SubjectSpec & withDescription(std::string value)
Set the description of the subject.
Definition Subject.hpp:99
SubjectSpec & withSubjectId(std::string value)
Set the ID of the subject.
Definition Subject.hpp:155
SubjectSpec & withAgeReference(std::string value)
Set the age reference event of the subject.
Definition Subject.hpp:77