osgDB::Output Class Reference

`#include <Output>`

Inheritance diagram for osgDB::Output:

## 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 Options *options)
const Options * | getOptions () const
void | setWriteOutDefaultValues (bool flag)
bool | getWriteOutDefaultValues () const
void | open (const char *name)
Output & | indent ()
std::string | wrapString (const char *str)
std::string | wrapString (const std::string &str)
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 ()
void | setOutputShaderFiles (bool flag)
bool | getOutputShaderFiles () const
virtual std::string | getShaderFileNameForOutput ()
void | setExternalFileWritten (const std::string &filename, bool hasBeenWritten=true)
bool | getExternalFileWritten (const std::string &filename) const
Public Member Functions inherited from osgDB::ofstream
OSGDB_EXPORT | ofstream ()
OSGDB_EXPORT | ofstream (const char *filename, std::ios_base::openmode mode=std::ios_base::out)
OSGDB_EXPORT | ~ofstream ()
void OSGDB_EXPORT | open (const char *filename, std::ios_base::openmode mode=std::ios_base::out)

## Protected Types

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

## Protected Member Functions

virtual void | init ()

## Protected Attributes

osg::ref_ptr< const Options > | _options
int | _indent
int | _indentStep
int | _numIndicesPerLine
UniqueIDToLabelMapping | _objectToUniqueIDMap
std::string | _filename
PathNameHint | _pathNameHint
bool | _outputTextureFiles
unsigned int | _textureFileNameNumber
bool | _outputShaderFiles
unsigned int | _shaderFileNameNumber
bool | _writeOutDefaultValues
ExternalFileWrittenMap | _externalFileWritten

## Detailed Description

deprecated.

## Member Typedef Documentation

## ExternalFileWrittenMap

typedef std::map<std::string, bool> osgDB::Output::ExternalFileWrittenMap

protected

## UniqueIDToLabelMapping

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

protected

## Member Enumeration Documentation

## PathNameHint

enum osgDB::Output::PathNameHint

Enumerator
AS_IS |
FULL_PATH |
RELATIVE_PATH |
FILENAME_ONLY |

## Constructor & Destructor Documentation

## Output() [1/2]

osgDB::Output::Output | ( |  | ) |

Referenced by indent().

## Output() [2/2]

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

## ~Output()

virtual osgDB::Output::~Output | ( |  | ) |

virtual

## Member Function Documentation

## createUniqueIDForObject()

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

## getExternalFileWritten()

bool osgDB::Output::getExternalFileWritten | ( | const std::string & | filename | ) | const

## getFileName()

const std::string & osgDB::Output::getFileName | ( |  | ) | const

inline

References _filename.

## getFileNameForOutput()

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

virtual

## getIndent()

int osgDB::Output::getIndent | ( |  | ) | const

inline

References _indent.

## getIndentStep()

int osgDB::Output::getIndentStep | ( |  | ) | const

inline

References _indentStep.

## getNumIndicesPerLine()

int osgDB::Output::getNumIndicesPerLine | ( |  | ) | const

inline

References _numIndicesPerLine.

Referenced by osgDB::writeArray(), and osgDB::writeArrayAsInts().

## getOptions()

const Options * osgDB::Output::getOptions | ( |  | ) | const

inline

References _options.

## getOutputShaderFiles()

bool osgDB::Output::getOutputShaderFiles | ( |  | ) | const

inline

References _outputShaderFiles.

## getOutputTextureFiles()

bool osgDB::Output::getOutputTextureFiles | ( |  | ) | const

inline

References _outputTextureFiles.

## getPathNameHint()

PathNameHint osgDB::Output::getPathNameHint | ( |  | ) | const

inline

References _pathNameHint.

## getShaderFileNameForOutput()

virtual std::string osgDB::Output::getShaderFileNameForOutput | ( |  | ) |

virtual

## getTextureFileNameForOutput()

virtual std::string osgDB::Output::getTextureFileNameForOutput | ( |  | ) |

virtual

## getUniqueIDForObject()

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

## getWriteOutDefaultValues()

bool osgDB::Output::getWriteOutDefaultValues | ( |  | ) | const

