BALL::JCAMPFile Class Reference
[NMR File Formats]

JCAMP file class. More...

#include <JCAMPFile.h>

Inheritance diagram for BALL::JCAMPFile:
Inheritance graph
[legend]

List of all members.


Public Types

enum ContentType { STRING, NUMERIC, ARRAY }
Type definitions.
typedef std::pair< String,
JCAMPValue >
KeyValuePair
a key-value pair
typedef StringHashMap< JCAMPValue > EntryMap
A hash map containing the JCAMP entries.
typedef StringHashMap< String > HeaderMap
A hash map containing the header entries.

Public Member Functions

Constructors and Destructors
JCAMPFile ()
JCAMPFile (const String &name, OpenMode open_mode=std::ios::in) throw (Exception::FileNotFound)
JCAMPFile (const JCAMPFile &file) throw (Exception::FileNotFound)
Copy constructor.
virtual ~JCAMPFile ()
Destructor.
Accessors
void read () throw (Exception::ParseError)
Read the file.
bool write () throw (File::CannotWrite)
Write the file.
HeaderMap & getHeader ()
const HeaderMap & getHeader () const
EntryMap & getEntries ()
const EntryMap & getEntries () const
const JCAMPValue & operator[] (const String &name) const
double getDoubleValue (const String &name) const throw (Exception::InvalidFormat)
Index getIntValue (const String &name) const throw (Exception::InvalidFormat)
bool hasEntry (const String &name) const
bool hasHeader (const String &name) const
const JCAMPFile & operator= (const JCAMPFile &file)
Equality operators
bool operator== (const JCAMPFile &f) const
Equality operator.
bool operator!= (const JCAMPFile &f) const
Inequality operator.

Protected Attributes

HeaderMap header_
Entries from the header section.
EntryMap entries_
Entries from the key-value section.

Detailed Description

JCAMP file class.

This class parses JCAMP files, which are often used to store parameter files in spectroscopy (NMR, IR, MS), e.g. in Bruker instruments.

This class has rudimentary support for the format only. The most severe drawback currently is the lack of support for writing JCAMP files.

Generated on Thu Aug 6 18:30:29 2009 for BALL by doxygen 1.5.8