| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/io/objectwriter.h>

Public Member Functions | |
| virtual bool | canHandle (SharedObj *obj) const =0 |
| virtual void | write (SharedObj *obj, const std::string &filename) const =0 |
| virtual SO< DataResource > | writeToMemory (SO< SharedObj > obj) const |
| virtual const char * | objectFormatName () const =0 |
| virtual const char * | objectFileSuffix () const =0 |
| virtual double | priority () const |
| VRS_TYPEINFO (ObjectWriter, SharedObj) | |
| virtual bool VRS::ObjectWriter::canHandle | ( | SharedObj * | obj | ) | const [pure virtual] |
| virtual void VRS::ObjectWriter::write | ( | SharedObj * | obj, | |
| const std::string & | filename | |||
| ) | const [pure virtual] |
`canHandle' checks whether a concrete writer class can handle a given object or not. `write' will output the object to a file with filename. In the case of i/o errors, an exception of type IOError is thrown. 'write' assumes that the object passed can be handled, i.e., 'canHandle' must return true for that object.
Implemented in VRS::BinaryObjectWriter, VRS::BMPWriter, VRS::CompressedImageWriter, VRS::FColladaWriter, VRS::GIFWriter, VRS::IrisWriter, VRS::JPEGWriter, VRS::OBJWriter, VRS::PNGWriter, VRS::PPMWriter, VRS::Serializer, and VRS::TIFFWriter.
| virtual SO<DataResource> VRS::ObjectWriter::writeToMemory | ( | SO< SharedObj > | obj | ) | const [virtual] |
This method encodes the given object in the corresponding file format of the concrete object writer and provides the result in main memory. The default implementation of this method writes the given object to a temporary file and copies back the content into the main memory. More efficient implementations can be realized by sub classes!
Reimplemented in VRS::PNGWriter.
| virtual const char* VRS::ObjectWriter::objectFormatName | ( | ) | const [pure virtual] |
| virtual const char* VRS::ObjectWriter::objectFileSuffix | ( | ) | const [pure virtual] |
`objectFormatName' gives a verbose description of the file format that is written to. `objectFileSuffix' is the most widely used suffix used for this format.
Implemented in VRS::BinaryObjectWriter, VRS::BMPWriter, VRS::CompressedImageWriter, VRS::FColladaWriter, VRS::GIFWriter, VRS::IrisWriter, VRS::JPEGWriter, VRS::OBJWriter, VRS::PNGWriter, VRS::PPMWriter, VRS::Serializer, and VRS::TIFFWriter.
| virtual double VRS::ObjectWriter::priority | ( | ) | const [inline, virtual] |
Reimplemented in VRS::BinaryObjectWriter, VRS::FColladaWriter, VRS::OBJWriter, and VRS::Serializer.
| VRS::ObjectWriter::VRS_TYPEINFO | ( | ObjectWriter | , | |
| SharedObj | ||||
| ) |