version 3.3

VRS::ObjectWriter Class Reference

#include <vrs/io/objectwriter.h>

Inheritance diagram for VRS::ObjectWriter:

VRS::SharedObj VRS::Visitable VRS::BinaryObjectWriter VRS::BMPWriter VRS::CompressedImageWriter VRS::FColladaWriter VRS::GIFWriter VRS::IrisWriter VRS::JPEGWriter VRS::OBJWriter VRS::PNGWriter VRS::PPMWriter VRS::Serializer VRS::TIFFWriter

List of all members.

Public Member Functions

virtual bool canHandle (SharedObj *obj) const =0
virtual void write (SharedObj *obj, const std::string &filename) const =0
virtual SO< DataResourcewriteToMemory (SO< SharedObj > obj) const
virtual const char * objectFormatName () const =0
virtual const char * objectFileSuffix () const =0
virtual double priority () const
 VRS_TYPEINFO (ObjectWriter, SharedObj)


Detailed Description

Base Class for Object Writer Classes. An object writer class is responsible for writting objects of certain types into a stream.

Member Function Documentation

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]

VRS::ObjectWriter::VRS_TYPEINFO ( ObjectWriter  ,
SharedObj   
)


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

Generated on Thu May 23 06:00:26 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact