## class OSGDB_EXPORT osgDB::Output

> ofstream wrapper class for adding support for indenting.

## Inheritance:

### Public Methods

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
inline void setIndentStep(int step)
inline int getIndentStep() const
inline void setIndent(int indent)
inline int getIndent() const
inline void setNumIndicesPerLine(int num)
inline 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)
inline void setPathNameHint(const PathNameHint pnh)
inline PathNameHint getPathNameHint() const
virtual std::string getFileNameForOutput(const std::string& filename) const

### Public Members

enum PathNameHint

### Protected Fields

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

### Protected Methods

virtual void init()

### Protected Members

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

## Documentation

> ofstream wrapper class for adding support for indenting. Used in output of .osg ASCII files to improve their readability.

`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

`inline void setIndentStep(int step)`

`inline int getIndentStep() const`

`inline void setIndent(int indent)`

`inline int getIndent() const`

`inline void setNumIndicesPerLine(int num)`

`inline 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)`

`enum PathNameHint`

`AS_IS`

`FULL_PATH`

`RELATIVE_PATH`

`FILENAME_ONLY`

`inline void setPathNameHint(const PathNameHint pnh)`

`inline PathNameHint getPathNameHint() const`

`virtual std::string getFileNameForOutput(const std::string& filename) const`

`virtual void init()`

`int _indent`

`int _indentStep`

`int _numIndicesPerLine`

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

`UniqueIDToLabelMapping _objectToUniqueIDMap`

`std::string _filename`

`PathNameHint _pathNameHint`

This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java

This page was generated with the help of DOC++.