NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
delegation.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #include "delegation.hpp"
23 
24 namespace ndn {
25 
26 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Delegation>));
27 
28 bool
29 operator==(const Delegation& lhs, const Delegation& rhs)
30 {
31  return lhs.preference == rhs.preference &&
32  lhs.name == rhs.name;
33 }
34 
35 bool
36 operator<(const Delegation& lhs, const Delegation& rhs)
37 {
38  return std::tie(lhs.preference, lhs.name) <
39  std::tie(rhs.preference, rhs.name);
40 }
41 
42 bool
43 operator<=(const Delegation& lhs, const Delegation& rhs)
44 {
45  return std::tie(lhs.preference, lhs.name) <=
46  std::tie(rhs.preference, rhs.name);
47 }
48 
49 std::ostream&
50 operator<<(std::ostream& os, const Delegation& del)
51 {
52  return os << del.name << '(' << del.preference << ')';
53 }
54 
55 } // namespace ndn
Copyright (c) 2011-2015 Regents of the University of California.
uint64_t preference
Definition: delegation.hpp:34
std::ostream & operator<<(std::ostream &os, const Data &data)
Definition: data.cpp:337
bool operator<=(const Delegation &lhs, const Delegation &rhs)
Definition: delegation.cpp:43
represents a delegation
Definition: delegation.hpp:32
bool operator==(const Data &lhs, const Data &rhs)
Definition: data.cpp:328
bool operator<(const Delegation &lhs, const Delegation &rhs)
Definition: delegation.cpp:36