OpenCOVER
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
opencover::coVRFileManager Class Reference

#include <coVRFileManager.h>

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

Public Member Functions

 ~coVRFileManager ()
 
std::string findFileExt (const Url &url)
 
const char * getName (const char *file)
 
bool makeRelativeToSharedDataLink (std::string &fileName)
 
bool isInTmpDir (const std::string &fileName)
 
bool makeRelativePath (std::string &fileName, const std::string &basePath)
 
std::string findOrGetFile (const std::string &fileName, bool *isTmp=(bool *) false)
 
osg::Node * loadFile (const char *file, coTUIFileBrowserButton *fb=NULL, osg::Group *parent=NULL, const char *covise_key="")
 
osg::Node * replaceFile (const char *file, coTUIFileBrowserButton *fb=NULL, osg::Group *parent=NULL, const char *covise_key="")
 
void reloadFile ()
 
void unloadFile (const char *file=NULL)
 
void setViewPointFile (const std::string &viewPointFile)
 
std::string getViewPointFile ()
 
osg::Node * loadIcon (const char *filename)
 
std::string getFontFile (const char *fontname)
 
osg::ref_ptr< osgText::Font > loadFont (const char *fontname)
 
osg::Texture2D * loadTexture (const char *texture)
 
bool fileExist (const char *fileName)
 
bool fileExist (const std::string &fileName)
 
const char * buildFileName (const char *)
 
int registerFileHandler (const FileHandler *handler)
 
int registerFileHandler (coVRIOReader *handler)
 
int unregisterFileHandler (const FileHandler *handler)
 
int unregisterFileHandler (coVRIOReader *handler)
 
std::string getFilterList ()
 
std::string getWriteFilterList ()
 
const FileHandlergetFileHandler (const char *extension)
 
coVRIOReaderfindIOHandler (const char *extension)
 
const FileHandlerfindFileHandler (const char *extension)
 
coTUIFileBrowserButtongetMatchingFileBrowserInstance (std::string keyFileName)
 
bool IsDefFBSet ()
 
void SetDefaultFB (coTUIFileBrowserButton *fb)
 
virtual bool update ()
 
void sendFile (covise::TokenBuffer &tb)
 
std::string remoteFetch (const std::string &filePath, int fileOwner=-1)
 request the file from vrb -> file gets copied to tmp More...
 
int getFileId (const char *url)
 compares the url with m_sharedFiles. If found returns its position in, else -1; More...
 
std::string getFileName (const std::string &filePath)
 get the filename + extension from a path: path/fileName -> fileName More...
 
- Public Member Functions inherited from vrui::coUpdateable
 coUpdateable ()
 Constructor. More...
 
virtual ~coUpdateable ()
 Destructor. More...
 
virtual bool update ()=0
 

Static Public Member Functions

static coVRFileManagerinstance ()
 
static std::string cutStringAt (const std::string &s, char delimiter)
 return the substring of s until the delimiter(delimiter is cut off) More...
 
static std::string resolveEnvs (const std::string &s)
 replaces all occurences of environmentvariables (env$ on win or $env/ on unix) with the first entry (delimited by ';') More...
 

Public Attributes

osg::ref_ptr< osgDB::ReaderWriter::Options > options
 

Friends

struct LoadedFile
 

Constructor & Destructor Documentation

◆ ~coVRFileManager()

opencover::coVRFileManager::~coVRFileManager ( )

Member Function Documentation

◆ buildFileName()

const char * opencover::coVRFileManager::buildFileName ( const char *  )

◆ cutStringAt()

static std::string opencover::coVRFileManager::cutStringAt ( const std::string &  s,
char  delimiter 
)
static

return the substring of s until the delimiter(delimiter is cut off)

◆ fileExist() [1/2]

bool opencover::coVRFileManager::fileExist ( const char *  fileName)

◆ fileExist() [2/2]

bool opencover::coVRFileManager::fileExist ( const std::string &  fileName)

◆ findFileExt()

std::string opencover::coVRFileManager::findFileExt ( const Url url)

◆ findFileHandler()

const FileHandler * opencover::coVRFileManager::findFileHandler ( const char *  extension)

◆ findIOHandler()

coVRIOReader * opencover::coVRFileManager::findIOHandler ( const char *  extension)

◆ findOrGetFile()

std::string opencover::coVRFileManager::findOrGetFile ( const std::string &  fileName,
bool *  isTmp = (bool *) false 
)

◆ getFileHandler()

