fipa_acl  1.4
Public Member Functions | Static Public Member Functions | Static Protected Attributes | List of all members
fipa::acl::Role Class Reference

#include <role.h>

Inherited by fipa::acl::SelfRole, and fipa::acl::UndefinedRole.

Public Member Functions

 Role ()
 
 Role (const RoleId &id)
 
 Role (const Role &)
 
RoleId getId () const
 
std::string toString () const
 
bool operator< (const Role &other) const
 
bool operator!= (const Role &other) const
 
bool operator== (const Role &other) const
 
Roleoperator= (const Role &other)
 

Static Public Member Functions

static const Role self ()
 

Static Protected Attributes

static const RoleId UNDEFINED_ID = "__undefined__"
 
static const RoleId SELF_ID ="__self__"
 

Detailed Description

Definition at line 15 of file role.h.

Constructor & Destructor Documentation

◆ Role() [1/3]

fipa::acl::Role::Role ( )

Role default constructor (required for map implementation)

Definition at line 13 of file role.cpp.

14  : mId(Role::UNDEFINED_ID)
15 {
16 }
static const RoleId UNDEFINED_ID
Definition: role.h:25

◆ Role() [2/3]

fipa::acl::Role::Role ( const RoleId id)

Role default constructor

Definition at line 18 of file role.cpp.

19  : mId(id)
20 {
21 }

◆ Role() [3/3]

fipa::acl::Role::Role ( const Role other)

Copy constructor

Definition at line 23 of file role.cpp.

24 {
25  mId = other.mId;
26 }

Member Function Documentation

◆ getId()

RoleId fipa::acl::Role::getId ( ) const
inline

Get role id

Definition at line 52 of file role.h.

52 { return mId; }

◆ operator!=()

bool fipa::acl::Role::operator!= ( const Role other) const
inline

Definition at line 65 of file role.h.

66  {
67  return !(mId == other.mId);
68  }

◆ operator<()

bool fipa::acl::Role::operator< ( const Role other) const
inline

Definition at line 60 of file role.h.

61  {
62  return mId < other.mId;
63  }

◆ operator=()

Role& fipa::acl::Role::operator= ( const Role other)
inline

Definition at line 75 of file role.h.

76  {
77  mId = other.mId;
78  return *this;
79  }

◆ operator==()

bool fipa::acl::Role::operator== ( const Role other) const
inline

Definition at line 70 of file role.h.

71  {
72  return mId == other.mId;
73  }

◆ self()

static const Role fipa::acl::Role::self ( )
static

Role self

◆ toString()

std::string fipa::acl::Role::toString ( ) const
inline

Convert role to a string

Returns
string

Definition at line 58 of file role.h.

58 { return mId; }

Member Data Documentation

◆ SELF_ID

const RoleId fipa::acl::Role::SELF_ID ="__self__"
staticprotected

Definition at line 26 of file role.h.

◆ UNDEFINED_ID

const RoleId fipa::acl::Role::UNDEFINED_ID = "__undefined__"
staticprotected

Interal role ids

Definition at line 25 of file role.h.


The documentation for this class was generated from the following files: