summary refs log tree commit diff stats
path: root/lib/role.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/role.h')
-rw-r--r--lib/role.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/role.h b/lib/role.h index 8653710..4884ef3 100644 --- a/lib/role.h +++ b/lib/role.h
@@ -9,13 +9,13 @@ namespace verbly {
9 9
10 class role { 10 class role {
11 public: 11 public:
12 12
13 // Default constructor 13 // Default constructor
14 14
15 role() = default; 15 role() = default;
16 16
17 // Constructor 17 // Constructor
18 18
19 role( 19 role(
20 std::string name, 20 std::string name,
21 selrestr selrestrs = {}) : 21 selrestr selrestrs = {}) :
@@ -24,35 +24,35 @@ namespace verbly {
24 selrestrs_(selrestrs) 24 selrestrs_(selrestrs)
25 { 25 {
26 } 26 }
27 27
28 // Accessors 28 // Accessors
29 29
30 const std::string& getName() const 30 const std::string& getName() const
31 { 31 {
32 if (!valid_) 32 if (!valid_)
33 { 33 {
34 throw std::domain_error("Bad access to invalid role"); 34 throw std::domain_error("Bad access to invalid role");
35 } 35 }
36 36
37 return name_; 37 return name_;
38 } 38 }
39 39
40 const selrestr& getSelrestrs() const 40 const selrestr& getSelrestrs() const
41 { 41 {
42 if (!valid_) 42 if (!valid_)
43 { 43 {
44 throw std::domain_error("Bad access to invalid role"); 44 throw std::domain_error("Bad access to invalid role");
45 } 45 }
46 46
47 return selrestrs_; 47 return selrestrs_;
48 } 48 }
49 49
50 private: 50 private:
51 51
52 bool valid_ = false; 52 bool valid_ = false;
53 std::string name_; 53 std::string name_;
54 selrestr selrestrs_; 54 selrestr selrestrs_;
55 55
56 }; 56 };
57 57
58}; 58};