Public Member Functions | Private Attributes
nanoply::PlyFile Class Reference

#include <nanoply.hpp>

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

Definition at line 406 of file nanoply.hpp.

Definition at line 414 of file nanoply.hpp.


Member Function Documentation

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.

Parameters:
lineread line.
lasttrue if the line is the last of header.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 452 of file nanoply.hpp.

bool nanoply::PlyFile::OpenFileToRead ( const std::string &  filename)

Open the file in read mode.

Parameters:
filenamename of the file.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 424 of file nanoply.hpp.

bool nanoply::PlyFile::OpenFileToWrite ( const std::string &  filename)

Open the file in write mode.

Parameters:
filenamename of the file.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 437 of file nanoply.hpp.

template<typename T >
bool nanoply::PlyFile::ReadAsciiData ( T dest)

Read ASCII data from the file.

Parameters:
destreference to the container of the data.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 500 of file nanoply.hpp.

bool nanoply::PlyFile::ReadBinaryData ( void *  dest,
int  nByte 
)

Read binary data from the file.

Parameters:
destpointer where to copy the data.
nBytenumber of byte to read.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 474 of file nanoply.hpp.

void nanoply::PlyFile::SetBufferSize ( int64_t  size)

Set the maximum size of the buffer.

Returns:
size size of the buffer.

Definition at line 538 of file nanoply.hpp.

template<typename T >
bool nanoply::PlyFile::WriteAsciiData ( T src)

Write ASCII data in the file.

Parameters:
srcreference to the container of the data.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 530 of file nanoply.hpp.

bool nanoply::PlyFile::WriteBinaryData ( void *  src,
int  nByte 
)

Write binary data in the file.

Parameters:
srcpointer to the data to write.
nBytenumber of byte to write.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 508 of file nanoply.hpp.

bool nanoply::PlyFile::WriteHeaderLine ( std::string &  line)

Write the line in the header.

Parameters:
lineline to write.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 465 of file nanoply.hpp.


Member Data Documentation

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.


The documentation for this class was generated from the following file:


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:41:09