#include <Privilege.h>
Public Types | |
enum | { NUMBER_OF_PRIVILEGES = 13 } |
enum | Type { GET_STUDY = 1, DELETE_STUDY = 2, GET_ROSTER = 3, POST_ROSTER = 4, GET_ROLE = 5, PUT_ROLE = 6, DELETE_ROLE = 7, GET_PANEL = 8, GET_CONTROL = 9, PUT_CONTROL = 10, POST_TABLE = 11, GET_MODEL = 12, POST_MODEL = 13, GET_CATALOG = 14, POST_CATALOG = 15 } |
Indicates an operation which a given user is or is not allowed to perform on a given study. More... | |
Public Member Functions | |
Privilege (int value) | |
Initializes a newly created Privilege object with a value specified by the input parameter. | |
int | getNumber () const |
Return the Privilege enum value as an integer. | |
std::string | getName () const |
Return the Privilege name. | |
Static Public Member Functions | |
static Type | valueOf (int value) |
Convert an integer to a Privilege enum value. | |
Private Attributes | |
int | value |
Definition at line 17 of file Privilege.h.
anonymous enum |
Definition at line 21 of file Privilege.h.
Indicates an operation which a given user is or is not allowed to perform on a given study.
GET_STUDY | |
DELETE_STUDY | |
GET_ROSTER | |
POST_ROSTER | |
GET_ROLE | |
PUT_ROLE | |
DELETE_ROLE | |
GET_PANEL | |
GET_CONTROL | |
PUT_CONTROL | |
POST_TABLE | |
GET_MODEL | |
POST_MODEL | |
GET_CATALOG | |
POST_CATALOG |
Definition at line 27 of file Privilege.h.
Privilege::Privilege | ( | int | value | ) |
Initializes a newly created Privilege
object with a value specified by the input parameter.
value | the value to assign to the privilege. |
Definition at line 7 of file Privilege.cpp.
std::string Privilege::getName | ( | ) | const |
Return the Privilege
name.
Privilege
. Definition at line 18 of file Privilege.cpp.
References value.
Referenced by Yosokumo::Role::toStringInternal().
int Privilege::getNumber | ( | ) | const |
Return the Privilege
enum value as an integer.
Privilege
as an integer. Definition at line 13 of file Privilege.cpp.
References value.
Referenced by Yosokumo::Role::addPrivilege(), Yosokumo::Role::getPrivilege(), and Yosokumo::Role::removePrivilege().
Privilege::Type Privilege::valueOf | ( | int | value | ) | [static] |
Convert an integer to a Privilege
enum value.
value | the integer to convert. |
Type
enum value corresponding to the value parameter, or zero if the parameter does not correspond to any enum value. Definition at line 39 of file Privilege.cpp.
References DELETE_ROLE, DELETE_STUDY, GET_CONTROL, GET_MODEL, GET_PANEL, GET_ROLE, GET_ROSTER, GET_STUDY, POST_MODEL, POST_ROSTER, POST_TABLE, PUT_CONTROL, and PUT_ROLE.
Referenced by Yosokumo::Role::toStringInternal().
int Yosokumo::Privilege::value [private] |
Definition at line 49 of file Privilege.h.
Referenced by getName(), and getNumber().