|
Clp
1.17.6
|
This reads plain text files. More...
#include <CoinFileIO.hpp>
Inheritance diagram for CoinPlainFileInput:
Collaboration diagram for CoinPlainFileInput:Public Member Functions | |
| CoinPlainFileInput (const std::string &fileName) | |
| CoinPlainFileInput (FILE *fp) | |
| When already opened. More... | |
| virtual | ~CoinPlainFileInput () |
| virtual int | read (void *buffer, int size) |
| Read a block of data from the file, similar to fread. More... | |
| virtual char * | gets (char *buffer, int size) |
| Reads up to (size-1) characters an stores them into the buffer, similar to fgets. More... | |
Public Member Functions inherited from CoinFileInput | |
| CoinFileInput (const std::string &fileName) | |
| Constructor (don't use this, use the create method instead). More... | |
| virtual | ~CoinFileInput () |
| Destructor. More... | |
Public Member Functions inherited from CoinFileIOBase | |
| CoinFileIOBase (const std::string &fileName) | |
| Constructor. More... | |
| ~CoinFileIOBase () | |
| Destructor. More... | |
| const char * | getFileName () const |
| Return the name of the file used by this object. More... | |
| std::string | getReadType () const |
| Return the method of reading being used. More... | |
Private Attributes | |
| FILE * | f_ |
Additional Inherited Members | |
Static Public Member Functions inherited from CoinFileInput | |
| static bool | haveGzipSupport () |
| indicates whether CoinFileInput supports gzip'ed files More... | |
| static bool | haveBzip2Support () |
| indicates whether CoinFileInput supports bzip2'ed files More... | |
| static CoinFileInput * | create (const std::string &fileName) |
| Factory method, that creates a CoinFileInput (more precisely a subclass of it) for the file specified. More... | |
Protected Attributes inherited from CoinFileIOBase | |
| std::string | readType_ |
Related Functions inherited from CoinFileInput | |
| bool | fileAbsPath (const std::string &path) |
| Test if the given string looks like an absolute file path. More... | |
| bool | fileCoinReadable (std::string &name, const std::string &dfltPrefix=std::string("")) |
| Test if the file is readable, using likely versions of the file name, and return the name that worked. More... | |
This reads plain text files.
Definition at line 82 of file CoinFileIO.hpp.
| CoinPlainFileInput::CoinPlainFileInput | ( | const std::string & | fileName | ) |
| CoinPlainFileInput::CoinPlainFileInput | ( | FILE * | fp | ) |
When already opened.
|
virtual |
|
virtual |
Read a block of data from the file, similar to fread.
| buffer | Address of a buffer to store the data into. |
| size | Number of bytes to read (buffer should be large enough). |
Implements CoinFileInput.
|
virtual |
Reads up to (size-1) characters an stores them into the buffer, similar to fgets.
Reading ends, when EOF or a newline occurs or (size-1) characters have been read. The resulting string is terminated with '\0'. If reading ends due to an encoutered newline, the '
' is put into the buffer, before the '\0' is appended.
| buffer | The buffer to put the string into. |
| size | The size of the buffer in characters. |
Implements CoinFileInput.
|
private |
Definition at line 94 of file CoinFileIO.hpp.
1.8.5