pairpal
Loading...
Searching...
No Matches
pair.hpp
1#ifndef PAIR_HPP
2#define PAIR_HPP
3
4#include <storage.hpp>
5#include <string>
6#include <vector>
7
12class Pair {
13 public:
18
22 virtual ~Pair();
23
28 void setStorage(const Storage &storage);
29
35 [[nodiscard]] auto getPair(const std::string &username)
36 -> std::vector<std::string>;
37
38 private:
39 friend class MockPair;
40
41 Storage storage_;
42
47 [[nodiscard]] virtual auto getAllUsernames_() -> std::vector<std::string>;
48
54 [[nodiscard]] virtual auto getUserTags_(const std::string &username)
55 -> std::vector<std::string>;
56
63 [[nodiscard]] virtual auto getSimilarity_(const std::string &username1,
64 const std::string &username2)
65 -> float;
66};
67
68#endif // PAIR_HPP
A class to manage user pairs and their similarities.
Definition pair.hpp:12
auto getPair(const std::string &username) -> std::vector< std::string >
Gets a pair of usernames for the given username.
friend class MockPair
Allows MockPair to access private members.
Definition pair.hpp:39
void setStorage(const Storage &storage)
Sets the storage object.
virtual ~Pair()
Destructor for the Pair class.
Pair()
Constructor for the Pair class.
A class to manage user data.
Definition storage.hpp:14