osg::Indenter Class Reference
[StringConversion]

#include <OSGIndenter.h>

List of all members.

Public Member Functions

Constructors


 Indenter (UInt32 indent=0, UInt32 step=4)
 Indenter (const Indenter &source)
Destructor


virtual ~Indenter (void)
Get


UInt32 getIndent (void) const
UInt32 getStep (void) const
std::string str (void) const
Set


void setIndent (UInt32 indent)
void setStep (UInt32 step)
operators


void operator++ (int)
void operator++ (void)
void operator-- (int)
void operator-- (void)
Indenteroperator= (const Indenter &source)

Protected Attributes

Member


UInt32 _indent
UInt32 _step


Detailed Description

Definition at line 61 of file OSGIndenter.h.


Constructor & Destructor Documentation

Indenter::Indenter ( UInt32  indent = 0,
UInt32  step = 4 
)

Constructor documentation

Definition at line 64 of file OSGIndenter.cpp.

00064                                              :
00065     _indent(indent), _step(step)
00066 {
00067 }

Indenter::Indenter ( const Indenter source  ) 

Constructor documentation

Definition at line 69 of file OSGIndenter.cpp.

00069                                          :
00070     _indent(source._indent), 
00071     _step  (source._step  )
00072 {
00073 }

Indenter::~Indenter ( void   )  [virtual]

Definition at line 78 of file OSGIndenter.cpp.

00079 {
00080 }


Member Function Documentation

UInt32 osg::Indenter::getIndent ( void   )  const [inline]

Definition at line 48 of file OSGIndenter.inl.

References _indent.

Referenced by osg::StandardStringConversionState::getIndent(), osg::operator<<(), and osg::OSGWriter::writeField().

00049 {
00050     return _indent;
00051 }

UInt32 osg::Indenter::getStep ( void   )  const [inline]

Definition at line 54 of file OSGIndenter.inl.

References _step.

00055 {
00056     return _step;
00057 }

std::string osg::Indenter::str ( void   )  const [inline]

Definition at line 60 of file OSGIndenter.inl.

References _indent.

Referenced by osg::StandardStringConversionState::addValueStr(), and osg::StandardStringConversionState::beginField().

00061 {
00062     std::string indStr;
00063 
00064     for(UInt32 i = 0; i < _indent; i++)
00065     {
00066         indStr.append(" ");
00067     }
00068 
00069     return indStr;
00070 }

void osg::Indenter::setIndent ( UInt32  indent  )  [inline]

Definition at line 73 of file OSGIndenter.inl.

References _indent.

Referenced by osg::StandardStringConversionState::setIndent(), and osg::OSGWriter::write().

00074 {
00075     _indent = indent;
00076 }

void osg::Indenter::setStep ( UInt32  step  )  [inline]

Definition at line 79 of file OSGIndenter.inl.

References _step.

00080 {
00081     _step = step;
00082 }

void osg::Indenter::operator++ ( int   )  [inline]

increase indent by _step

Definition at line 88 of file OSGIndenter.inl.

References _indent, and _step.

00089 {
00090     _indent += _step;
00091 }

void osg::Indenter::operator++ ( void   )  [inline]

increase indent by _step

Definition at line 97 of file OSGIndenter.inl.

References _indent, and _step.

00098 {
00099     _indent += _step;
00100 }

void osg::Indenter::operator-- ( int   )  [inline]

decrease indent by _step

Definition at line 107 of file OSGIndenter.inl.

References _indent, and _step.

00108 {
00109     _indent -= _step;
00110 }

void osg::Indenter::operator-- ( void   )  [inline]

decrease indent by _step

Definition at line 117 of file OSGIndenter.inl.

References _indent, and _step.

00118 {
00119     _indent -= _step;
00120 }

Indenter & Indenter::operator= ( const Indenter source  ) 

increase indent by _step

Definition at line 85 of file OSGIndenter.cpp.

References _indent, and _step.

00086 {
00087     if(this == &source)
00088         return *this;
00089 
00090     this->_indent = source._indent;
00091     this->_step   = source._step;
00092 
00093     return *this;
00094 }


Member Data Documentation

Definition at line 122 of file OSGIndenter.h.

Referenced by getIndent(), operator++(), operator--(), operator=(), setIndent(), and str().

Definition at line 123 of file OSGIndenter.h.

Referenced by getStep(), operator++(), operator--(), operator=(), and setStep().


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

Generated on Mon Mar 17 12:03:57 2008 for OpenSG by  doxygen 1.5.5