Fawkes API  Fawkes Development Version
XabslFileInputSource Class Reference

File input class for Xabsl integration. More...

#include "xabsl_tools.h"

Inheritance diagram for XabslFileInputSource:

Public Member Functions

 XabslFileInputSource (const char *filename)
 Constructor. More...
 
 ~XabslFileInputSource ()
 Destructor. More...
 
virtual bool open ()
 Open file. More...
 
virtual void close ()
 Close file. More...
 
virtual double readValue ()
 Read a double value from the file. More...
 
virtual bool readString (char *destination, int maxLength)
 Read a string from the file. More...
 

Detailed Description

File input class for Xabsl integration.

Author
Tim Niemueller

Definition at line 47 of file xabsl_tools.h.

Constructor & Destructor Documentation

◆ XabslFileInputSource()

XabslFileInputSource::XabslFileInputSource ( const char *  filename)

Constructor.

Parameters
filenamename of the file to read

Definition at line 74 of file xabsl_tools.cpp.

◆ ~XabslFileInputSource()

XabslFileInputSource::~XabslFileInputSource ( )

Destructor.

Definition at line 82 of file xabsl_tools.cpp.

Member Function Documentation

◆ close()

void XabslFileInputSource::close ( )
virtual

Close file.

Definition at line 103 of file xabsl_tools.cpp.

◆ open()

bool XabslFileInputSource::open ( )
virtual

Open file.

Returns
true if file has been opened successfully, false otherwise

Definition at line 93 of file xabsl_tools.cpp.

◆ readString()

bool XabslFileInputSource::readString ( char *  buf,
int  buf_length 
)
virtual

Read a string from the file.

Parameters
bufbuffer where the string is stored
buf_lengthmaximum length of the string to be read, warning, this method will write one more byte than buf_length. This is done to be compatible with broken Xabsl.
Returns
true on success, false otherwise

Definition at line 133 of file xabsl_tools.cpp.

◆ readValue()

double XabslFileInputSource::readValue ( )
virtual

Read a double value from the file.

Returns
value read from the file

Definition at line 114 of file xabsl_tools.cpp.


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