My Project 3.2.0
C++ Distributed Hash Table
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
dht::ValueType Struct Reference
Collaboration diagram for dht::ValueType:
Collaboration graph
[legend]

Public Types

typedef uint16_t Id
 

Public Member Functions

 ValueType (Id id, std::string name, duration e=std::chrono::minutes(10))
 
 ValueType (Id id, std::string name, duration e, StorePolicy sp, EditPolicy ep=DEFAULT_EDIT_POLICY)
 
bool operator== (const ValueType &o)
 

Static Public Member Functions

static bool DEFAULT_STORE_POLICY (InfoHash, const std::shared_ptr< Value > &v, const InfoHash &, const SockAddr &)
 
static bool DEFAULT_EDIT_POLICY (InfoHash, const std::shared_ptr< Value > &, std::shared_ptr< Value > &, const InfoHash &, const SockAddr &)
 

Public Attributes

Id id {0}
 
std::string name {}
 
duration expiration {std::chrono::minutes(10)}
 
StorePolicy storePolicy {DEFAULT_STORE_POLICY}
 
EditPolicy editPolicy {DEFAULT_EDIT_POLICY}
 

Static Public Attributes

static const ValueType USER_DATA
 

Detailed Description

Definition at line 94 of file value.h.

Member Typedef Documentation

◆ Id

typedef uint16_t dht::ValueType::Id

Definition at line 95 of file value.h.

Constructor & Destructor Documentation

◆ ValueType() [1/3]

dht::ValueType::ValueType ( )
inline

Definition at line 102 of file value.h.

◆ ValueType() [2/3]

dht::ValueType::ValueType ( Id id,
std::string name,
duration e = std::chrono::minutes(10) )
inline

Definition at line 104 of file value.h.

◆ ValueType() [3/3]

dht::ValueType::ValueType ( Id id,
std::string name,
duration e,
StorePolicy sp,
EditPolicy ep = DEFAULT_EDIT_POLICY )
inline

Definition at line 107 of file value.h.

◆ ~ValueType()

virtual dht::ValueType::~ValueType ( )
inlinevirtual

Definition at line 110 of file value.h.

Member Function Documentation

◆ DEFAULT_EDIT_POLICY()

static bool dht::ValueType::DEFAULT_EDIT_POLICY ( InfoHash ,
const std::shared_ptr< Value > & ,
std::shared_ptr< Value > & ,
const InfoHash & ,
const SockAddr &  )
inlinestatic

Definition at line 98 of file value.h.

◆ operator==()

bool dht::ValueType::operator== ( const ValueType & o)
inline

Definition at line 112 of file value.h.

Member Data Documentation

◆ editPolicy

EditPolicy dht::ValueType::editPolicy {DEFAULT_EDIT_POLICY}

Definition at line 124 of file value.h.

◆ expiration

duration dht::ValueType::expiration {std::chrono::minutes(10)}

Definition at line 122 of file value.h.

◆ id

Id dht::ValueType::id {0}

Definition at line 120 of file value.h.

◆ name

std::string dht::ValueType::name {}

Definition at line 121 of file value.h.

◆ storePolicy

StorePolicy dht::ValueType::storePolicy {DEFAULT_STORE_POLICY}

Definition at line 123 of file value.h.

◆ USER_DATA

const ValueType dht::ValueType::USER_DATA
static

Definition at line 117 of file value.h.


The documentation for this struct was generated from the following file: