44 #include "napiconfig.h"
59 template<
typename NumT>
64 template<
typename NumT>
69 template<
typename NumT>
74 template<
typename NumT>
79 template<
typename NumT>
82 return NeXus::getType<NumT>();
88 return NeXus::getType<char>();
100 throw Exception(
"AttrHolder<NumT>::readFromFile - not able to read into a constant");
104 template<
typename NumT>
113 throw Exception(
"AttrHolder<NumT>::readFromFile - not able to read into a constant");
117 template<
typename NumT>
124 else if (m_c_value != NULL)
126 nf.
putAttr(m_name, *m_c_value);
130 throw Exception(
"AttrHolder<NumT>::writeToFile - no value to write");
135 template<
typename NumT>
144 else if (m_c_value != NULL)
146 throw Exception(
"DataHolder<NumT>::readFromFile - not able to read into a constant");
154 template<
typename NumT>
161 else if (m_c_value != NULL)
167 throw Exception(
"DataHolder<NumT>::writeToFile - no value to write");
171 template<
typename NumT>
176 template<
typename NumT>
181 template<
typename NumT>
186 template<
typename NumT>
191 template<
typename NumT>
void getData(void *data)
Put the currently open data in the supplied pointer.
File & operator<<(File &nf, const ISerialisable &obj)
void getAttr(const AttrInfo &info, void *data, int length=-1)
Get the value of the attribute specified by the AttrInfo supplied.
Header for a base NeXus::Exception.
NXnumtype
The primitive types published by this API.
virtual void readFromFile(File &nf) const
void openData(const std::string &name)
Header for IOStream like interface to NeXus files.
void writeData(const std::string &name, const std::string &value)
Create a 1D data field, insert the data, and close the data.
Base class for serialisable named and typed parameter.
virtual void readFromFile(File &nf) const =0
File & operator>>(File &nf, const ISerialisable &obj)
void closeGroup()
Close the currently open group.
void closeData()
Close the currently open data.
virtual void readFromFile(File &nf) const
virtual void readFromFile(File &nf) const
Serialisable NeXus attribute.
virtual void readFromFile(File &nf) const
virtual void writeToFile(File &nf) const
virtual void writeToFile(File &nf) const =0
Class that provides for a standard NeXus exception.
The Object that allows access to the information in the file.
void putAttr(const AttrInfo &info, const void *data)
Put the supplied data as an attribute into the currently open data.
virtual void writeToFile(File &nf) const
interface implemented by all serialisable NeXus components
bool isDataSetOpen()
This function checksi if we are in an open dataset.
virtual void writeToFile(File &nf) const
virtual void writeToFile(File &nf) const
void setName(const std::string &name)