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>
130 throw Exception(
"AttrHolder<NumT>::writeToFile - no value to write");
135 template<
typename NumT>
146 throw Exception(
"DataHolder<NumT>::readFromFile - not able to read into a constant");
154 template<
typename NumT>
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>
206 m_holder->readFromFile(nf);
207 if (m_attr.size() > 0)
217 m_holder->writeToFile(nf);
218 if (m_attr.size() > 0)
void getData(void *data)
Put the currently open data in the supplied pointer.
virtual void readFromFile(File &nf) const =0
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.
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
Class that provides for a standard NeXus exception.
const std::vector< NumT > * m_c_value
std::vector< NumT > * m_value
The Object that allows access to the information in the file.
virtual void writeToFile(File &nf) const =0
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)