#include <source/ariba/Name.h>

Public Member Functions | |
| Name () | |
| Name (const char *name, int len=-1, bool copy=false) | |
| Name (string name) | |
| Name (const Name &name) | |
| virtual | ~Name () |
| const uint8_t * | bytes () const |
| const size_t | length () const |
| Name & | operator= (const Name &name) |
| bool | operator== (const Name &name) const |
| bool | operator!= (const Name &name) const |
| bool | isUnspecified () const |
| string | toString () const |
| NodeID | toNodeId () const |
| SpoVNetID | toSpoVNetId () const |
Static Public Member Functions | |
| static Name | random () |
Static Public Attributes | |
| static const Name | UNSPECIFIED |
Private Member Functions | |
| void | init (const char *name, int len, bool copy, bool hreadable) |
Private Attributes | |
| uint8_t * | _bytes |
| int | _length |
| bool | _copy |
| bool | _hreadable |
Friends | |
| std::ostream & | operator<< (std::ostream &, const ::ariba::Name &) |
This class is a wrapper for canonical names. Currently only human readable names are supported.
Definition at line 63 of file Name.h.
| ariba::Name::Name | ( | ) |
| ariba::Name::Name | ( | const char * | name, | |
| int | len = -1, |
|||
| bool | copy = false | |||
| ) |
| ariba::Name::Name | ( | string | name | ) |
| ariba::Name::Name | ( | const Name & | name | ) |
| ariba::Name::~Name | ( | ) | [virtual] |
| const uint8_t * ariba::Name::bytes | ( | ) | const |
Returns the binary bytes of the name
Definition at line 113 of file Name.cpp.
References _bytes.
Referenced by Name(), operator=(), operator==(), toNodeId(), toSpoVNetId(), and toString().
| void ariba::Name::init | ( | const char * | name, | |
| int | len, | |||
| bool | copy, | |||
| bool | hreadable | |||
| ) | [private] |
Definition at line 49 of file Name.cpp.
References _bytes, _copy, _hreadable, and _length.
Referenced by Name(), and operator=().
| bool ariba::Name::isUnspecified | ( | ) | const |
Returns true, if the name is yet unspecified
Definition at line 137 of file Name.cpp.
References UNSPECIFIED.
| const size_t ariba::Name::length | ( | ) | const |
Returns the length of the name in bytes.
Definition at line 117 of file Name.cpp.
References _length.
Referenced by Name(), operator=(), operator==(), toNodeId(), toSpoVNetId(), and toString().
| bool ariba::Name::operator!= | ( | const Name & | name | ) | const |
| bool ariba::Name::operator== | ( | const Name & | name | ) | const |
| Name ariba::Name::random | ( | ) | [static] |
Returns a random name.
Definition at line 141 of file Name.cpp.
References Name().
Referenced by ariba::Node::generateNodeId().
| NodeID ariba::Name::toNodeId | ( | ) | const |
Definition at line 164 of file Name.cpp.
References bytes(), length(), and ariba::utility::NodeID::UNSPECIFIED.
Referenced by ariba::Node::generateNodeId().
| SpoVNetID ariba::Name::toSpoVNetId | ( | ) | const |
Definition at line 169 of file Name.cpp.
References bytes(), length(), and ariba::utility::SpoVNetID::UNSPECIFIED.
Referenced by ariba::Node::initiate(), and ariba::Node::join().
| string ariba::Name::toString | ( | ) | const |
Returns a human-readable representation of this name
Definition at line 153 of file Name.cpp.
References _hreadable, bytes(), and length().
Referenced by ariba::AribaModule::getBootstrapHints(), ariba::Node::getName(), and operator<<().
| std::ostream& operator<< | ( | std::ostream & | , | |
| const ::ariba::Name & | ||||
| ) | [friend] |
uint8_t* ariba::Name::_bytes [private] |
bool ariba::Name::_copy [private] |
bool ariba::Name::_hreadable [private] |
Definition at line 154 of file Name.h.
Referenced by init(), Name(), operator=(), and toString().
int ariba::Name::_length [private] |
const Name ariba::Name::UNSPECIFIED [static] |
Definition at line 66 of file Name.h.
Referenced by ariba::Node::generateNodeId(), isUnspecified(), ariba::application::dhttest::DHTTest::startup(), and ariba::application::pingpong::PingPong::startup().
1.6.1