#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 | |
bool | _hreadable |
bool | _copy |
int | _length |
uint8_t * | _bytes |
Friends | |
std::ostream & | operator<< (std::ostream &, const ::ariba::Name &) |
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 112 of file Name.cpp.
References _bytes.
Referenced by Name(), operator=(), operator==(), toNodeId(), toSpoVNetId(), and toString().
const size_t ariba::Name::length | ( | ) | const |
Returns the length of the name in bytes.
Definition at line 116 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 |
bool ariba::Name::isUnspecified | ( | ) | const |
Returns true, if the name is yet unspecified
Definition at line 136 of file Name.cpp.
References UNSPECIFIED.
Name ariba::Name::random | ( | ) | [static] |
Returns a random name.
Definition at line 140 of file Name.cpp.
References Name().
Referenced by ariba::Node::generateNodeId().
string ariba::Name::toString | ( | ) | const |
Returns a human-readable representation of this name
Definition at line 152 of file Name.cpp.
References _hreadable, bytes(), and length().
Referenced by ariba::AribaModule::getBootstrapHints(), operator<<(), and ariba::SpoVNetProperties::toString().
NodeID ariba::Name::toNodeId | ( | ) | const |
Definition at line 163 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 168 of file Name.cpp.
References bytes(), length(), and ariba::utility::SpoVNetID::UNSPECIFIED.
Referenced by ariba::Node::initiate(), ariba::Node::join(), and ariba::SpoVNetProperties::SpoVNetProperties().
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=().
std::ostream& operator<< | ( | std::ostream & | , | |
const ::ariba::Name & | ||||
) | [friend] |
const Name ariba::Name::UNSPECIFIED [static] |
Definition at line 66 of file Name.h.
Referenced by ariba::Node::generateNodeId(), isUnspecified(), and ariba::application::pingpong::PingPong::startup().
bool ariba::Name::_hreadable [private] |
bool ariba::Name::_copy [private] |
int ariba::Name::_length [private] |
uint8_t* ariba::Name::_bytes [private] |