#include <nanoply.hpp>
Public Member Functions | |
void | Flush () |
bool | NextHeaderLine (std::string &line, bool &last) |
bool | OpenFileToRead (const std::string &filename) |
bool | OpenFileToWrite (const std::string &filename) |
PlyFile () | |
template<typename T > | |
bool | ReadAsciiData (T &dest) |
bool | ReadBinaryData (void *dest, int nByte) |
void | SetBufferSize (int64_t size) |
template<typename T > | |
bool | WriteAsciiData (T &src) |
bool | WriteBinaryData (void *src, int nByte) |
bool | WriteHeaderLine (std::string &line) |
~PlyFile () | |
Private Attributes | |
char * | buffer |
int64_t | bufferOffset |
int64_t | bufferSize |
std::fstream | fileStream |
int64_t | maxSize |
char | mode |
PLY File. Class to manage the read and write of a PLY file using a memory buffer.
Definition at line 306 of file nanoply.hpp.
Definition at line 406 of file nanoply.hpp.
Definition at line 414 of file nanoply.hpp.
void nanoply::PlyFile::Flush | ( | ) |
Force the write of the buffer in the file.
Definition at line 544 of file nanoply.hpp.
bool nanoply::PlyFile::NextHeaderLine | ( | std::string & | line, |
bool & | last | ||
) |
Read the next header line.
line | read line. |
last | true if the line is the last of header. |
Definition at line 452 of file nanoply.hpp.
bool nanoply::PlyFile::OpenFileToRead | ( | const std::string & | filename | ) |
Open the file in read mode.
filename | name of the file. |
Definition at line 424 of file nanoply.hpp.
bool nanoply::PlyFile::OpenFileToWrite | ( | const std::string & | filename | ) |
Open the file in write mode.
filename | name of the file. |
Definition at line 437 of file nanoply.hpp.
bool nanoply::PlyFile::ReadAsciiData | ( | T & | dest | ) |
Read ASCII data from the file.
dest | reference to the container of the data. |
Definition at line 500 of file nanoply.hpp.
bool nanoply::PlyFile::ReadBinaryData | ( | void * | dest, |
int | nByte | ||
) |
Read binary data from the file.
dest | pointer where to copy the data. |
nByte | number of byte to read. |
Definition at line 474 of file nanoply.hpp.
void nanoply::PlyFile::SetBufferSize | ( | int64_t | size | ) |
Set the maximum size of the buffer.
Definition at line 538 of file nanoply.hpp.
bool nanoply::PlyFile::WriteAsciiData | ( | T & | src | ) |
Write ASCII data in the file.
src | reference to the container of the data. |
Definition at line 530 of file nanoply.hpp.
bool nanoply::PlyFile::WriteBinaryData | ( | void * | src, |
int | nByte | ||
) |
Write binary data in the file.
src | pointer to the data to write. |
nByte | number of byte to write. |
Definition at line 508 of file nanoply.hpp.
bool nanoply::PlyFile::WriteHeaderLine | ( | std::string & | line | ) |
Write the line in the header.
line | line to write. |
Definition at line 465 of file nanoply.hpp.
char* nanoply::PlyFile::buffer [private] |
Buffer.
Definition at line 315 of file nanoply.hpp.
int64_t nanoply::PlyFile::bufferOffset [private] |
Offset for the next operation.
Definition at line 313 of file nanoply.hpp.
int64_t nanoply::PlyFile::bufferSize [private] |
Size of the buffer.
Definition at line 312 of file nanoply.hpp.
std::fstream nanoply::PlyFile::fileStream [private] |
Stream.
Definition at line 309 of file nanoply.hpp.
int64_t nanoply::PlyFile::maxSize [private] |
Maximum size of the stream.
Definition at line 314 of file nanoply.hpp.
char nanoply::PlyFile::mode [private] |
Mode of the stream (0 = read, 1 = write).
Definition at line 310 of file nanoply.hpp.