Public Member Functions | Static Public Member Functions | List of all members
ndn::KeyLocator Class Reference

Public Member Functions

void clear ()
 Clear the keyData and set the type to none.
 
void get (KeyLocatorLite &keyLocatorLite) const
 Set keyLocatorLite to point to the values in this key locator, without copying any memory. More...
 
void set (const KeyLocatorLite &keyLocatorLite)
 Clear this key locator, and set the values by copying from keyLocatorLite. More...
 
ndn_KeyLocatorType getType () const
 
const BlobgetKeyData () const
 
const NamegetKeyName () const
 
NamegetKeyName ()
 
void setType (ndn_KeyLocatorType type)
 
void setKeyData (const Blob &keyData)
 
void setKeyName (const Name &keyName)
 
uint64_t getChangeCount () const
 Get the change count, which is incremented each time this object (or a child object) is changed. More...
 

Static Public Member Functions

static bool canGetFromSignature (const Signature *signature)
 If the signature is a type that has a KeyLocator (so that getFromSignature will succeed), return true. More...
 
static const KeyLocatorgetFromSignature (const Signature *signature)
 If the signature is a type that has a KeyLocator, then return it. More...
 

Member Function Documentation

bool ndn::KeyLocator::canGetFromSignature ( const Signature signature)
static

If the signature is a type that has a KeyLocator (so that getFromSignature will succeed), return true.

Note: This is a static method of KeyLocator instead of a method of Signature so that the Signature base class does not need to be overloaded with all the different kinds of information that various signature algorithms may use.

Parameters
signatureAn object of a subclass of Signature.
Returns
True if the signature is a type that has a KeyLocator, otherwise false.
void ndn::KeyLocator::get ( KeyLocatorLite keyLocatorLite) const

Set keyLocatorLite to point to the values in this key locator, without copying any memory.

WARNING: The resulting pointers in keyLocatorLite are invalid after a further use of this object which could reallocate memory.

Parameters
keyLocatorLiteA KeyLocatorLite where the name components array is already allocated.
uint64_t ndn::KeyLocator::getChangeCount ( ) const
inline

Get the change count, which is incremented each time this object (or a child object) is changed.

Returns
The change count.
const KeyLocator & ndn::KeyLocator::getFromSignature ( const Signature signature)
static

If the signature is a type that has a KeyLocator, then return it.

Otherwise throw an error.

Parameters
signatureAn object of a subclass of Signature.
Returns
The signature's KeyLocator. It is an error if signature doesn't have a KeyLocator.
void ndn::KeyLocator::set ( const KeyLocatorLite keyLocatorLite)

Clear this key locator, and set the values by copying from keyLocatorLite.

Parameters
keyLocatorLiteA KeyLocatorLite object.

The documentation for this class was generated from the following files: