OpenCOVER
Public Types | Public Member Functions | Protected Attributes | List of all members
opencover::coVRIOReader Class Referenceabstract

#include <coVRIOReader.h>

Inheritance diagram for opencover::coVRIOReader:
Inheritance graph
[legend]
Collaboration diagram for opencover::coVRIOReader:
Collaboration graph
[legend]

Public Types

enum  IOStatus { Idle = 0x00 , Loading , Finished , Failed }
 

Public Member Functions

 coVRIOReader ()
 
virtual ~coVRIOReader ()
 
virtual osg::Node * load (const std::string &location, osg::Group *group=0)=0
 
virtual bool canLoadParts () const =0
 
virtual bool canUnload () const =0
 
virtual bool inLoading () const =0
 
virtual IOStatus loadPart (const std::string &location, osg::Group *group=0)
 
virtual osg::Node * getLoaded ()
 
virtual bool unload (osg::Node *node)
 
virtual const std::list< std::string > & getSupportedReadMimeTypes () const
 
virtual const std::list< std::string > & getSupportedReadFileExtensions () const
 
virtual bool isReader () const
 
- Public Member Functions inherited from opencover::coVRIOBase
 coVRIOBase ()
 
virtual ~coVRIOBase ()
 
float getIOProgress () const
 
virtual bool abortIO ()=0
 
virtual std::string getIOHandlerName () const =0
 
virtual bool isReader () const
 
virtual bool isWriter () const
 

Protected Attributes

std::list< std::string > supportedReadFileTypes
 
std::list< std::string > supportedReadFileExtensions
 

Additional Inherited Members

- Protected Member Functions inherited from opencover::coVRIOBase
void setIOProgress (float progress)
 

Member Enumeration Documentation

◆ IOStatus

Enumerator
Idle 
Loading 
Finished 
Failed 

Constructor & Destructor Documentation

◆ coVRIOReader()

opencover::coVRIOReader::coVRIOReader ( )

◆ ~coVRIOReader()

virtual opencover::coVRIOReader::~coVRIOReader ( )
virtual

Member Function Documentation

◆ canLoadParts()

virtual bool opencover::coVRIOReader::canLoadParts ( ) const
pure virtual

Is used by the file manager to check if a handler can chunk its loading process into parts. Loading chunks instead of the full file enhances the responsiveness of the renderer. For the actual loading, the method loadPart has to be implemented. By the handler

Returns
true If the plugin supports partial loads.

◆ canUnload()

virtual bool opencover::coVRIOReader::canUnload ( ) const
pure virtual

Is used by the file manager to check if a handler can unload a file.

Returns
true If the plugin supports unloading.

◆ getLoaded()

virtual osg::Node * opencover::coVRIOReader::getLoaded ( )
virtual

Gets the loaded subgraph after finishing the partial load.

Returns
The node loaded or 0 if nothing was loaded.

◆ getSupportedReadFileExtensions()

virtual const std::list< std::string > & opencover::coVRIOReader::getSupportedReadFileExtensions ( ) const
virtual

◆ getSupportedReadMimeTypes()

virtual const std::list< std::string > & opencover::coVRIOReader::getSupportedReadMimeTypes ( ) const
virtual

◆ inLoading()

virtual bool opencover::coVRIOReader::inLoading ( ) const
pure virtual

Is used by the file manager to check if a handler is currently loading a file.

Returns
true If the handler is loading data.

◆ isReader()

virtual bool opencover::coVRIOReader::isReader ( ) const
inlinevirtual

Check the IO capability of the handler

Returns
true if the handler can read data

Reimplemented from opencover::coVRIOBase.

◆ load()

virtual osg::Node * opencover::coVRIOReader::load ( const std::string &  location,
osg::Group *  group = 0 
)
pure virtual

This method is called for loading a full file. The loader must load the complete file and should attach it to the group node passed to the loader.

Parameters
locationThe location to load the data from.
groupAn optional group node the loaded scene should be attached to.
Returns
A node that all loaded nodes are attached to or 0 on error.

◆ loadPart()

virtual IOStatus opencover::coVRIOReader::loadPart ( const std::string &  location,
osg::Group *  group = 0 
)
virtual

Loads the next (or first) part of the current data set. This method must be implemented by handlers claiming to canLoadParts. It is called by the file manager every frame. The file manager ensures, that new partial load operations are only initiated after all previous operations have been completed. The current progress of the load operation should be reflected in the return value of getProgress.

Parameters
locationThe location to load the data from.
groupAn optional group node the loaded scene should be attached to.
Returns
The current status of file loading.

◆ unload()

virtual bool opencover::coVRIOReader::unload ( osg::Node *  node)
virtual

This method is called for unloading data. This method must be implemented by handlers claiming to canUnload.

Returns
If the scene was successfully unloaded.

Member Data Documentation

◆ supportedReadFileExtensions

std::list<std::string> opencover::coVRIOReader::supportedReadFileExtensions
protected

◆ supportedReadFileTypes

std::list<std::string> opencover::coVRIOReader::supportedReadFileTypes
protected

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