![]() |
aqnwb 0.1.0
|
Abstract data type for a group storing collections of data and metadata. More...
#include <Container.hpp>
Public Member Functions | |
Container (const std::string &path, std::shared_ptr< IO::BaseIO > io) | |
Constructor. | |
virtual | ~Container () |
Destructor. | |
Status | initialize () |
Initialize the container. | |
template<typename VTYPE = std::string> | |
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > | readNeurodataType () const |
template<typename VTYPE = std::string> | |
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > | readNamespace () const |
![]() | |
RegisteredType (const std::string &path, std::shared_ptr< IO::BaseIO > io) | |
Constructor. | |
virtual | ~RegisteredType () |
Destructor. | |
std::string | getPath () const |
Gets the path of the registered type. | |
std::string | getName () const |
Get the name of the object. | |
std::shared_ptr< IO::BaseIO > | getIO () const |
Get a shared pointer to the IO object. | |
virtual std::string | getTypeName () const |
Get the name of the class type. | |
virtual std::string | getNamespace () const |
Get the schema namespace of the class type. | |
std::string | getFullTypeName () const |
Get the full name of the type, i.e., namespace::typename | |
template<StorageObjectType SOT, typename VTYPE, typename std::enable_if< Types::IsDataStorageObjectType< SOT >::value, int >::type = 0> | |
std::unique_ptr< IO::ReadDataWrapper< SOT, VTYPE > > | readField (const std::string &fieldPath) const |
Support reading of arbitrary fields by their relative path. | |
std::shared_ptr< AQNWB::NWB::RegisteredType > | readField (const std::string &fieldPath) const |
Read a field that is itself a RegisteredType. | |
virtual std::unordered_map< std::string, std::string > | findOwnedTypes (const std::unordered_set< std::string > &types={}, const IO::SearchMode &search_mode=IO::SearchMode::STOP_ON_TYPE) const |
Find all typed objects that are owned by this object, i.e., objects that have a neurodata_type and namespace attribute and have this object as there closest parent with an assigned type. | |
Additional Inherited Members | |
![]() | |
static std::unordered_set< std::string > & | getRegistry () |
Get the registry of subclass names. | |
static std::unordered_map< std::string, std::pair< std::function< std::unique_ptr< RegisteredType >(const std::string &, std::shared_ptr< IO::BaseIO >)>, std::pair< std::string, std::string > > > & | getFactoryMap () |
Get the factory map for creating instances of subclasses. | |
static std::shared_ptr< RegisteredType > | create (const std::string &fullClassName, const std::string &path, std::shared_ptr< IO::BaseIO > io, bool fallbackToBase=false) |
Create an instance of a registered subclass by name. | |
static std::shared_ptr< AQNWB::NWB::RegisteredType > | create (const std::string &path, std::shared_ptr< IO::BaseIO > io, bool fallbackToBase=false) |
Factory method to create an instance of a subclass of RegisteredType from file. | |
template<typename T> | |
static std::shared_ptr< T > | create (const std::string &path, std::shared_ptr< IO::BaseIO > io) |
Factory method to create an instance of a subclass of RegisteredType by type. | |
![]() | |
static void | registerSubclass (const std::string &fullClassName, std::function< std::unique_ptr< RegisteredType >(const std::string &, std::shared_ptr< IO::BaseIO >)> factoryFunction, const std::string &typeName, const std::string &typeNamespace) |
Register a subclass name and its factory function in the registry. | |
![]() | |
std::string | m_path |
The path of the registered type. | |
std::shared_ptr< IO::BaseIO > | m_io |
A shared pointer to the IO object. | |
![]() | |
static const std::string | m_defaultUnregisteredGroupTypeClass |
Save the default RegisteredType to use for reading Group types that are not registered. | |
static const std::string | m_defaultUnregisteredDatasetTypeClass |
Save the default RegisteredType to use for reading Dataset types that are not registered. | |
Abstract data type for a group storing collections of data and metadata.
Container::Container | ( | const std::string & | path, |
std::shared_ptr< IO::BaseIO > | io ) |
Constructor.
path | The path of the container. |
io | A shared pointer to the IO object. |
Constructor
|
virtual |
Destructor.
Destructor
Status Container::initialize | ( | ) |
Initialize the container.
Initialize
|
inline |
The name of the namespace
|
inline |
The name of the type