Choreonoid  1.8
FilePathVariableProcessor.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_UTIL_FILE_PATH_VARIABLE_PROCESSOR_H
7 #define CNOID_UTIL_FILE_PATH_VARIABLE_PROCESSOR_H
8 
9 #include "Referenced.h"
10 #include <cnoid/stdx/filesystem>
11 #include <string>
12 #include "exportdecl.h"
13 
14 namespace cnoid {
15 
16 class Mapping;
17 
18 class CNOID_EXPORT FilePathVariableProcessor : public Referenced
19 {
20 public:
21  static FilePathVariableProcessor* systemInstance();
22 
25 
26  void setSystemVariablesEnabled(bool on);
27  void setUserVariables(Mapping* variables);
28  void setBaseDirectory(const std::string& directory);
29  void clearBaseDirectory();
30  std::string baseDirectory() const;
31  stdx::filesystem::path baseDirPath() const;
32  void setProjectDirectory(const std::string& directory);
33  void clearProjectDirectory();
34  const std::string& projectDirectory() const;
35  std::string parameterize(const std::string& path);
36  std::string expand(const std::string& path, bool doMakeNativeAbsolutePath);
37  const std::string& errorMessage() const;
38 
39 private:
40  class Impl;
41  Impl* impl;
42 };
43 
45 
46 }
47 
48 #endif
Referenced.h
cnoid::Mapping
Definition: ValueTree.h:253
cnoid::ref_ptr< FilePathVariableProcessor >
cnoid::FilePathVariableProcessor
Definition: FilePathVariableProcessor.h:18
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Referenced
Definition: Referenced.h:54
cnoid::FilePathVariableProcessorPtr
ref_ptr< FilePathVariableProcessor > FilePathVariableProcessorPtr
Definition: FilePathVariableProcessor.h:44