FACT++  1.0
ofits Class Reference

#include <ofits.h>

+ Inheritance diagram for ofits:
+ Collaboration diagram for ofits:

Classes

struct  Key
 
struct  Table
 

Public Member Functions

 ofits ()
 
 ofits (const char *fname)
 
virtual ~ofits ()
 
bool is_open ()
 
bool is_open () const
 
virtual void open (const char *filename, bool addEXTNAMEKey=true)
 
virtual void open (const std::string &filename, bool addEXTNAMEKey=true)
 
void AllowCommentsTrimming (bool allow)
 
bool SetKeyComment (const std::string &key, const std::string &comment)
 
bool CopyKeys (const fits &fin, bool update=false)
 
bool SetRaw (const std::string &key, const std::string &val, const std::string &comment)
 
bool SetBool (const std::string &key, bool b, const std::string &comment="")
 
bool AddEmpty (const std::string &key, const std::string &comment="")
 
bool SetStr (const std::string &key, std::string s, const std::string &comment="")
 
bool SetInt (const std::string &key, int64_t i, const std::string &comment="")
 
bool SetFloat (const std::string &key, double f, int p, const std::string &comment="")
 
bool SetFloat (const std::string &key, double f, const std::string &comment="")
 
bool SetHex (const std::string &key, uint64_t i, const std::string &comment="")
 
bool AddComment (const std::string &comment)
 
bool AddHistory (const std::string &comment)
 
void End ()
 
virtual bool AddColumn (uint32_t cnt, char typechar, const std::string &name, const std::string &unit, const std::string &comment="", bool addHeaderKeys=true)
 
virtual bool AddColumn (const FITS::Compression &, uint32_t cnt, char typechar, const std::string &name, const std::string &unit, const std::string &comment="", bool addHeaderKeys=true)
 
bool AddColumnShort (uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnInt (uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnLong (uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnFloat (uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnDouble (uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnChar (uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnByte (uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnBool (uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnShort (const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnInt (const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnLong (const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnFloat (const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnDouble (const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnChar (const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnByte (const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnBool (const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnShort (const FITS::Compression &comp, uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnInt (const FITS::Compression &comp, uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnLong (const FITS::Compression &comp, uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnFloat (const FITS::Compression &comp, uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnDouble (const FITS::Compression &comp, uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnChar (const FITS::Compression &comp, uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnByte (const FITS::Compression &comp, uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnBool (const FITS::Compression &comp, uint32_t cnt, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnShort (const FITS::Compression &comp, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnInt (const FITS::Compression &comp, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnLong (const FITS::Compression &comp, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnFloat (const FITS::Compression &comp, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnDouble (const FITS::Compression &comp, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnChar (const FITS::Compression &comp, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnByte (const FITS::Compression &comp, const std::string &name, const std::string &unit="", const std::string &comment="")
 
bool AddColumnBool (const FITS::Compression &comp, const std::string &name, const std::string &unit="", const std::string &comment="")
 
Checksum WriteHeader (std::ostream &fout)
 
Checksum WriteHeader ()
 
void FlushHeader ()
 
Checksum WriteFitsHeader ()
 
virtual bool WriteDrsOffsetsTable ()
 
virtual bool WriteCatalog ()
 
virtual bool WriteTableHeader (const char *name="DATA")
 
template<size_t N>
void revcpy (char *dest, const char *src, int num)
 
virtual uint32_t GetBytesPerRow () const
 
virtual bool WriteRow (const void *ptr, size_t cnt, bool byte_swap=true)
 
template<typename N >
bool WriteRow (const std::vector< N > &vec)
 
virtual void FlushNumRows ()
 
size_t GetNumRows () const
 
void AlignTo2880Bytes ()
 
Checksum UpdateHeaderChecksum ()
 
virtual bool close ()
 
std::pair< std::string, int > GetChecksumData ()
 
void SetDefaultKeys ()
 

Protected Member Functions

std::vector< Table::Column >::const_iterator findcol (const std::string &name)
 

Protected Attributes

std::filebuf fFilebuf
 
Table fTable
 
std::vector< char > fOutputBuffer
 
Checksum fDataSum
 
Checksum fHeaderSum
 
bool fCommentTrimming
 
bool fManualExtName
 

Private Member Functions

std::vector< Key >::iterator findkey (const std::string &key)
 
bool Set (const std::string &key="", bool delim=false, const std::string &value="", const std::string &comment="")
 

Private Attributes

std::vector< KeyfKeys
 

Detailed Description

Definition at line 29 of file ofits.h.


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