All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
nfd-face-flags.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
7 #ifndef NDN_MANAGEMENT_NFD_FACE_FLAGS_HPP
8 #define NDN_MANAGEMENT_NFD_FACE_FLAGS_HPP
9 
10 namespace ndn {
11 namespace nfd {
12 
16 enum {
24  // FACE_? = 4
25  // FACE_? = 8
26 };
27 
33 template<typename T>
35 {
36 public:
37  bool
38  isLocal() const
39  {
40  return static_cast<const T*>(this)->getFlags() & FACE_IS_LOCAL;
41  }
42 
43  bool
44  isOnDemand() const
45  {
46  return static_cast<const T*>(this)->getFlags() & FACE_IS_ON_DEMAND;
47  }
48 };
49 
50 } // namespace nfd
51 } // namespace ndn
52 
53 #endif // NDN_MANAGEMENT_NFD_FACE_FLAGS_HPP
implements getters to each face flag
face is created on demand (accepted incoming connection, not initiated outgoing connection) ...
face is local (for scope control purpose)