Class ModelIOBase

Inheritance Relationships

Derived Types

Class Documentation

class ModelIOBase

Interface specification for low-level io. All read elements are stored in linear arrays.

Subclassed by lvr2::AsciiIO, lvr2::DatIO, lvr2::DrcIO, lvr2::LasIO, lvr2::ObjIO, lvr2::PCDIO, lvr2::PLYIO, lvr2::RdbxIO, lvr2::RxpIO, lvr2::STLIO, lvr2::UosIO, lvr2::WaveformIO

Public Functions

ModelIOBase() = default
virtual ~ModelIOBase() = default
virtual ModelPtr read(std::string filename) = 0

Parse the given file and load supported elements.

Parameters:

filename – The file to read.

virtual void save(std::string filename) = 0

Save the loaded elements to the given file.

Parameters:

filename – Filename of the file to write.

virtual void save(ModelPtr model, std::string filename)

Set the model and save the loaded elements to the given file.

Parameters:

filename – Filename of the file to write.

virtual void setModel(ModelPtr m)

Set the model for io operations to use.

Parameters:

m – Shared pointer to model.

virtual ModelPtr getModel()

Get the model for io operations.

Returns:

Shared pointer to model.

Protected Attributes

ModelPtr m_model