PathResolver.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace AppSecInc
4 {
5  namespace Databases
6  {
7  namespace ODBC
8  {
14  class PathResolver
15  {
16  public:
18  virtual std::wstring readContent(const std::wstring& path) = 0;
19 
21  virtual void setBasePath(const std::wstring& path) = 0;
22 
24  virtual std::wstring getFolderPath(const std::wstring& path) const = 0;
25  };
26 
27 
30  {
31  public:
33  virtual ~FilesystemPathResolver();
34 
35  virtual std::wstring readContent(const std::wstring& path);
36  virtual void setBasePath(const std::wstring& path);
37  virtual std::wstring getFolderPath(const std::wstring& path) const;
38 
39  private:
41  FilesystemPathResolver& operator=(const FilesystemPathResolver& other);
42  std::wstring getFullPath(const std::wstring path) const;
43  std::wstring basepath;
44  };
45  }
46  }
47 }
virtual std::wstring getFolderPath(const std::wstring &path) const =0
get folder of the provided path
virtual ~FilesystemPathResolver()
Definition: PathResolver.cpp:10
virtual void setBasePath(const std::wstring &path)=0
Set base path for resolving relative paths.
virtual std::wstring readContent(const std::wstring &path)
Locate the path and read its content.
Definition: PathResolver.cpp:19
virtual std::wstring getFolderPath(const std::wstring &path) const
get folder of the provided path
Definition: PathResolver.cpp:33
default implementation of PathResolver
Definition: PathResolver.h:29
virtual std::wstring readContent(const std::wstring &path)=0
Locate the path and read its content.
Definition: PathResolver.h:14
FilesystemPathResolver()
Definition: PathResolver.cpp:6
virtual void setBasePath(const std::wstring &path)
Set base path for resolving relative paths.
Definition: PathResolver.cpp:14


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com