Classes | Public Member Functions | List of all members
ndn::DigestTree Class Reference

Classes

class  Node
 

Public Member Functions

bool update (const std::string &dataPrefix, int sessionNo, int sequenceNo)
 Update the digest tree and recompute the root digest. More...
 
int find (const std::string &dataPrefix, int sessionNo) const
 
size_t size () const
 
const DigestTree::Nodeget (size_t i) const
 
const std::string & getRoot () const
 Get the root digest. More...
 

Member Function Documentation

const std::string& ndn::DigestTree::getRoot ( ) const
inline

Get the root digest.

Returns
The root digest as a hex string.
bool ndn::DigestTree::update ( const std::string &  dataPrefix,
int  sessionNo,
int  sequenceNo 
)

Update the digest tree and recompute the root digest.

If the combination of dataPrefix and sessionNo already exists in the tree then update its sequenceNo (only if the given sequenceNo is newer), otherwise add a new node.

Parameters
dataPrefixThe name prefix.
sessionNoThe session number.
sequenceNoThe new sequence number.
Returns
True if the digest tree is updated, false if not (because the given sequenceNo is not newer than the existing sequence number).

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