Base Framework
Classes | Public Types | Public Member Functions | List of all members
Trustee Class Reference

Trustee. More...

#include <base/security/Trustee.h>

Inherits Object.

Classes

class  TrusteeException
 Trustee exception. More...
 

Public Types

enum  TrusteeType {
  UNSPECIFIED, USER, GROUP, CLASS,
  EVERYONE
}
 

Public Member Functions

 Trustee () noexcept
 
 Trustee (User user) noexcept
 
 Trustee (Group group) noexcept
 
 Trustee (TrusteeType type, const void *id)
 
 Trustee (const Trustee &copy) noexcept
 
Trusteeoperator= (const Trustee &assign) noexcept
 
 Trustee (const String &name)
 
bool operator== (const Trustee &compare) const noexcept
 
bool operator!= (const Trustee &compare) const noexcept
 
bool isInitialized () const noexcept
 
TrusteeType getType () const
 
bool isMemberOf (const Trustee &trustee) const
 
unsigned long getIntegralId () const noexcept
 
String getName () const
 
String getFullName () const
 

Detailed Description

Trustee.

A trustee (e.g. user or group).

Version
1.2

Member Enumeration Documentation

◆ TrusteeType

The type of trustee.

Enumerator
UNSPECIFIED 

Trustee is unspecified.

USER 

Trustee is a user.

GROUP 

Trustee is a group.

CLASS 

Trustee is a class.

EVERYONE 

Everyone.

Constructor & Destructor Documentation

◆ Trustee() [1/6]

Trustee::Trustee ( )
noexcept

Initializes trustee as invalid.

◆ Trustee() [2/6]

Trustee::Trustee ( User  user)
noexcept

Initializes trustee from user.

◆ Trustee() [3/6]

Trustee::Trustee ( Group  group)
noexcept

Initializes trustee from group.

◆ Trustee() [4/6]

Trustee::Trustee ( TrusteeType  type,
const void *  id 
)

Initializes trustee by id. Raises OutOfDomain if the specified id is not supported by the platform.

◆ Trustee() [5/6]

Trustee::Trustee ( const Trustee copy)
noexcept

Initializes trustee from other trustee.

◆ Trustee() [6/6]

Trustee::Trustee ( const String name)

Initializes trustee by name.

Member Function Documentation

◆ getFullName()

String Trustee::getFullName ( ) const

Returns the full name of the trustee.

◆ getIntegralId()

unsigned long Trustee::getIntegralId ( ) const
inlinenoexcept

Returns the integral id.

◆ getName()

String Trustee::getName ( ) const

Returns the short name of the trustee.

◆ getType()

TrusteeType Trustee::getType ( ) const

Returns type of the trustee.

◆ isInitialized()

bool Trustee::isInitialized ( ) const
noexcept

Returns true if the trustee is initialized. This does not mean that the trustee exists.

◆ isMemberOf()

bool Trustee::isMemberOf ( const Trustee trustee) const

Returns true if the specified trustee is a member of this trustee (if a group) and otherwise returns false (also if trustee is currently INVALID). Raises TrusteeException if group could not be enumerated.

◆ operator!=()

bool Trustee::operator!= ( const Trustee compare) const
inlinenoexcept

Returns false if the trustees are not identical. The method returns false if both trustees are invalid.

◆ operator=()

Trustee& Trustee::operator= ( const Trustee assign)
noexcept

Assignment of trustee by trustee.

◆ operator==()

bool Trustee::operator== ( const Trustee compare) const
noexcept

Returns true if the trustees are identical. The method returns true if both trustees are invalid.