Public Member Functions | |
| VtkFile (std::istream *stream) | |
| const char * | getCurrentLine () |
| Allows returning the line present in the buffer. | |
| bool | isEmptyNextLine () |
| Allows checking if the next line is empty. | |
| const char * | getNextLine () |
| Allows retrieving the next line from the file. | |
| void | checkString (const String ¤t_value, const String &expected_value) |
| Allows checking if expected_value == current_value. | |
| void | checkString (const String ¤t_value, const String &expected_value1, const String &expected_value2) |
| Allows checking if expected_value1 or expected_value2 == current_value. | |
| void | reReadSameLine () |
| bool | isEof () |
| template<class T> | |
| void | getBinary (T &type) |
| Allows retrieving the next binary number. | |
| float | getFloat () |
| Allows retrieving the following float. | |
| double | getDouble () |
| Allows retrieving the next double. | |
| int | getInt () |
| Allows retrieving the next integer. | |
| void | setIsBinaryFile (bool new_val) |
Static Public Member Functions | |
| static bool | isEqualString (const String ¤t_value, const String &expected_value) |
| Allows checking if expected_value == current_value. | |
Static Public Attributes | |
| static const int | BUFSIZE = 10000 |
Private Attributes | |
| std::istream * | m_stream = nullptr |
| The stream. | |
| bool | m_is_init |
| Has at least one line been read. | |
| bool | m_need_reread_current_line |
| Should the same line be reread. | |
| bool | m_is_eof |
| Is the end of the file reached. | |
| bool | m_is_binary_file |
| Is this a file containing binary data. | |
| char | m_buf [BUFSIZE] |
| The buffer containing the read line. | |
Definition at line 169 of file VtkMeshIOService.cc.
|
inlineexplicit |
Definition at line 177 of file VtkMeshIOService.cc.
Allows checking if expected_value == current_value.
Allows checking if expected_value matches current_value. An exception is thrown otherwise.
| current_value | the reference value |
| expected_value | the value to compare |
Definition at line 517 of file VtkMeshIOService.cc.
References ARCANE_THROW, and Arcane::String::lower().
Referenced by Arcane::VtkMeshIOService::_readCellsUnstructuredGrid(), Arcane::VtkMeshIOService::_readFacesMesh(), Arcane::VtkMeshIOService::_readNodesUnstructuredGrid(), Arcane::VtkMeshIOService::_readStructuredGrid(), and Arcane::VtkMeshIOService::readMesh().
| void Arcane::VtkFile::checkString | ( | const String & | current_value, |
| const String & | expected_value1, | ||
| const String & | expected_value2 ) |
Allows checking if expected_value1 or expected_value2 == current_value.
Allows checking if expected_value1 or expected_value2 matches current_value. An exception is thrown otherwise.
| current_value | the reference value |
| expected_value1 | the first value to compare |
| expected_value2 | the second value to compare |
Definition at line 541 of file VtkMeshIOService.cc.
References ARCANE_THROW, and Arcane::String::lower().
| void Arcane::VtkFile::getBinary | ( | T & | value | ) |
Allows retrieving the next binary number.
| value | The reference to the variable to be filled (the type of value tells us the number of bytes to read). |
Definition at line 483 of file VtkMeshIOService.cc.
References m_stream.
Referenced by getDouble(), getFloat(), and getInt().
| const char * Arcane::VtkFile::getCurrentLine | ( | ) |
Allows returning the line present in the buffer.
Definition at line 238 of file VtkMeshIOService.cc.
References getNextLine(), m_buf, and m_is_init.
Referenced by getNextLine().
| double Arcane::VtkFile::getDouble | ( | ) |
Allows retrieving the next double.
Definition at line 434 of file VtkMeshIOService.cc.
References ARCANE_THROW, getBinary(), m_is_binary_file, and m_stream.
Referenced by Arcane::VtkMeshIOService::_readCellVariable(), Arcane::VtkMeshIOService::_readNodesUnstructuredGrid(), and Arcane::VtkMeshIOService::_readStructuredGrid().
| float Arcane::VtkFile::getFloat | ( | ) |
Allows retrieving the following float.
Definition at line 410 of file VtkMeshIOService.cc.
References ARCANE_THROW, getBinary(), m_is_binary_file, and m_stream.
Referenced by Arcane::VtkMeshIOService::_readNodesUnstructuredGrid(), and Arcane::VtkMeshIOService::_readStructuredGrid().
| int Arcane::VtkFile::getInt | ( | ) |
Allows retrieving the next integer.
Definition at line 458 of file VtkMeshIOService.cc.
References ARCANE_THROW, getBinary(), m_is_binary_file, and m_stream.
Referenced by Arcane::VtkMeshIOService::_readCellsUnstructuredGrid(), Arcane::VtkMeshIOService::_readItemGroup(), Arcane::VtkMeshIOService::_readNodeGroup(), Arcane::VtkMeshIOService::_readNodesUnstructuredGrid(), and Arcane::VtkMeshIOService::_readStructuredGrid().
| const char * Arcane::VtkFile::getNextLine | ( | ) |
Allows retrieving the next line from the file.
Definition at line 340 of file VtkMeshIOService.cc.
References ARCANE_THROW, getCurrentLine(), m_buf, m_is_eof, m_is_init, m_need_reread_current_line, and m_stream.
Referenced by Arcane::VtkMeshIOService::_readCellsUnstructuredGrid(), Arcane::VtkMeshIOService::_readData(), Arcane::VtkMeshIOService::_readFacesMesh(), Arcane::VtkMeshIOService::_readMetadata(), Arcane::VtkMeshIOService::_readNodesUnstructuredGrid(), Arcane::VtkMeshIOService::_readStructuredGrid(), getCurrentLine(), isEmptyNextLine(), and Arcane::VtkMeshIOService::readMesh().
| bool Arcane::VtkFile::isEmptyNextLine | ( | ) |
Allows checking if the next line is empty.
At the end of this method, the buffer will contain the next non-empty line. The boolean m_need_reread_current_line will allow getNextLine to return this line which has not been read.
Definition at line 257 of file VtkMeshIOService.cc.
References ARCANE_THROW, getNextLine(), m_buf, m_is_eof, m_is_init, m_need_reread_current_line, and m_stream.
Referenced by Arcane::VtkMeshIOService::_readMetadata().
|
inline |
Definition at line 199 of file VtkMeshIOService.cc.
|
static |
Allows checking if expected_value == current_value.
Allows checking if expected_value matches current_value.
| current_value | the reference value |
| expected_value | the value to compare |
Definition at line 565 of file VtkMeshIOService.cc.
References Arcane::String::lower().
Referenced by Arcane::VtkMeshIOService::_readData(), Arcane::VtkMeshIOService::_readFacesMesh(), Arcane::VtkMeshIOService::_readMetadata(), Arcane::VtkMeshIOService::_readNodesUnstructuredGrid(), Arcane::VtkMeshIOService::_readStructuredGrid(), and Arcane::VtkMeshIOService::readMesh().
|
inline |
Definition at line 197 of file VtkMeshIOService.cc.
|
inline |
Definition at line 207 of file VtkMeshIOService.cc.
|
static |
Definition at line 173 of file VtkMeshIOService.cc.
|
private |
The buffer containing the read line.
Definition at line 227 of file VtkMeshIOService.cc.
Referenced by getCurrentLine(), getNextLine(), and isEmptyNextLine().
|
private |
Is this a file containing binary data.
Definition at line 224 of file VtkMeshIOService.cc.
Referenced by getDouble(), getFloat(), and getInt().
|
private |
Is the end of the file reached.
Definition at line 221 of file VtkMeshIOService.cc.
Referenced by getNextLine(), and isEmptyNextLine().
|
private |
Has at least one line been read.
Definition at line 215 of file VtkMeshIOService.cc.
Referenced by getCurrentLine(), getNextLine(), and isEmptyNextLine().
|
private |
Should the same line be reread.
Definition at line 218 of file VtkMeshIOService.cc.
Referenced by getNextLine(), and isEmptyNextLine().
|
private |
The stream.
Definition at line 212 of file VtkMeshIOService.cc.
Referenced by getBinary(), getDouble(), getFloat(), getInt(), getNextLine(), and isEmptyNextLine().