osgEarth 2.1.1
Public Member Functions | Public Attributes

CachingReadCallback Struct Reference

List of all members.

Public Member Functions

 CachingReadCallback (int maxReads)
void reset ()
virtual osg::Node * readNodeFile (const std::string &filename)

Public Attributes

int _reads
int _maxReads
osg::ref_ptr< osg::Node > _lastNodeRead

Detailed Description

Definition at line 32 of file ObjectPlacer.cpp.


Constructor & Destructor Documentation

CachingReadCallback::CachingReadCallback ( int  maxReads) [inline]

Definition at line 34 of file ObjectPlacer.cpp.

: _reads(0), _maxReads(maxReads) { }

Member Function Documentation

virtual osg::Node* CachingReadCallback::readNodeFile ( const std::string &  filename) [inline, virtual]

Definition at line 36 of file ObjectPlacer.cpp.

                                                             {
        if ( _reads < _maxReads ) {
            _reads++;
            return osgSim::DatabaseCacheReadCallback::readNodeFile(filename);
        }
        else {
            return NULL;
        }
    }
void CachingReadCallback::reset ( ) [inline]

Definition at line 35 of file ObjectPlacer.cpp.

{ _reads = 0; }

Member Data Documentation

osg::ref_ptr<osg::Node> CachingReadCallback::_lastNodeRead

Definition at line 46 of file ObjectPlacer.cpp.

Definition at line 45 of file ObjectPlacer.cpp.

Definition at line 45 of file ObjectPlacer.cpp.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines