Mantid
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Friends | List of all members
Mantid::Nexus::NXObject Class Referenceabstract

The base abstract class for Nexus classes and data sets. More...

#include <NexusClasses.h>

Inheritance diagram for Mantid::Nexus::NXObject:
Mantid::Nexus::NXClass Mantid::Nexus::NXDataSet Mantid::Nexus::NXData Mantid::Nexus::NXDetector Mantid::Nexus::NXEntry Mantid::Nexus::NXInstrument Mantid::Nexus::NXRoot Mantid::Nexus::NXDataSetTyped< T >

Public Member Functions

NexusAddress const & address () const
 Returns the absolute address to the object.
 
std::string name () const
 Returns the name of the object.
 
virtual std::string NX_class () const =0
 Return the NX class name for a class (HDF group) or "SDS" for a data set;.
 
 NXObject (File *fileID, NXClass const *parent, std::string const &name)
 NXObject constructor.
 
 NXObject (std::shared_ptr< File > const &fileID, NXClass const *parent, std::string const &name)
 NXObject constructor.
 
virtual ~NXObject ()=default
 

Public Attributes

std::shared_ptr< File > m_fileID
 Nexus file id.
 

Protected Attributes

NexusAddress m_address
 Keeps the absolute address to the object.
 
bool m_open
 Set to true if the object has been open.
 

Private Member Functions

 NXObject ()
 Private default constructor.
 

Friends

class NXClass
 a friend class declaration
 
class NXDataSet
 a friend class declaration
 
class NXRoot
 a friend class declaration
 

Detailed Description

The base abstract class for Nexus classes and data sets.

NX classes and data sets are defined at www.nexusformat.org

Definition at line 87 of file NexusClasses.h.

Constructor & Destructor Documentation

◆ NXObject() [1/3]

Mantid::Nexus::NXObject::NXObject ( File *  fileID,
NXClass const *  parent,
std::string const &  name 
)

NXObject constructor.

Parameters
fileID:: The Nexus file id
parent:: The parent Nexus class. In terms of HDF it is the group containing the object.
name:: The name of the object relative to its parent

Definition at line 81 of file NexusClasses.cpp.

References address(), m_address, and name().

◆ NXObject() [2/3]

Mantid::Nexus::NXObject::NXObject ( std::shared_ptr< File > const &  fileID,
NXClass const *  parent,
std::string const &  name 
)

NXObject constructor.

Parameters
fileID:: The Nexus file id
parent:: The parent Nexus class. In terms of HDF it is the group containing the object.
name:: The name of the object relative to its parent

Definition at line 93 of file NexusClasses.cpp.

References address(), m_address, and name().

◆ ~NXObject()

virtual Mantid::Nexus::NXObject::~NXObject ( )
virtualdefault

◆ NXObject() [3/3]

Mantid::Nexus::NXObject::NXObject ( )
private

Private default constructor.

NXObject private default constructor.

Definition at line 73 of file NexusClasses.cpp.

Member Function Documentation

◆ address()

NexusAddress const & Mantid::Nexus::NXObject::address ( ) const
inline

◆ name()

std::string Mantid::Nexus::NXObject::name ( ) const

◆ NX_class()

virtual std::string Mantid::Nexus::NXObject::NX_class ( ) const
pure virtual

Return the NX class name for a class (HDF group) or "SDS" for a data set;.

Implemented in Mantid::Nexus::NXDataSet, Mantid::Nexus::NXClass, Mantid::Nexus::NXData, Mantid::Nexus::NXDetector, Mantid::Nexus::NXInstrument, Mantid::Nexus::NXEntry, and Mantid::Nexus::NXRoot.

Friends And Related Symbol Documentation

◆ NXClass

friend class NXClass
friend

a friend class declaration

Definition at line 89 of file NexusClasses.h.

◆ NXDataSet

friend class NXDataSet
friend

a friend class declaration

Definition at line 88 of file NexusClasses.h.

◆ NXRoot

friend class NXRoot
friend

a friend class declaration

Definition at line 90 of file NexusClasses.h.

Member Data Documentation

◆ m_address

NexusAddress Mantid::Nexus::NXObject::m_address
protected

Keeps the absolute address to the object.

Definition at line 109 of file NexusClasses.h.

Referenced by Mantid::Nexus::NXClass::close(), name(), NXObject(), NXObject(), Mantid::Nexus::NXDataSet::open(), and Mantid::Nexus::NXClass::open().

◆ m_fileID

std::shared_ptr<File> Mantid::Nexus::NXObject::m_fileID

◆ m_open

bool Mantid::Nexus::NXObject::m_open
protected

Set to true if the object has been open.

Definition at line 110 of file NexusClasses.h.

Referenced by Mantid::Nexus::NXClass::close(), Mantid::Nexus::NXClass::open(), and Mantid::Nexus::NXClass::openLocal().


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