High level util for effective file reading and other file operations. More...
#include <SMESH_File.hxx>
Public Member Functions | |
| void | close () |
| Close the file. More... | |
| const char * | end () const |
| bool | eof () const |
| const std::string & | error () const |
| bool | exists () |
| Check existence. More... | |
| bool | getInts (std::vector< int > &ids) |
| Fill vector by reading out integers from file. Vector size gives number of integers to read. More... | |
| std::string | getLine () |
| Skip till current line end and return the skipped string. More... | |
| std::string | getName () const |
| const char * | getPos () const |
| bool | isDirectory () |
| Check existence. More... | |
| bool | open () |
| Open file for reading. Return true if there is something to read. More... | |
| bool | openForWriting () |
| Open for binary writing only. More... | |
| operator const char * () const | |
| bool | operator++ () |
| void | operator+= (int posDelta) |
| bool | remove () |
| Remove the file. More... | |
| void | rewind () |
| Move cursor to the file beginning. More... | |
| void | setPos (const char *pos) |
| Set cursor to the given position. More... | |
| long | size () |
| Return file size. More... | |
| SMESH_File (const std::string &name, bool openForReading=true) | |
| Creator opening the file for reading by default. More... | |
| template<typename T > | |
| bool | write (const T &value) |
| template<typename T > | |
| bool | write (const T *values, size_t nbTValues) |
| bool | writeRaw (const void *data, size_t size) |
| Write binary data. More... | |
| ~SMESH_File () | |
| Destructor closing the file. More... | |
High level util for effective file reading and other file operations.
| SMESH_File::SMESH_File | ( | const std::string & | name, |
| bool | openForReading = true |
||
| ) |
Creator opening the file for reading by default.
References open().
| SMESH_File::~SMESH_File | ( | ) |
Destructor closing the file.
References close().
| void SMESH_File::close | ( | ) |
Close the file.
References close().
Referenced by close(), open(), femexamples.examplesgui.FemExamples::reject(), remove(), and ~SMESH_File().
| const char * SMESH_File::end | ( | ) | const |
| const std::string & SMESH_File::error | ( | ) | const |
| bool SMESH_File::exists | ( | ) |
Check existence.
Fill vector by reading out integers from file. Vector size gives number of integers to read.
References eof().
| std::string SMESH_File::getLine | ( | ) |
Skip till current line end and return the skipped string.
References eof().
| std::string SMESH_File::getName | ( | ) | const |
| const char * SMESH_File::getPos | ( | ) | const |
| bool SMESH_File::isDirectory | ( | ) |
Check existence.
| bool SMESH_File::open | ( | ) |
Open file for reading. Return true if there is something to read.
References close(), open(), and size().
Referenced by open(), openForWriting(), and SMESH_File().
| SMESH_File::operator const char * | ( | ) | const |
| bool SMESH_File::operator++ | ( | ) |
| void SMESH_File::operator+= | ( | int | posDelta | ) |
| bool SMESH_File::remove | ( | ) |
| void SMESH_File::rewind | ( | ) |
Move cursor to the file beginning.
Referenced by gzip_utf8.GzipFile::seek().
| void SMESH_File::setPos | ( | const char * | pos | ) |
Set cursor to the given position.
| long SMESH_File::size | ( | ) |
Return file size.
Referenced by gzip_utf8.GzipFile::close(), PathScripts.PostUtils.GCodeEditorDialog::done(), open(), and gzip_utf8.GzipFile::write().
| bool SMESH_File::write | ( | const T & | value | ) |
Referenced by gzip_utf8.GzipFile::seek().
| bool SMESH_File::write | ( | const T * | values, |
| size_t | nbTValues | ||
| ) |
Referenced by gzip_utf8.GzipFile::seek(), and writeRaw().