![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtKeepOriginalFilenamesVisitor.h,v $ $Revision: 1.7 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 #include <vrvOsg/vrvOsg.h> 00015 #include <osg/NodeVisitor> 00016 00017 namespace makVrv 00018 { 00019 class DtFileCache; 00020 00024 class DT_DLL_VRVOSG DtKeepOriginalFilenamesVisitor : public osg::NodeVisitor 00025 { 00026 00027 public: 00028 00032 DtKeepOriginalFilenamesVisitor(const std::string& rootFilePath = "", 00033 DtFileCache* aFileCache = 0, 00034 bool addOriginalName = true); 00035 00036 ~DtKeepOriginalFilenamesVisitor(); 00037 00039 virtual void apply(osg::ProxyNode& node); 00040 00044 static bool getOriginalFilenameFromDescription(const std::string& strIn, std::string& strOut); 00045 00046 protected: 00047 std::string myRootFilePath; 00048 DtFileCache* myFileCache; 00049 bool myAddOriginalName; 00050 00051 }; 00052 00057 class DT_DLL_VRVOSG DtRenameFileToMedfVisitor : public osg::NodeVisitor 00058 { 00059 00060 public: 00061 00065 DtRenameFileToMedfVisitor( const std::string& relativePath, 00066 bool resolveToRelativePath ); 00067 00068 ~DtRenameFileToMedfVisitor(); 00069 00071 virtual void apply(osg::ProxyNode& node); 00072 00074 std::string getNewFilename( const std::string& originalFileName ); 00075 00076 protected: 00077 std::string myRelativePath; 00078 bool myResolveToRelativePath; 00079 }; 00080 00081 } 00082