aqnwb 0.1.0
Loading...
Searching...
No Matches
AQNWB::NWB::Container Class Reference

Abstract data type for a group storing collections of data and metadata. More...

#include <Container.hpp>

Inheritance diagram for AQNWB::NWB::Container:
[legend]
Collaboration diagram for AQNWB::NWB::Container:
[legend]

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
 
- Public Member Functions inherited from AQNWB::NWB::RegisteredType
 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::BaseIOgetIO () 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::RegisteredTypereadField (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 Public Member Functions inherited from AQNWB::NWB::RegisteredType
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< RegisteredTypecreate (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::RegisteredTypecreate (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 Protected Member Functions inherited from AQNWB::NWB::RegisteredType
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.
 
- Protected Attributes inherited from AQNWB::NWB::RegisteredType
std::string m_path
 The path of the registered type.
 
std::shared_ptr< IO::BaseIOm_io
 A shared pointer to the IO object.
 
- Static Protected Attributes inherited from AQNWB::NWB::RegisteredType
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.
 

Detailed Description

Abstract data type for a group storing collections of data and metadata.

Constructor & Destructor Documentation

◆ Container()

Container::Container ( const std::string & path,
std::shared_ptr< IO::BaseIO > io )

Constructor.

Parameters
pathThe path of the container.
ioA shared pointer to the IO object.

Constructor

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~Container()

Container::~Container ( )
virtual

Destructor.

Destructor

Member Function Documentation

◆ initialize()

Status Container::initialize ( )

Initialize the container.

Returns
Status::Success if successful, otherwise Status::Failure.

Initialize

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readNamespace()

template<typename VTYPE = std::string>
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > AQNWB::NWB::Container::readNamespace ( ) const
inline

The name of the namespace

Here is the caller graph for this function:

◆ readNeurodataType()

template<typename VTYPE = std::string>
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > AQNWB::NWB::Container::readNeurodataType ( ) const
inline

The name of the type

Here is the call graph for this function:

The documentation for this class was generated from the following files: