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::NXLog Mantid::NeXus::NXMainClass Mantid::NeXus::NXNote Mantid::NeXus::NXRoot Mantid::NeXus::NXDataSetTyped< T > Mantid::NeXus::NXData Mantid::NeXus::NXDetector Mantid::NeXus::NXDiskChopper Mantid::NeXus::NXEntry Mantid::NeXus::NXInstrument Mantid::NeXus::NXBinary

Public Member Functions

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

Public Attributes

NXAttributes attributes
 Attributes. More...
 
NXhandle m_fileID
 Nexus file id. More...
 

Protected Attributes

bool m_open
 Set to true if the object has been open. More...
 
std::string m_path
 Keeps the absolute path to the object. More...
 

Private Member Functions

void getAttributes ()
 Reads in attributes. More...
 
 NXObject ()
 Private default constructor. More...
 

Friends

class NXClass
 a friend class declaration More...
 
class NXDataSet
 a friend class declaration More...
 
class NXRoot
 a friend class declaration More...
 

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 93 of file NexusClasses.h.

Constructor & Destructor Documentation

◆ NXObject() [1/2]

Mantid::NeXus::NXObject::NXObject ( const NXhandle  fileID,
const NXClass parent,
const std::string &  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 70 of file NexusClasses.cpp.

References m_path, name(), and path().

◆ ~NXObject()

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

◆ NXObject() [2/2]

Mantid::NeXus::NXObject::NXObject ( )
inlineprivate

Private default constructor.

Definition at line 119 of file NexusClasses.h.

Member Function Documentation

◆ getAttributes()

void Mantid::NeXus::NXObject::getAttributes ( )
private

Reads in attributes.

Definition at line 87 of file NexusClasses.cpp.

References attributes, m_fileID, Mantid::NeXus::NXAttributes::set(), and value.

Referenced by Mantid::NeXus::NXDataSet::open(), and Mantid::NeXus::NXDataSet::openLocal().

◆ name()

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

◆ NX_class()

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

◆ path()

std::string Mantid::NeXus::NXObject::path ( ) const
inline

Friends And Related Function Documentation

◆ NXClass

friend class NXClass
friend

a friend class declaration

Definition at line 95 of file NexusClasses.h.

◆ NXDataSet

friend class NXDataSet
friend

a friend class declaration

Definition at line 94 of file NexusClasses.h.

◆ NXRoot

friend class NXRoot
friend

a friend class declaration

Definition at line 96 of file NexusClasses.h.

Member Data Documentation

◆ attributes

NXAttributes Mantid::NeXus::NXObject::attributes

◆ m_fileID

NXhandle 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 117 of file NexusClasses.h.

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

◆ m_path

std::string Mantid::NeXus::NXObject::m_path
protected

Keeps the absolute path to the object.

Definition at line 116 of file NexusClasses.h.

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


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