OpenSceneGraph
Public Types | Public Member Functions | Protected Attributes | List of all members
osgDB::ReaderWriter::ReadResult Class Reference

Public Types

enum  ReadStatus {
  NOT_IMPLEMENTED, FILE_NOT_HANDLED, FILE_NOT_FOUND, ERROR_IN_READING_FILE,
  FILE_LOADED, FILE_LOADED_FROM_CACHE, FILE_REQUESTED, INSUFFICIENT_MEMORY_TO_LOAD
}
 

Public Member Functions

 ReadResult (ReadStatus status=FILE_NOT_HANDLED)
 
 ReadResult (const std::string &m)
 
 ReadResult (osg::Object *obj, ReadStatus status=FILE_LOADED)
 
template<class T >
 ReadResult (const osg::ref_ptr< T > &obj, ReadStatus status=FILE_LOADED)
 
 ReadResult (const ReadResult &rr)
 
ReadResultoperator= (const ReadResult &rr)
 
bool operator< (const ReadResult &rhs) const
 
osg::ObjectgetObject ()
 
osg::ImagegetImage ()
 
osg::HeightFieldgetHeightField ()
 
osg::NodegetNode ()
 
osgDB::ArchivegetArchive ()
 
osg::ShadergetShader ()
 
osg::ScriptgetScript ()
 
bool validObject ()
 
bool validImage ()
 
bool validHeightField ()
 
bool validNode ()
 
bool validArchive ()
 
bool validShader ()
 
bool validScript ()
 
osg::ObjecttakeObject ()
 
osg::ImagetakeImage ()
 
osg::HeightFieldtakeHeightField ()
 
osg::NodetakeNode ()
 
osgDB::ArchivetakeArchive ()
 
osg::ShadertakeShader ()
 
osg::ScripttakeScript ()
 
std::string & message ()
 
const std::string & message () const
 
std::string statusMessage () const
 report the ReadResult's status, and message (if any). Useful for reporting of errors to users. More...
 
ReadStatus status () const
 
bool success () const
 
bool loadedFromCache () const
 
bool error () const
 
bool notHandled () const
 
bool notFound () const
 
bool notEnoughMemory () const
 

Protected Attributes

ReadStatus _status
 
std::string _message
 
osg::ref_ptr< osg::Object_object
 

Member Enumeration Documentation

◆ ReadStatus

Enumerator
NOT_IMPLEMENTED 

read*() method not implemented in concrete ReaderWriter.

FILE_NOT_HANDLED 

File is not appropriate for this file reader, due to some incompatibility, but not a read error.

FILE_NOT_FOUND 

File could not be found or could not be read.

ERROR_IN_READING_FILE 

File found, loaded, but an error was encountered during processing.

FILE_LOADED 

File successfully found, loaded, and converted into osg.

FILE_LOADED_FROM_CACHE 

File found in cache and returned.

FILE_REQUESTED 

Asynchronous file read has been requested, but returning immediately, keep polling plugin until file read has been completed.

INSUFFICIENT_MEMORY_TO_LOAD 

File found but not loaded because estimated required memory surpasses available memory.

Constructor & Destructor Documentation

◆ ReadResult() [1/5]

osgDB::ReaderWriter::ReadResult::ReadResult ( ReadStatus  status = FILE_NOT_HANDLED)
inline

◆ ReadResult() [2/5]

osgDB::ReaderWriter::ReadResult::ReadResult ( const std::string &  m)
inline

◆ ReadResult() [3/5]

osgDB::ReaderWriter::ReadResult::ReadResult ( osg::Object obj,
ReadStatus  status = FILE_LOADED 
)
inline

◆ ReadResult() [4/5]

template<class T >
osgDB::ReaderWriter::ReadResult::ReadResult ( const osg::ref_ptr< T > &  obj,
ReadStatus  status = FILE_LOADED 
)
inline

◆ ReadResult() [5/5]

osgDB::ReaderWriter::ReadResult::ReadResult ( const ReadResult rr)
inline

Member Function Documentation

◆ error()

bool osgDB::ReaderWriter::ReadResult::error ( ) const
inline

