osgViewer::ScreenCaptureHandler::WriteToFile Class Reference

`#include <ViewerEventHandlers>`

Inheritance diagram for osgViewer::ScreenCaptureHandler::WriteToFile:

## Public Types

enum | SavePolicy { OVERWRITE , SEQUENTIAL_NUMBER }

## Public Member Functions

| WriteToFile (const std::string &filename, const std::string &extension, SavePolicy savePolicy=SEQUENTIAL_NUMBER)
virtual void | operator() (const osg::Image &image, const unsigned int context_id)
void | setSavePolicy (SavePolicy savePolicy)
SavePolicy | getSavePolicy () const
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
virtual void | setThreadSafeRefUnref (bool)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Protected Member Functions

WriteToFile & | operator= (const WriteToFile &)
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Protected Attributes

const std::string | _filename
const std::string | _extension
SavePolicy | _savePolicy
std::vector< unsigned int > | _contextSaveCounter
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Detailed Description

Concrete implementation of a CaptureOperation that writes the screen capture to a file.

## Member Enumeration Documentation

## SavePolicy

enum osgViewer::ScreenCaptureHandler::WriteToFile::SavePolicy

Enumerator
OVERWRITE |
SEQUENTIAL_NUMBER |

## Constructor & Destructor Documentation

## WriteToFile()

osgViewer::ScreenCaptureHandler::WriteToFile::WriteToFile | ( | const std::string & | filename,
|  | const std::string & | extension,
|  | SavePolicy | savePolicy = SEQUENTIAL_NUMBER )

References SEQUENTIAL_NUMBER.

Referenced by operator=().

## Member Function Documentation

## getSavePolicy()

SavePolicy osgViewer::ScreenCaptureHandler::WriteToFile::getSavePolicy | ( |  | ) | const

inline

References _savePolicy.

## operator()()

virtual void osgViewer::ScreenCaptureHandler::WriteToFile::operator() | ( | const osg::Image & | image,
|  | const unsigned int | context_id )

virtual

Implements osgViewer::ScreenCaptureHandler::CaptureOperation.

## operator=()

WriteToFile & osgViewer::ScreenCaptureHandler::WriteToFile::operator= | ( | const WriteToFile & |  | ) |

inline protected

References WriteToFile().

## setSavePolicy()

void osgViewer::ScreenCaptureHandler::WriteToFile::setSavePolicy | ( | SavePolicy | savePolicy | ) |

inline

References _savePolicy.

## Member Data Documentation

## _contextSaveCounter

std::vector<unsigned int> osgViewer::ScreenCaptureHandler::WriteToFile::_contextSaveCounter

protected

## _extension

const std::string osgViewer::ScreenCaptureHandler::WriteToFile::_extension

protected

## _filename

const std::string osgViewer::ScreenCaptureHandler::WriteToFile::_filename

protected

## _savePolicy

SavePolicy osgViewer::ScreenCaptureHandler::WriteToFile::_savePolicy

protected

Referenced by getSavePolicy(), and setSavePolicy().

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

- osgViewer/ViewerEventHandlers