#ifndef ROLE_H_249F9A9C #define ROLE_H_249F9A9C #include #include #include namespace verbly { class role { public: // Default constructor role() = default; // Constructor role( std::string name, std::set selrestrs = {}) : valid_(true), name_(name), selrestrs_(selrestrs) { } // Accessors const std::string& getName() const { if (!valid_) { throw std::domain_error("Bad access to invalid role"); } return name_; } const std::set& getSelrestrs() const { if (!valid_) { throw std::domain_error("Bad access to invalid role"); } return selrestrs_; } private: bool valid_ = false; std::string name_; std::set selrestrs_; }; }; #endif /* end of include guard: ROLE_H_249F9A9C */