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... | |
Detailed Description
High level util for effective file reading and other file operations.
Constructor & Destructor Documentation
◆ SMESH_File()
| 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::~SMESH_File | ( | ) |
Destructor closing the file.
References close().
Member Function Documentation
◆ close()
| void SMESH_File::close | ( | ) |
Close the file.
Referenced by open(), remove(), and ~SMESH_File().
◆ end()
| const char* SMESH_File::end | ( | ) | const |
◆ eof()
◆ error()
| const std::string& SMESH_File::error | ( | ) | const |
Referenced by FreeCADInit.FCADLogger::report().
◆ exists()
| bool SMESH_File::exists | ( | ) |
Check existence.
◆ getInts()
| bool SMESH_File::getInts | ( | std::vector< int > & | ids | ) |
Fill vector by reading out integers from file. Vector size gives number of integers to read.
References eof().
◆ getLine()
| std::string SMESH_File::getLine | ( | ) |
Skip till current line end and return the skipped string.
References eof().
◆ getName()
| std::string SMESH_File::getName | ( | ) | const |
◆ getPos()
| const char* SMESH_File::getPos | ( | ) | const |
◆ isDirectory()
| bool SMESH_File::isDirectory | ( | ) |
Check existence.
◆ open()
| bool SMESH_File::open | ( | ) |
Open file for reading. Return true if there is something to read.
References close(), and size().
Referenced by openForWriting(), and SMESH_File().
◆ openForWriting()
◆ operator const char *()
| SMESH_File::operator const char * | ( | ) | const |
◆ operator++()
| bool SMESH_File::operator++ | ( | ) |
◆ operator+=()
| void SMESH_File::operator+= | ( | int | posDelta | ) |
◆ remove()
| bool SMESH_File::remove | ( | ) |
◆ rewind()
| void SMESH_File::rewind | ( | ) |
Move cursor to the file beginning.
Referenced by gzip_utf8.GzipFile::seek().
◆ setPos()
| void SMESH_File::setPos | ( | const char * | pos | ) |
Set cursor to the given position.
◆ size()
| long SMESH_File::size | ( | ) |
Return file size.
Referenced by PathScripts.PostUtils.GCodeEditorDialog::done(), and open().
◆ write() [1/2]
| bool SMESH_File::write | ( | const T & | value | ) |
Referenced by gzip_utf8.GzipFile::seek().
◆ write() [2/2]
| bool SMESH_File::write | ( | const T * | values, |
| size_t | nbTValues | ||
| ) |
Referenced by gzip_utf8.GzipFile::seek(), and writeRaw().
◆ writeRaw()
The documentation for this class was generated from the following files:
- src/3rdParty/salomesmesh/inc/SMESH_File.hxx
- src/3rdParty/salomesmesh/src/DriverSTL/SMESH_File.cpp
1.8.17