SPH
FileManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "io/Path.h"
4 #include "math/rng/Rng.h"
5 #include <set>
6 
8 
14 private:
15  std::set<Path> usedPaths;
16 
17 public:
23  Path getPath(const Path& expected);
24 };
25 
35 private:
36  UniformRng rng;
37 
38  static char chars[];
39 
40 public:
42  : rng(std::random_device{}()) {}
43 
47  Path getPath(const std::string extension = "");
48 };
49 
50 
NAMESPACE_SPH_BEGIN
Definition: BarnesHut.cpp:13
#define NAMESPACE_SPH_END
Definition: Object.h:12
Object representing a path on a filesystem, similar to std::filesystem::path in c++17.
Random number generators.
Object representing a path on a filesystem.
Definition: Path.h:17
Generates random file names.
Definition: FileManager.h:34
Path getPath(const std::string extension="")
Generates a new random path.
Definition: FileManager.cpp:49
Random number generator with uniform distribution.
Definition: Rng.h:16
Object generating unique paths.
Definition: FileManager.h:13
Path getPath(const Path &expected)
Generates a unique path, based on given input path.
Definition: FileManager.cpp:15
Overload of std::swap for Sph::Array.
Definition: Array.h:578
Object with deleted copy constructor and copy operator.
Definition: Object.h:54