# 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 | open (const char *name)
Output & | indent ()
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)
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

## Protected Types

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

## Protected Member Functions

virtual void | init ()

## Protected Attributes

int | _indent
int | _indentStep
int | _numIndicesPerLine
UniqueIDToLabelMapping | _objectToUniqueIDMap
std::string | _filename
PathNameHint | _pathNameHint

## 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

Enumeration values:

  AS_IS |
  FULL_PATH |
  RELATIVE_PATH |
  FILENAME_ONLY |

## Constructor & Destructor Documentation

Output::Output | ( |  | ) |

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

Output::~Output | ( |  | ) | `[virtual]`

## Member Function Documentation

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

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

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

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

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

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

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

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

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

void Output::init | ( |  | ) | `[protected, virtual]`

void Output::moveIn | ( |  | ) |

void Output::moveOut | ( |  | ) |

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

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

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

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

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

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

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

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

bool Output::writeObject | ( | const osg::Object & | obj | ) | `[virtual]`

## Member Data Documentation

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

int osgDB::Output::_indent `[protected]`

int osgDB::Output::_indentStep `[protected]`

int osgDB::Output::_numIndicesPerLine `[protected]`

UniqueIDToLabelMapping osgDB::Output::_objectToUniqueIDMap `[protected]`

PathNameHint osgDB::Output::_pathNameHint `[protected]`

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

- Output
- Output.cpp