rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ripple::Permission Class Reference

#include <Permissions.h>

Collaboration diagram for ripple::Permission:
Collaboration graph
[legend]

Public Member Functions

 Permission (Permission const &)=delete
 
Permissionoperator= (Permission const &)=delete
 
std::optional< std::stringgetPermissionName (std::uint32_t const value) const
 
std::optional< std::uint32_tgetGranularValue (std::string const &name) const
 
std::optional< std::stringgetGranularName (GranularPermissionType const &value) const
 
std::optional< TxTypegetGranularTxType (GranularPermissionType const &gpType) const
 
std::optional< std::reference_wrapper< uint256 const > > const getTxFeature (TxType txType) const
 
bool isDelegatable (std::uint32_t const &permissionValue, Rules const &rules) const
 
uint32_t txToPermissionType (TxType const &type) const
 
TxType permissionToTxType (uint32_t const &value) const
 

Static Public Member Functions

static Permission const & getInstance ()
 

Private Member Functions

 Permission ()
 

Private Attributes

std::unordered_map< std::uint16_t, uint256txFeatureMap_
 
std::unordered_map< std::uint16_t, DelegationdelegatableTx_
 
std::unordered_map< std::string, GranularPermissionTypegranularPermissionMap_
 
std::unordered_map< GranularPermissionType, std::stringgranularNameMap_
 
std::unordered_map< GranularPermissionType, TxTypegranularTxTypeMap_
 

Detailed Description

Definition at line 53 of file Permissions.h.

Constructor & Destructor Documentation

◆ Permission() [1/2]

ripple::Permission::Permission ( )
private

Definition at line 27 of file Permissions.cpp.

◆ Permission() [2/2]

ripple::Permission::Permission ( Permission const &  )
delete

Member Function Documentation

◆ getInstance()

Permission const & ripple::Permission::getInstance ( )
static

Definition at line 98 of file Permissions.cpp.

◆ operator=()

Permission & ripple::Permission::operator= ( Permission const &  )
delete

◆ getPermissionName()

std::optional< std::string > ripple::Permission::getPermissionName ( std::uint32_t const  value) const

Definition at line 105 of file Permissions.cpp.

◆ getGranularValue()

std::optional< std::uint32_t > ripple::Permission::getGranularValue ( std::string const &  name) const

Definition at line 121 of file Permissions.cpp.

◆ getGranularName()

std::optional< std::string > ripple::Permission::getGranularName ( GranularPermissionType const &  value) const

Definition at line 131 of file Permissions.cpp.

◆ getGranularTxType()

std::optional< TxType > ripple::Permission::getGranularTxType ( GranularPermissionType const &  gpType) const

Definition at line 141 of file Permissions.cpp.

◆ getTxFeature()

std::optional< std::reference_wrapper< uint256 const > > const ripple::Permission::getTxFeature ( TxType  txType) const

Definition at line 151 of file Permissions.cpp.

◆ isDelegatable()

bool ripple::Permission::isDelegatable ( std::uint32_t const &  permissionValue,
Rules const &  rules 
) const

Definition at line 164 of file Permissions.cpp.

◆ txToPermissionType()

uint32_t ripple::Permission::txToPermissionType ( TxType const &  type) const

Definition at line 199 of file Permissions.cpp.

◆ permissionToTxType()

TxType ripple::Permission::permissionToTxType ( uint32_t const &  value) const

Definition at line 205 of file Permissions.cpp.

Member Data Documentation

◆ txFeatureMap_

std::unordered_map<std::uint16_t, uint256> ripple::Permission::txFeatureMap_
private

Definition at line 58 of file Permissions.h.

◆ delegatableTx_

std::unordered_map<std::uint16_t, Delegation> ripple::Permission::delegatableTx_
private

Definition at line 60 of file Permissions.h.

◆ granularPermissionMap_

std::unordered_map<std::string, GranularPermissionType> ripple::Permission::granularPermissionMap_
private

Definition at line 63 of file Permissions.h.

◆ granularNameMap_

std::unordered_map<GranularPermissionType, std::string> ripple::Permission::granularNameMap_
private

Definition at line 65 of file Permissions.h.

◆ granularTxTypeMap_

std::unordered_map<GranularPermissionType, TxType> ripple::Permission::granularTxTypeMap_
private

Definition at line 67 of file Permissions.h.