Public Member Functions |
| OverlayKeyObject (const OverlayKey &key) |
| OverlayKey () |
| Default constructor.
|
| OverlayKey (uint32_t num) |
| Constructs an overlay key initialized with a common integer.
|
| OverlayKey (const unsigned char *buffer, uint32_t size) |
| Constructs a key out of a buffer.
|
| OverlayKey (const std::string &str, uint32_t base=16) |
| Constructs a key out of a string number.
|
| OverlayKey (const OverlayKey &rhs) |
| Copy constructor.
|
| ~OverlayKey () |
| Default destructor.
|
std::string | toString (uint32_t base=16) const |
| Returns a string representation of this key.
|
bool | isUnspecified () const |
| Returns true, if the key is unspecified.
|
bool | operator< (const OverlayKey &compKey) const |
| compares this to a given OverlayKey
|
bool | operator> (const OverlayKey &compKey) const |
| compares this to a given OverlayKey
|
bool | operator<= (const OverlayKey &compKey) const |
| compares this to a given OverlayKey
|
bool | operator>= (const OverlayKey &compKey) const |
| compares this to a given OverlayKey
|
bool | operator== (const OverlayKey &compKey) const |
| compares this to a given OverlayKey
|
bool | operator!= (const OverlayKey &compKey) const |
| compares this to a given OverlayKey
|
int | compareTo (const OverlayKey &compKey) const |
| Unifies all compare operations in one method.
|
OverlayKey & | operator= (const OverlayKey &rhs) |
| assigns OverlayKey of rhs to this->key
|
OverlayKey & | operator-- () |
| substracts 1 from this->key
|
OverlayKey & | operator++ () |
| adds 1 to this->key
|
OverlayKey & | operator+= (const OverlayKey &rhs) |
| adds rhs->key to this->key
|
OverlayKey & | operator-= (const OverlayKey &rhs) |
| substracts rhs->key from this->key
|
OverlayKey | operator+ (const OverlayKey &rhs) const |
| adds rhs->key to this->key
|
OverlayKey | operator- (const OverlayKey &rhs) const |
| substracts rhs->key from this->key
|
OverlayKey | operator-- (int) |
| substracts 1 from this->key
|
OverlayKey | operator++ (int) |
| adds 1 to this->key
|
OverlayKey | operator>> (uint32_t num) const |
| bitwise shift right
|
OverlayKey | operator<< (uint32_t num) const |
| bitwise shift left
|
OverlayKey | operator& (const OverlayKey &rhs) const |
| bitwise AND of rhs->key and this->key
|
OverlayKey | operator| (const OverlayKey &rhs) const |
| bitwise OR of rhs->key and this->key
|
OverlayKey | operator^ (const OverlayKey &rhs) const |
| bitwise XOR of rhs->key and this->key
|
OverlayKey | operator~ () const |
| bitwise NOT of this->key
|
OverlayKeyBit | operator[] (uint32_t n) |
| returns the n-th bit of this->key
|
OverlayKey & | setBit (uint32_t pos, bool value) |
| sets a bit of this->key
|
uint32_t | getBitRange (uint32_t p, uint32_t n) const |
| Returns a sub integer at position p with n-bits.
|
double | toDouble () const |
bool | getBit (uint32_t p) const |
size_t | hash () const |
| Returns a hash value for the key.
|
int | log_2 () const |
| Returns the position of the msb in this key, which represents just the logarithm to base 2.
|
OverlayKey | randomSuffix (uint32_t pos) const |
| Fills the suffix starting at pos with random bits to lsb.
|
OverlayKey | randomPrefix (uint32_t pos) const |
| Fills the prefix starting at pos with random bits to msb.
|
uint32_t | sharedPrefixLength (const OverlayKey &compKey, uint32_t bitsPerDigit=1) const |
| Calculates the number of equal bits (digits) from the left with another Key (shared prefix length)
|
bool | isBetween (const OverlayKey &keyA, const OverlayKey &keyB) const |
| Returns true, if this key is element of the interval (keyA, keyB) on the ring.
|
bool | isBetweenR (const OverlayKey &keyA, const OverlayKey &keyB) const |
| Returns true, if this key is element of the interval (keyA, keyB] on the ring.
|
bool | isBetweenL (const OverlayKey &keyA, const OverlayKey &keyB) const |
| Returns true, if this key is element of the interval [keyA, keyB) on the ring.
|
bool | isBetweenLR (const OverlayKey &keyA, const OverlayKey &keyB) const |
| Returns true, if this key is element of the interval [keyA, keyB] on the ring.
|
void | netPack (cCommBuffer *b) |
| serializes the object into a buffer
|
void | netUnpack (cCommBuffer *b) |
| deserializes the object from a buffer
|
Definition at line 63 of file P2pns.h.