OpenCOVER
|
#include <coVRFileManager.h>
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 FileHandler * | getFileHandler (const char *extension) |
coVRIOReader * | findIOHandler (const char *extension) |
const FileHandler * | findFileHandler (const char *extension) |
coTUIFileBrowserButton * | getMatchingFileBrowserInstance (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 coVRFileManager * | instance () |
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 |
opencover::coVRFileManager::~coVRFileManager | ( | ) |
const char * opencover::coVRFileManager::buildFileName | ( | const char * | ) |
|
static |
return the substring of s until the delimiter(delimiter is cut off)
bool opencover::coVRFileManager::fileExist | ( | const char * | fileName | ) |
bool opencover::coVRFileManager::fileExist | ( | const std::string & | fileName | ) |
std::string opencover::coVRFileManager::findFileExt | ( | const Url & | url | ) |
const FileHandler * opencover::coVRFileManager::findFileHandler | ( | const char * | extension | ) |
coVRIOReader * opencover::coVRFileManager::findIOHandler | ( | const char * | extension | ) |
std::string opencover::coVRFileManager::findOrGetFile | ( | const std::string & | fileName, |
bool * | isTmp = (bool *) false |
||
) |
const FileHandler * opencover::coVRFileManager::getFileHandler | ( | const char * | extension | ) |
int opencover::coVRFileManager::getFileId | ( | const char * | url | ) |
compares the url with m_sharedFiles. If found returns its position in, else -1;
std::string opencover::coVRFileManager::getFileName | ( | const std::string & | filePath | ) |
get the filename + extension from a path: path/fileName -> fileName
std::string opencover::coVRFileManager::getFilterList | ( | ) |
std::string opencover::coVRFileManager::getFontFile | ( | const char * | fontname | ) |
coTUIFileBrowserButton * opencover::coVRFileManager::getMatchingFileBrowserInstance | ( | std::string | keyFileName | ) |
const char * opencover::coVRFileManager::getName | ( | const char * | file | ) |
std::string opencover::coVRFileManager::getViewPointFile | ( | ) |
std::string opencover::coVRFileManager::getWriteFilterList | ( | ) |
|
static |
bool opencover::coVRFileManager::IsDefFBSet | ( | ) |
bool opencover::coVRFileManager::isInTmpDir | ( | const std::string & | fileName | ) |
osg::Node * opencover::coVRFileManager::loadFile | ( | const char * | file, |
coTUIFileBrowserButton * | fb = NULL , |
||
osg::Group * | parent = NULL , |
||
const char * | covise_key = "" |
||
) |
osg::ref_ptr< osgText::Font > opencover::coVRFileManager::loadFont | ( | const char * | fontname | ) |
osg::Node * opencover::coVRFileManager::loadIcon | ( | const char * | filename | ) |
osg::Texture2D * opencover::coVRFileManager::loadTexture | ( | const char * | texture | ) |
bool opencover::coVRFileManager::makeRelativePath | ( | std::string & | fileName, |
const std::string & | basePath | ||
) |
bool opencover::coVRFileManager::makeRelativeToSharedDataLink | ( | std::string & | fileName | ) |
int opencover::coVRFileManager::registerFileHandler | ( | const FileHandler * | handler | ) |
int opencover::coVRFileManager::registerFileHandler | ( | coVRIOReader * | handler | ) |
void opencover::coVRFileManager::reloadFile | ( | ) |
std::string opencover::coVRFileManager::remoteFetch | ( | const std::string & | filePath, |
int | fileOwner = -1 |
||
) |
request the file from vrb -> file gets copied to tmp
osg::Node * opencover::coVRFileManager::replaceFile | ( | const char * | file, |
coTUIFileBrowserButton * | fb = NULL , |
||
osg::Group * | parent = NULL , |
||
const char * | covise_key = "" |
||
) |
|
static |
replaces all occurences of environmentvariables (env$ on win or $env/ on unix) with the first entry (delimited by ';')
void opencover::coVRFileManager::sendFile | ( | covise::TokenBuffer & | tb | ) |
void opencover::coVRFileManager::SetDefaultFB | ( | coTUIFileBrowserButton * | fb | ) |
void opencover::coVRFileManager::setViewPointFile | ( | const std::string & | viewPointFile | ) |
void opencover::coVRFileManager::unloadFile | ( | const char * | file = NULL | ) |
int opencover::coVRFileManager::unregisterFileHandler | ( | const FileHandler * | handler | ) |
int opencover::coVRFileManager::unregisterFileHandler | ( | coVRIOReader * | handler | ) |
|
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.
|
friend |
osg::ref_ptr<osgDB::ReaderWriter::Options> opencover::coVRFileManager::options |