Skip to content

Commit

Permalink
Fix docs based on code review
Browse files Browse the repository at this point in the history
  • Loading branch information
oruebel committed Oct 23, 2024
1 parent 6c57527 commit a7cf936
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions docs/pages/userdocs/read.dox
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,10 @@
* and all their subtypes. \ref AQNWB::NWB::RegisteredType "RegisteredType" is responsible for
* managing all type classes and provides the \ref AQNWB::NWB::RegisteredType::create "create"
* factory methods for creating instances of subclasses from a file.
* - \ref AQNWB::IO::BaseIO "BaseIO", \ref AQNWB::IO::HDF5::HDF5IO "HDF5IO" responsible for
* reading type attribute and group information and for searching the file for typed objects via
* \ref AQNWB::IO::BaseIO::findTypes "findTypes()", and exposing
* - \ref AQNWB::IO::BaseIO "BaseIO", \ref AQNWB::IO::HDF5::HDF5IO "HDF5IO" are responsible for
* i) reading type attribute and group information, ii) searching the file for typed objects via
* \ref AQNWB::IO::BaseIO::findTypes "findTypes()" methods, and iii) retrieving the paths of all
* object within a group via \ref AQNWB::IO::BaseIO::getGroupObjects "getGroupObjects()"
*
* \subsubsection read_design_wrapper_registeredType RegisteredType
*
Expand Down
5 changes: 3 additions & 2 deletions src/nwb/RegisteredType.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "RegisteredType.hpp"

#include "io/ReadIO.hpp"
#include "Utils.hpp"

using namespace AQNWB::NWB;

Expand Down Expand Up @@ -77,14 +78,14 @@ std::shared_ptr<AQNWB::NWB::RegisteredType> RegisteredType::create(
try {
// Read the "namespace" attribute
AQNWB::IO::DataBlockGeneric namespaceData =
io->readAttribute(path + "/namespace");
io->readAttribute(AQNWB::mergePaths(path, "namespace"));
auto namespaceBlock =
AQNWB::IO::DataBlock<std::string>::fromGeneric(namespaceData);
std::string typeNamespace = namespaceBlock.data[0];

// Read the "neurodata_type" attribute
AQNWB::IO::DataBlockGeneric typeData =
io->readAttribute(path + "/neurodata_type");
io->readAttribute(AQNWB::mergePaths(path, "neurodata_type"));
auto typeBlock = AQNWB::IO::DataBlock<std::string>::fromGeneric(typeData);
std::string typeName = typeBlock.data[0];

Expand Down

0 comments on commit a7cf936

Please sign in to comment.