-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathData.hpp
More file actions
31 lines (28 loc) · 1 KB
/
Data.hpp
File metadata and controls
31 lines (28 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Created by Berkay on 5/28/2022.
//
#pragma once
#ifndef BERKAY_BAYAR_PASSWORD_MANAGER_S25786_DATA_HPP
#define BERKAY_BAYAR_PASSWORD_MANAGER_S25786_DATA_HPP
#include <utility>
#include <vector>
#include <iostream>
#include <algorithm>
class Data {
protected:
std::string _username, _password, _url;
std::vector<std::string> _cat;
public:
const std::string & username() {return _username;}
const std::string & password() {return _password;}
const std::string & url() {return _url;}
std::vector<std::string> & cat() {return _cat;}
Data(std::string usr, std::string pswd, std::string url): _username(std::move(usr)), _password(std::move(pswd)), _url(std::move(url)) {}
auto add_cat (std::string& cat) -> void;
auto remove_cat (std::string& cat) -> void;
auto change_username (std::string usr) -> void;
auto change_password (std::string pswd) -> void;
auto change_url (std::string url) -> void;
auto clear_cat();
};
#endif //BERKAY_BAYAR_PASSWORD_MANAGER_S25786_DATA_HPP