osgDB::ReaderWriter::ReadResult Class Reference

`#include <ReaderWriter>`

## 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)
ReadResult & | operator= (const ReadResult &rr)
bool | operator< (const ReadResult &rhs) const
osg::Object * | getObject ()
osg::Image * | getImage ()
osg::HeightField * | getHeightField ()
osg::Node * | getNode ()
osgDB::Archive * | getArchive ()
osg::Shader * | getShader ()
osg::Script * | getScript ()
bool | validObject ()
bool | validImage ()
bool | validHeightField ()
bool | validNode ()
bool | validArchive ()
bool | validShader ()
bool | validScript ()
osg::Object * | takeObject ()
osg::Image * | takeImage ()
osg::HeightField * | takeHeightField ()
osg::Node * | takeNode ()
osgDB::Archive * | takeArchive ()
osg::Shader * | takeShader ()
osg::Script * | takeScript ()
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.
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

enum osgDB::ReaderWriter::ReadResult::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

References _status, FILE_NOT_HANDLED, and status().

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

## ReadResult() [2/5]

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

inline

References _message, _status, and ERROR_IN_READING_FILE.

## ReadResult() [3/5]

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

inline

References _object, _status, FILE_LOADED, and status().

## ReadResult() [4/5]

template<class T>

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

inline

References _object, _status, FILE_LOADED, and status().

## ReadResult() [5/5]

osgDB::ReaderWriter::ReadResult::ReadResult | ( | const ReadResult & | rr | ) |

inline

References _message, _object, _status, and ReadResult().

## Member Function Documentation

## error()

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

inline

References _status, and ERROR_IN_READING_FILE.

## getArchive()

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

Referenced by validArchive().

## getHeightField()

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

Referenced by validHeightField().

## getImage()

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

Referenced by validImage().

## getNode()

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

Referenced by osgDB::Registry::_buildKdTreeIfRequired(), and validNode().

## getObject()

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

## getScript()

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

Referenced by validScript().

## getShader()

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

Referenced by validShader().

## loadedFromCache()

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

inline

References _status, and FILE_LOADED_FROM_CACHE.

## message() [1/2]

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

inline

References _message.

## message() [2/2]

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

inline

References _message.

## notEnoughMemory()

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

inline

References _status, and INSUFFICIENT_MEMORY_TO_LOAD.

## notFound()

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

inline

References _status, and FILE_NOT_FOUND.

## notHandled()

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

inline

References _status, FILE_NOT_HANDLED, and NOT_IMPLEMENTED.

## operator<()

bool osgDB::ReaderWriter::ReadResult::operator< | ( | const ReadResult & | rhs | ) | const

inline

References _status, and ReadResult().

## operator=()

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

inline

References _message, _object, _status, and ReadResult().

## status()

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

inline

References _status.

Referenced by ReadResult(), ReadResult(), and ReadResult().

## 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

References _status, FILE_LOADED, and FILE_LOADED_FROM_CACHE.

## 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

References getArchive().

## validHeightField()

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

inline

References getHeightField().

## validImage()

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

inline

References getImage().

## validNode()

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

inline

References getNode().

Referenced by osgDB::Registry::_buildKdTreeIfRequired().

## validObject()

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

inline

References _object.

## validScript()

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

inline

References getScript().

## validShader()

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

inline

References getShader().

## Member Data Documentation

## _message

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

protected

Referenced by message(), message(), operator=(), ReadResult(), and ReadResult().

## _object

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

protected

Referenced by operator=(), ReadResult(), ReadResult(), ReadResult(), and validObject().

## _status

ReadStatus osgDB::ReaderWriter::ReadResult::_status

protected

Referenced by error(), loadedFromCache(), notEnoughMemory(), notFound(), notHandled(), operator<(), operator=(), ReadResult(), ReadResult(), ReadResult(), ReadResult(), ReadResult(), status(), and success().

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

- ReaderWriter