osgDB::Output Class Reference

ofstream wrapper class for adding support for indenting. More...

List of all members.

Public Types

enum  PathNameHint { AS_IS, FULL_PATH, RELATIVE_PATH, FILENAME_ONLY }

Public Member Functions

 Output ()
 Output (const char *name)
virtual ~Output ()
void setOptions (const ReaderWriter::Options *options)
const
ReaderWriter::Options
getOptions () const
void setWriteOutDefaultValues (bool flag)
bool getWriteOutDefaultValues () const
void open (const char *name)
Outputindent ()
std::string wrapString (const std::string &str)
 wrap a string with "" quotes and use \" for any internal quotes.
void setIndentStep (int step)
int getIndentStep () const
void setIndent (int indent)
int getIndent () const
void setNumIndicesPerLine (int num)
int getNumIndicesPerLine () const
void moveIn ()
void moveOut ()
virtual bool writeObject (const osg::Object &obj)
virtual void writeBeginObject (const std::string &name)
virtual void writeEndObject ()
virtual void writeUseID (const std::string &id)
virtual void writeUniqueID (const std::string &id)
bool getUniqueIDForObject (const osg::Object *obj, std::string &uniqueID)
bool createUniqueIDForObject (const osg::Object *obj, std::string &uniqueID)
bool registerUniqueIDForObject (const osg::Object *obj, std::string &uniqueID)
void setPathNameHint (const PathNameHint pnh)
PathNameHint getPathNameHint () const
virtual std::string getFileNameForOutput (const std::string &filename) const
const std::string & getFileName () const
void setOutputTextureFiles (bool flag)
bool getOutputTextureFiles () const
virtual std::string getTextureFileNameForOutput ()

Protected Types

typedef std::map
< const osg::Object *,
std::string > 
UniqueIDToLabelMapping

Protected Member Functions

virtual void init ()

Protected Attributes

osg::ref_ptr< const
ReaderWriter::Options
_options
int _indent
int _indentStep
int _numIndicesPerLine
UniqueIDToLabelMapping _objectToUniqueIDMap
std::string _filename
PathNameHint _pathNameHint
bool _outputTextureFiles
unsigned int _textureFileNameNumber
bool _writeOutDefaultValues


Detailed Description

ofstream wrapper class for adding support for indenting.

Used in output of .osg ASCII files to improve their readability.


Member Typedef Documentation

typedef std::map<const osg::Object*,std::string> osgDB::Output::UniqueIDToLabelMapping [protected]


Member Enumeration Documentation

enum osgDB::Output::PathNameHint

Enumerator:
AS_IS 
FULL_PATH 
RELATIVE_PATH 
FILENAME_ONLY 


Constructor & Destructor Documentation

osgDB::Output::Output (  ) 

osgDB::Output::Output ( const char *  name  ) 

virtual osgDB::Output::~Output (  )  [virtual]


Member Function Documentation

void osgDB::Output::setOptions ( const ReaderWriter::Options options  ) 

const ReaderWriter::Options* osgDB::Output::getOptions (  )  const [inline]

void osgDB::Output::setWriteOutDefaultValues ( bool  flag  )  [inline]

bool osgDB::Output::getWriteOutDefaultValues (  )  const [inline]

void osgDB::Output::open ( const char *  name  ) 

Output& osgDB::Output::indent (  ) 

std::string osgDB::Output::wrapString ( const std::string &  str  ) 

wrap a string with "" quotes and use \" for any internal quotes.

void osgDB::Output::setIndentStep ( int  step  )  [inline]

int osgDB::Output::getIndentStep (  )  const [inline]

void osgDB::Output::setIndent ( int  indent  )  [inline]

int osgDB::Output::getIndent (  )  const [inline]

void osgDB::Output::setNumIndicesPerLine ( int  num  )  [inline]

int osgDB::Output::getNumIndicesPerLine (  )  const [inline]

void osgDB::Output::moveIn (  ) 

void osgDB::Output::moveOut (  ) 

virtual bool osgDB::Output::writeObject ( const osg::Object obj  )  [virtual]

virtual void osgDB::Output::writeBeginObject ( const std::string &  name  )  [virtual]

virtual void osgDB::Output::writeEndObject (  )  [virtual]

virtual void osgDB::Output::writeUseID ( const std::string &  id  )  [virtual]

virtual void osgDB::Output::writeUniqueID ( const std::string &  id  )  [virtual]

bool osgDB::Output::getUniqueIDForObject ( const osg::Object obj,
std::string &  uniqueID 
)

bool osgDB::Output::createUniqueIDForObject ( const osg::Object obj,
std::string &  uniqueID 
)

bool osgDB::Output::registerUniqueIDForObject ( const osg::Object obj,
std::string &  uniqueID 
)

void osgDB::Output::setPathNameHint ( const PathNameHint  pnh  )  [inline]

PathNameHint osgDB::Output::getPathNameHint (  )  const [inline]

virtual std::string osgDB::Output::getFileNameForOutput ( const std::string &  filename  )  const [virtual]

const std::string& osgDB::Output::getFileName (  )  const [inline]

void osgDB::Output::setOutputTextureFiles ( bool  flag  )  [inline]

bool osgDB::Output::getOutputTextureFiles (  )  const [inline]

virtual std::string osgDB::Output::getTextureFileNameForOutput (  )  [virtual]

virtual void osgDB::Output::init (  )  [protected, virtual]


Member Data Documentation

osg::ref_ptr<const ReaderWriter::Options> osgDB::Output::_options [protected]

int osgDB::Output::_indent [protected]

int osgDB::Output::_indentStep [protected]

int osgDB::Output::_numIndicesPerLine [protected]

UniqueIDToLabelMapping osgDB::Output::_objectToUniqueIDMap [protected]

std::string osgDB::Output::_filename [protected]

PathNameHint osgDB::Output::_pathNameHint [protected]

bool osgDB::Output::_outputTextureFiles [protected]

unsigned int osgDB::Output::_textureFileNameNumber [protected]

bool osgDB::Output::_writeOutDefaultValues [protected]


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:20 2007 for the OpenSceneGraph by doxygen 1.5.3.