const FileHandler * opencover::coVRFileManager::getFileHandler ( const char *  extension)

◆ getFileId()

int opencover::coVRFileManager::getFileId ( const char *  url)

compares the url with m_sharedFiles. If found returns its position in, else -1;

◆ getFileName()

std::string opencover::coVRFileManager::getFileName ( const std::string &  filePath)

get the filename + extension from a path: path/fileName -> fileName

◆ getFilterList()

std::string opencover::coVRFileManager::getFilterList ( )

◆ getFontFile()

std::string opencover::coVRFileManager::getFontFile ( const char *  fontname)

◆ getMatchingFileBrowserInstance()

coTUIFileBrowserButton * opencover::coVRFileManager::getMatchingFileBrowserInstance ( std::string  keyFileName)

◆ getName()

const char * opencover::coVRFileManager::getName ( const char *  file)

◆ getViewPointFile()

std::string opencover::coVRFileManager::getViewPointFile ( )

◆ getWriteFilterList()

std::string opencover::coVRFileManager::getWriteFilterList ( )

◆ instance()

static coVRFileManager * opencover::coVRFileManager::instance ( )
static

◆ IsDefFBSet()

bool opencover::coVRFileManager::IsDefFBSet ( )

◆ isInTmpDir()

bool opencover::coVRFileManager::isInTmpDir ( const std::string &  fileName)

◆ loadFile()

osg::Node * opencover::coVRFileManager::loadFile ( const char *  file,
coTUIFileBrowserButton fb = NULL,
osg::Group *  parent = NULL,
const char *  covise_key = "" 
)

◆ loadFont()

osg::ref_ptr< osgText::Font > opencover::coVRFileManager::loadFont ( const char *  fontname)

◆ loadIcon()

osg::Node * opencover::coVRFileManager::loadIcon ( const char *  filename)

◆ loadTexture()

osg::Texture2D * opencover::coVRFileManager::loadTexture ( const char *  texture)

◆ makeRelativePath()

bool opencover::coVRFileManager::makeRelativePath ( std::string &  fileName,
const std::string &  basePath 
)

◆ makeRelativeToSharedDataLink()

bool opencover::coVRFileManager::makeRelativeToSharedDataLink ( std::string &  fileName)

◆ registerFileHandler() [1/2]

int opencover::coVRFileManager::registerFileHandler ( const FileHandler handler)

◆ registerFileHandler() [2/2]

int opencover::coVRFileManager::registerFileHandler ( coVRIOReader handler)

◆ reloadFile()

void opencover::coVRFileManager::reloadFile ( )

◆ remoteFetch()

std::string opencover::coVRFileManager::remoteFetch ( const std::string &  filePath,
int  fileOwner = -1 
)

request the file from vrb -> file gets copied to tmp

◆ replaceFile()

osg::Node * opencover::coVRFileManager::replaceFile ( const char *  file,
coTUIFileBrowserButton fb = NULL,
osg::Group *  parent = NULL,
const char *  covise_key = "" 
)

◆ resolveEnvs()

static std::string opencover::coVRFileManager::resolveEnvs ( const std::string &  s)
static

replaces all occurences of environmentvariables (env$ on win or $env/ on unix) with the first entry (delimited by ';')

◆ sendFile()

void opencover::coVRFileManager::sendFile ( covise::TokenBuffer &  tb)

◆ SetDefaultFB()

void opencover::coVRFileManager::SetDefaultFB ( coTUIFileBrowserButton fb)

◆ setViewPointFile()

void opencover::coVRFileManager::setViewPointFile ( const std::string &  viewPointFile)

◆ unloadFile()

void opencover::coVRFileManager::unloadFile ( const char *  file = NULL)

◆ unregisterFileHandler() [1/2]

int opencover::coVRFileManager::unregisterFileHandler ( const FileHandler handler)

◆ unregisterFileHandler() [2/2]

int opencover::coVRFileManager::unregisterFileHandler ( coVRIOReader handler)

◆ update()

virtual bool opencover::coVRFileManager::update ( )
virtual

this method is called once per frame as long as it returns true. as soon as it returns false, it is removed from the update manager and not called again. the update method is called prior to preFrame();

Implements vrui::coUpdateable.

Friends And Related Function Documentation

◆ LoadedFile

friend struct LoadedFile
friend

Member Data Documentation

◆ options

osg::ref_ptr<osgDB::ReaderWriter::Options> opencover::coVRFileManager::options

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