version 3.3

VRS::ObjectSaver Class Reference

Factory for object Export. More...

#include <vrs/io/objectsaver.h>

Inheritance diagram for VRS::ObjectSaver:

VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 VRS_TYPEINFO (ObjectSaver, SharedObj)

Static Public Member Functions

static bool install (ObjectWriter *)
static bool uninstall (ObjectWriter *)
static Iterator< SO
< ObjectWriter > > * 
objectWriters ()
 Add/remove an object writer.
static bool write (SharedObj *obj, const std::string &filename)
static SO< DataResourcewriteToMemory (SO< SharedObj > obj, const std::string &objectWriterID="")
static ObjectWriterlastWriter ()
static std::string supportedFileExtensions (SharedObj *obj, const std::string &prefix="*.", const std::string &separator=" ", const std::string &postfix="")
static std::string supportedFiles (SharedObj *obj, bool addFormatName=true, bool addParenthesis=true, const std::string &formatSeparator="\n", const std::string &extPrefix="*.", const std::string &extSeparator=" ", const std::string &extSuffix="")


Detailed Description

Factory for object Export.

Member Function Documentation

static bool VRS::ObjectSaver::install ( ObjectWriter  )  [static]

static bool VRS::ObjectSaver::uninstall ( ObjectWriter  )  [static]

static Iterator<SO<ObjectWriter> >* VRS::ObjectSaver::objectWriters (  )  [static]

Add/remove an object writer.

static bool VRS::ObjectSaver::write ( SharedObj obj,
const std::string &  filename 
) [static]

static SO<DataResource> VRS::ObjectSaver::writeToMemory ( SO< SharedObj obj,
const std::string &  objectWriterID = "" 
) [static]

static ObjectWriter* VRS::ObjectSaver::lastWriter (  )  [static]

'write' writes a SharedObj object to file named 'filename'. 'writeToMemory' writes the object to a data resource held in main memory. If an object has been written successfully, 'lastWriter' contains the pointer to the handler which actually wrote the object.

static std::string VRS::ObjectSaver::supportedFileExtensions ( SharedObj obj,
const std::string &  prefix = "*.",
const std::string &  separator = " ",
const std::string &  postfix = "" 
) [static]

Produces a string containing all file extensions that support the given targetType. The prefix will be placed befor each file extension, the postfix after each extension and the separator between two extensions. The default values will produce something like: "*.ppm *.pgm *.png".

static std::string VRS::ObjectSaver::supportedFiles ( SharedObj obj,
bool  addFormatName = true,
bool  addParenthesis = true,
const std::string &  formatSeparator = "\n",
const std::string &  extPrefix = "*.",
const std::string &  extSeparator = " ",
const std::string &  extSuffix = "" 
) [static]

Produces a string especially for Filedialogs. The default values will produce something like: "(Animated) GIF (*.gif)
JPEG (*.jpg *.jpeg)".

VRS::ObjectSaver::VRS_TYPEINFO ( ObjectSaver  ,
SharedObj   
)


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

Generated on Tue May 22 06:00:22 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact