Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
FileInput Class Reference

#include <elm/io/FileInput.h>

+ Inheritance diagram for FileInput:

Public Member Functions

 FileInput (const char *path)
 
 FileInput (cstring path)
 
 FileInput (string path)
 
 FileInput (sys::Path path)
 
 FileInput (FileInput &&fi)
 
 ~FileInput (void)
 
- Public Member Functions inherited from Input
 Input (void)
 
 Input (InStream &stream)
 
InStreamstream (void) const
 
void setStream (InStream &stream)
 
bool ended () const
 
bool failed () const
 
bool error () const
 
bool ok () const
 
void resetState ()
 
bool scanBool (void)
 
char scanChar (void)
 
t::uint32 scanULong (int base=0)
 
t::int32 scanLong (int base=0)
 
t::uint64 scanULLong (int base=0)
 
t::int64 scanLLong (int base=0)
 
double scanDouble (void)
 
String scanWord (void)
 
String scanLine (void)
 
void swallow (char chr)
 
void swallow (CString str)
 
void swallow (const String &str)
 
void swallowBlank (void)
 
Inputoperator>> (bool &value)
 
Inputoperator>> (char &value)
 
Inputoperator>> (unsigned char &value)
 
Inputoperator>> (short &value)
 
Inputoperator>> (unsigned short &value)
 
Inputoperator>> (int &value)
 
Inputoperator>> (unsigned int &value)
 
Inputoperator>> (signed long &value)
 
Inputoperator>> (unsigned long &value)
 
Inputoperator>> (signed long long &value)
 
Inputoperator>> (unsigned long long &value)
 
Inputoperator>> (float &value)
 
Inputoperator>> (double &value)
 
Inputoperator>> (String &value)
 
Inputoperator>> (const string &text)
 
Inputoperator>> (cstring text)
 
Inputoperator>> (const char *text)
 
template<class T >
Inputoperator>> (T &v)
 
LineRange lines ()
 

Detailed Description

Input from a file. Shortcut to perform formatted read from a buffered opened file.

Constructor & Destructor Documentation

◆ FileInput() [1/5]

FileInput ( const char *  path)

Build an input by opening the given file path.

Parameters
pathPath to the file to open.
Exceptions
sys::SystemExceptionIf the file cannot be opened.

◆ FileInput() [2/5]

FileInput ( cstring  path)

Build an input by opening the given file path.

Parameters
pathPath to the file to open.
Exceptions
sys::SystemExceptionIf the file cannot be opened.

◆ FileInput() [3/5]

FileInput ( string  path)

Build an input by opening the given file path.

Parameters
pathPath to the file to open.
Exceptions
sys::SystemExceptionIf the file cannot be opened.

◆ FileInput() [4/5]

FileInput ( sys::Path  path)

Build an input by opening the given file path.

Parameters
pathPath to the file to open.
Exceptions
sys::SystemExceptionIf the file cannot be opened.

References Input::setStream().

◆ FileInput() [5/5]

FileInput ( FileInput &&  fi)

Transfer an existing file input. After this operation, the argument input stream is no more usable.

Parameters
fiFile input to transfer.

References Input::setStream().

◆ ~FileInput()

~FileInput ( void  )

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