My Project 3.5.5
C++ Distributed Hash Table
Loading...
Searching...
No Matches
dht::ValueType Struct Reference
Collaboration diagram for dht::ValueType:

Public Types

typedef uint16_t Id

Public Member Functions

 ValueType (Id id, std::string name, duration e=DEFAULT_VALUE_EXPIRATION)
 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 OPENDHT_PUBLIC 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 {DEFAULT_VALUE_EXPIRATION}
StorePolicy storePolicy {DEFAULT_STORE_POLICY}
EditPolicy editPolicy {DEFAULT_EDIT_POLICY}

Static Public Attributes

static OPENDHT_PUBLIC const ValueType USER_DATA

Detailed Description

Definition at line 95 of file value.h.

Member Typedef Documentation

◆ Id

typedef uint16_t dht::ValueType::Id

Definition at line 96 of file value.h.

Constructor & Destructor Documentation

◆ ValueType() [1/3]

dht::ValueType::ValueType ( )
inline

Definition at line 103 of file value.h.

◆ ValueType() [2/3]

dht::ValueType::ValueType ( Id id,
std::string name,
duration e = DEFAULT_VALUE_EXPIRATION )
inline

Definition at line 105 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 108 of file value.h.

◆ ~ValueType()

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

Definition at line 111 of file value.h.

Member Function Documentation

◆ DEFAULT_EDIT_POLICY()

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

Definition at line 99 of file value.h.

◆ operator==()

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

Definition at line 113 of file value.h.

Member Data Documentation

◆ editPolicy

EditPolicy dht::ValueType::editPolicy {DEFAULT_EDIT_POLICY}

Definition at line 125 of file value.h.

◆ expiration

duration dht::ValueType::expiration {DEFAULT_VALUE_EXPIRATION}

Definition at line 123 of file value.h.

◆ id

Id dht::ValueType::id {0}

Definition at line 121 of file value.h.

◆ name

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

Definition at line 122 of file value.h.

◆ storePolicy

StorePolicy dht::ValueType::storePolicy {DEFAULT_STORE_POLICY}

Definition at line 124 of file value.h.

◆ USER_DATA

OPENDHT_PUBLIC const ValueType dht::ValueType::USER_DATA
static

Definition at line 118 of file value.h.


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