Yosokumo::Privilege Class Reference

#include <Privilege.h>

List of all members.

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

Detailed Description

Definition at line 17 of file Privilege.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
NUMBER_OF_PRIVILEGES 

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.

Enumerator:
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.


Constructor & Destructor Documentation

Privilege::Privilege ( int  value  ) 

Initializes a newly created Privilege object with a value specified by the input parameter.

Parameters:
value the value to assign to the privilege.

Definition at line 7 of file Privilege.cpp.


Member Function Documentation

std::string Privilege::getName (  )  const

Return the Privilege name.

Returns:
the name of this 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.

Returns:
the enum value of this 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.

Parameters:
value the integer to convert.
Returns:
the 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().


Member Data Documentation

Definition at line 49 of file Privilege.h.

Referenced by getName(), and getNumber().


The documentation for this class was generated from the following files:
Generated on Mon May 13 09:19:12 2013 for C++ Yosokumo API by  doxygen 1.6.3