◆ getArchive()

osgDB::Archive* osgDB::ReaderWriter::ReadResult::getArchive ( )

◆ getHeightField()

osg::HeightField* osgDB::ReaderWriter::ReadResult::getHeightField ( )

◆ getImage()

osg::Image* osgDB::ReaderWriter::ReadResult::getImage ( )

◆ getNode()

osg::Node* osgDB::ReaderWriter::ReadResult::getNode ( )

◆ getObject()

osg::Object* osgDB::ReaderWriter::ReadResult::getObject ( )

◆ getScript()

osg::Script* osgDB::ReaderWriter::ReadResult::getScript ( )

◆ getShader()

osg::Shader* osgDB::ReaderWriter::ReadResult::getShader ( )

◆ loadedFromCache()

bool osgDB::ReaderWriter::ReadResult::loadedFromCache ( ) const
inline

◆ message() [1/2]

std::string& osgDB::ReaderWriter::ReadResult::message ( )
inline

◆ message() [2/2]

const std::string& osgDB::ReaderWriter::ReadResult::message ( ) const
inline

◆ notEnoughMemory()

bool osgDB::ReaderWriter::ReadResult::notEnoughMemory ( ) const
inline

◆ notFound()

bool osgDB::ReaderWriter::ReadResult::notFound ( ) const
inline

References osgDB::FILE_NOT_FOUND.

◆ notHandled()

bool osgDB::ReaderWriter::ReadResult::notHandled ( ) const
inline

◆ operator<()

bool osgDB::ReaderWriter::ReadResult::operator< ( const ReadResult rhs) const
inline

References _status.

◆ operator=()

ReadResult& osgDB::ReaderWriter::ReadResult::operator= ( const ReadResult rr)
inline

References _message, _object, and _status.

◆ status()

ReadStatus osgDB::ReaderWriter::ReadResult::status ( ) const
inline

◆ statusMessage()

std::string osgDB::ReaderWriter::ReadResult::statusMessage ( ) const

report the ReadResult's status, and message (if any). Useful for reporting of errors to users.

◆ success()

bool osgDB::ReaderWriter::ReadResult::success ( ) const
inline

◆ takeArchive()

osgDB::Archive* osgDB::ReaderWriter::ReadResult::takeArchive ( )

◆ takeHeightField()

osg::HeightField* osgDB::ReaderWriter::ReadResult::takeHeightField ( )

◆ takeImage()

osg::Image* osgDB::ReaderWriter::ReadResult::takeImage ( )

◆ takeNode()

osg::Node* osgDB::ReaderWriter::ReadResult::takeNode ( )

◆ takeObject()

osg::Object* osgDB::ReaderWriter::ReadResult::takeObject ( )

◆ takeScript()

osg::Script* osgDB::ReaderWriter::ReadResult::takeScript ( )

◆ takeShader()

osg::Shader* osgDB::ReaderWriter::ReadResult::takeShader ( )

◆ validArchive()

bool osgDB::ReaderWriter::ReadResult::validArchive ( )
inline

◆ validHeightField()

bool osgDB::ReaderWriter::ReadResult::validHeightField ( )
inline

◆ validImage()

bool osgDB::ReaderWriter::ReadResult::validImage ( )
inline

◆ validNode()

bool osgDB::ReaderWriter::ReadResult::validNode ( )
inline

◆ validObject()

bool osgDB::ReaderWriter::ReadResult::validObject ( )
inline

◆ validScript()

bool osgDB::ReaderWriter::ReadResult::validScript ( )
inline

◆ validShader()

bool osgDB::ReaderWriter::ReadResult::validShader ( )
inline

Member Data Documentation

◆ _message

std::string osgDB::ReaderWriter::ReadResult::_message
protected

Referenced by operator=().

◆ _object

osg::ref_ptr<osg::Object> osgDB::ReaderWriter::ReadResult::_object
protected

Referenced by operator=().

◆ _status

ReadStatus osgDB::ReaderWriter::ReadResult::_status
protected

Referenced by operator<(), and operator=().


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