Public Member Functions | List of all members
mirtk::Cifstream Class Reference

#include <Cifstream.h>

Inheritance diagram for mirtk::Cifstream:
Inheritance graph
Collaboration diagram for mirtk::Cifstream:
Collaboration graph

Public Member Functions

 Cifstream (const char *=NULL)
 Constructor.
 
void Close ()
 Close file.
 
MIRTK_Common_DEPRECATED int IsSwapped () const
 
MIRTK_Common_DEPRECATED void IsSwapped (int)
 
void Open (const char *)
 Open file.
 
bool Read (char *, long, long)
 Read n data as array (possibly compressed) from offset.
 
bool ReadAsChar (char *, long, long=-1)
 Read n data as array of char (possibly compressed) from offset.
 
bool ReadAsDouble (double *, long, long=-1)
 Read n data as array of unsigned short (possibly compressed) from offset.
 
bool ReadAsFloat (float *, long, long offset=-1)
 Read n data as array of short compressed) from offset.
 
bool ReadAsInt (int *, long, long=-1)
 Read n data as array of short (possibly compressed) from offset.
 
bool ReadAsShort (short *, long, long=-1)
 Read n data as array of short (possibly compressed) from offset.
 
bool ReadAsString (char *, long, long=-1)
 Read n data as string (possibly compressed) from current position.
 
bool ReadAsUChar (unsigned char *, long, long=-1)
 Read n data as array of unsigned char (possibly compressed) from offset.
 
bool ReadAsUInt (unsigned int *, long, long=-1)
 Read n data as array of unsigned short (possibly compressed) from offset.
 
bool ReadAsUShort (unsigned short *, long, long=-1)
 Read n data as array of unsigned short (possibly compressed) from offset.
 
void Seek (long)
 Go to position in file.
 
long Tell () const
 Current position in file.
 
 ~Cifstream ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Class for reading (compressed) file streams.

This class defines and implements functions for reading compressed file streams. The file streams can be either uncompressed or compressed.

Definition at line 39 of file Cifstream.h.

Member Function Documentation

§ IsSwapped() [1/2]

MIRTK_Common_DEPRECATED int mirtk::Cifstream::IsSwapped ( ) const

Returns whether file is swapped

Deprecated:
Use Swapped() instead.

§ IsSwapped() [2/2]

MIRTK_Common_DEPRECATED void mirtk::Cifstream::IsSwapped ( int  )

Sets whether file is swapped

Deprecated:
Use Swapped(bool) instead.

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