inline

References _writeOutDefaultValues.

## indent()

Output & osgDB::Output::indent | ( |  | ) |

References Output().

Referenced by setIndent(), osgDB::writeArray(), and osgDB::writeArrayAsInts().

## init()

virtual void osgDB::Output::init | ( |  | ) |

protected virtual

## moveIn()

void osgDB::Output::moveIn | ( |  | ) |

Referenced by osgDB::writeArray(), and osgDB::writeArrayAsInts().

## moveOut()

void osgDB::Output::moveOut | ( |  | ) |

Referenced by osgDB::writeArray(), and osgDB::writeArrayAsInts().

## open()

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

## registerUniqueIDForObject()

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

## setExternalFileWritten()

void osgDB::Output::setExternalFileWritten | ( | const std::string & | filename,
|  | bool | hasBeenWritten = true )

## setIndent()

void osgDB::Output::setIndent | ( | int | indent | ) |

inline

References _indent, and indent().

## setIndentStep()

void osgDB::Output::setIndentStep | ( | int | step | ) |

inline

References _indentStep.

## setNumIndicesPerLine()

void osgDB::Output::setNumIndicesPerLine | ( | int | num | ) |

inline

References _numIndicesPerLine.

## setOptions()

void osgDB::Output::setOptions | ( | const Options * | options | ) |

## setOutputShaderFiles()

void osgDB::Output::setOutputShaderFiles | ( | bool | flag | ) |

inline

References _outputShaderFiles.

## setOutputTextureFiles()

void osgDB::Output::setOutputTextureFiles | ( | bool | flag | ) |

inline

References _outputTextureFiles.

## setPathNameHint()

void osgDB::Output::setPathNameHint | ( | const PathNameHint | pnh | ) |

inline

References _pathNameHint.

## setWriteOutDefaultValues()

void osgDB::Output::setWriteOutDefaultValues | ( | bool | flag | ) |

inline

References _writeOutDefaultValues.

## wrapString() [1/2]

std::string osgDB::Output::wrapString | ( | const char * | str | ) |

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

## wrapString() [2/2]

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

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

## writeBeginObject()

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

virtual

## writeEndObject()

virtual void osgDB::Output::writeEndObject | ( |  | ) |

virtual

## writeObject()

virtual bool osgDB::Output::writeObject | ( | const osg::Object & | obj | ) |

virtual

## writeUniqueID()

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

virtual

## writeUseID()

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

virtual

## Member Data Documentation

## _externalFileWritten

ExternalFileWrittenMap osgDB::Output::_externalFileWritten

protected

## _filename

std::string osgDB::Output::_filename

protected

Referenced by getFileName().

## _indent

int osgDB::Output::_indent

protected

Referenced by getIndent(), and setIndent().

## _indentStep

int osgDB::Output::_indentStep

protected

Referenced by getIndentStep(), and setIndentStep().

## _numIndicesPerLine

int osgDB::Output::_numIndicesPerLine

protected

Referenced by getNumIndicesPerLine(), and setNumIndicesPerLine().

## _objectToUniqueIDMap

UniqueIDToLabelMapping osgDB::Output::_objectToUniqueIDMap

protected

## _options

osg::ref_ptr<const Options> osgDB::Output::_options

protected

Referenced by getOptions().

## _outputShaderFiles

bool osgDB::Output::_outputShaderFiles

protected

Referenced by getOutputShaderFiles(), and setOutputShaderFiles().

## _outputTextureFiles

bool osgDB::Output::_outputTextureFiles

protected

Referenced by getOutputTextureFiles(), and setOutputTextureFiles().

## _pathNameHint

PathNameHint osgDB::Output::_pathNameHint

protected

Referenced by getPathNameHint(), and setPathNameHint().

## _shaderFileNameNumber

unsigned int osgDB::Output::_shaderFileNameNumber

protected

## _textureFileNameNumber

unsigned int osgDB::Output::_textureFileNameNumber

protected

## _writeOutDefaultValues

bool osgDB::Output::_writeOutDefaultValues

protected

Referenced by getWriteOutDefaultValues(), and setWriteOutDefaultValues().

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

- Output