Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. #ifndef FILESYSTEM_H_
  2. #define FILESYSTEM_H_
  3.  
  4. #include <Filesystem/Stream.h>
  5. #include <string>
  6.  
  7. class Filesystem {
  8.   public:
  9.     virtual Stream* open(std::string resource) = 0;
  10.     ... read/write/delete/copy/etc...
  11. };
  12.  
  13. #endif
  14.  
  15. #ifndef LOCAL_FILESYSTEM_H_
  16. #define LOCAL_FILESYSTEM_H_
  17.  
  18. #include <Filesystem/Stream.h>
  19. #include <string>
  20.  
  21. // Use native fopen/fread/fwrite
  22. class LocalFilesystem : public Filesystem {
  23.   public:
  24.     virtual Stream* open(std::string resource);
  25.     ... read/write/delete/copy/etc...
  26. };
  27.  
  28. #endif
  29.  
  30. #ifndef CLOUD_FILESYSTEM_H_
  31. #define CLOUD_FILESYSTEM_H_
  32.  
  33. #include <Filesystem/Stream.h>
  34. #include <string>
  35.  
  36. // Use socket to stream to your service
  37. class CloudFilesystem : public Filesystem {
  38.   public:
  39.     virtual Stream* open(std::string resource);
  40.     ... read/write/delete/copy/etc...
  41. };
  42.  
  43. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement