docs: fix capitalization in doxygen comments
Change-Id: Ie61b20a3dbfc847bc14523e507102fe6fe416908
diff --git a/ndn-cxx/data.hpp b/ndn-cxx/data.hpp
index 1f62d96..64425e0 100644
--- a/ndn-cxx/data.hpp
+++ b/ndn-cxx/data.hpp
@@ -31,8 +31,9 @@
namespace ndn {
-/** @brief Represents a %Data packet.
- * @sa https://named-data.net/doc/NDN-packet-spec/0.3/data.html
+/**
+ * @brief Represents a %Data packet.
+ * @sa https://named-data.net/doc/NDN-packet-spec/0.3/data.html
*/
class Data : public PacketBase, public std::enable_shared_from_this<Data>
{
@@ -121,7 +122,8 @@
getFullName() const;
public: // Data fields
- /** @brief Get name
+ /**
+ * @brief Get the data name.
*/
const Name&
getName() const noexcept
@@ -129,13 +131,15 @@
return m_name;
}
- /** @brief Set name
- * @return a reference to this Data, to allow chaining
+ /**
+ * @brief Set the data name.
+ * @return A reference to this Data, to allow chaining.
*/
Data&
setName(const Name& name);
- /** @brief Get MetaInfo
+ /**
+ * @brief Get the `MetaInfo` element.
*/
const MetaInfo&
getMetaInfo() const noexcept
@@ -143,14 +147,15 @@
return m_metaInfo;
}
- /** @brief Set MetaInfo
- * @return a reference to this Data, to allow chaining
+ /**
+ * @brief Set the `MetaInfo` element.
+ * @return A reference to this Data, to allow chaining.
*/
Data&
setMetaInfo(const MetaInfo& metaInfo);
/**
- * @brief Return whether this Data has a Content element
+ * @brief Return whether this Data has a `Content` element.
*/
bool
hasContent() const noexcept
@@ -159,7 +164,7 @@
}
/**
- * @brief Get the Content element
+ * @brief Get the `Content` element.
*
* If the element is not present (hasContent() == false), an invalid Block will be returned.
*
@@ -178,9 +183,9 @@
}
/**
- * @brief Set Content from a Block
+ * @brief Set `Content` from a Block.
* @param block TLV block to be used as Content; must be valid
- * @return a reference to this Data, to allow chaining
+ * @return A reference to this Data, to allow chaining.
*
* If the block's TLV-TYPE is tlv::Content, it will be used directly as this Data's
* Content element. Otherwise, the block will be nested into a Content element.
@@ -189,18 +194,18 @@
setContent(const Block& block);
/**
- * @brief Set Content by copying from a contiguous sequence of bytes
+ * @brief Set `Content` by copying from a contiguous sequence of bytes.
* @param value buffer with the TLV-VALUE of the content
- * @return a reference to this Data, to allow chaining
+ * @return A reference to this Data, to allow chaining.
*/
Data&
setContent(span<const uint8_t> value);
/**
- * @brief Set Content by copying from a raw buffer
+ * @brief Set `Content` by copying from a raw buffer.
* @param value buffer with the TLV-VALUE of the content; may be nullptr if @p length is zero
* @param length size of the buffer
- * @return a reference to this Data, to allow chaining
+ * @return A reference to this Data, to allow chaining.
* @deprecated Use setContent(span<const uint8_t>)
*/
[[deprecated("use the overload that takes a span<>")]]
@@ -208,22 +213,23 @@
setContent(const uint8_t* value, size_t length);
/**
- * @brief Set Content from a shared buffer
+ * @brief Set `Content` from a shared buffer.
* @param value buffer with the TLV-VALUE of the content; must not be nullptr
- * @return a reference to this Data, to allow chaining
+ * @return A reference to this Data, to allow chaining.
*/
Data&
setContent(ConstBufferPtr value);
/**
- * @brief Remove the Content element
- * @return a reference to this Data, to allow chaining
+ * @brief Remove the `Content` element.
+ * @return A reference to this Data, to allow chaining.
* @post hasContent() == false
*/
Data&
unsetContent();
- /** @brief Get SignatureInfo
+ /**
+ * @brief Get the `SignatureInfo` element.
*/
const SignatureInfo&
getSignatureInfo() const noexcept
@@ -231,12 +237,12 @@
return m_signatureInfo;
}
- /** @brief Set SignatureInfo
+ /** @brief Set the `SignatureInfo` element.
*
* This is a low-level function that should not normally be called directly by applications.
* Instead, provide a SignatureInfo to the SigningInfo object passed to KeyChain::sign().
*
- * @return a reference to this Data, to allow chaining
+ * @return A reference to this Data, to allow chaining.
* @warning SignatureInfo is overwritten when the packet is signed via KeyChain::sign().
* @sa SigningInfo
*/
@@ -244,7 +250,7 @@
setSignatureInfo(const SignatureInfo& info);
/**
- * @brief Get the SignatureValue element.
+ * @brief Get the `SignatureValue` element.
*/
const Block&
getSignatureValue() const noexcept
@@ -253,9 +259,9 @@
}
/**
- * @brief Set SignatureValue by copying from a contiguous sequence of bytes.
+ * @brief Set `SignatureValue` by copying from a contiguous sequence of bytes.
* @param value buffer from which the TLV-VALUE of the SignatureValue will be copied
- * @return a reference to this Data, to allow chaining
+ * @return A reference to this Data, to allow chaining.
*
* This is a low-level function that should not normally be called directly by applications.
* Instead, use KeyChain::sign() to sign the packet.
@@ -266,9 +272,9 @@
setSignatureValue(span<const uint8_t> value);
/**
- * @brief Set SignatureValue from a shared buffer.
+ * @brief Set `SignatureValue` from a shared buffer.
* @param value buffer containing the TLV-VALUE of the SignatureValue; must not be nullptr
- * @return a reference to this Data, to allow chaining
+ * @return A reference to this Data, to allow chaining.
*
* This is a low-level function that should not normally be called directly by applications.
* Instead, use KeyChain::sign() to sign the packet.
@@ -278,7 +284,7 @@
Data&
setSignatureValue(ConstBufferPtr value);
- /** @brief Extract ranges of Data covered by the signature
+ /** @brief Extract ranges of Data covered by the signature.
* @throw Error Data cannot be encoded or is missing ranges necessary for signing
* @warning The returned pointers will be invalidated if wireDecode() or wireEncode() are called.
*/
@@ -314,8 +320,9 @@
setFinalBlock(optional<name::Component> finalBlockId);
public: // SignatureInfo fields
- /** @brief Get SignatureType
- * @return tlv::SignatureTypeValue, or -1 to indicate the signature is invalid
+ /**
+ * @brief Get the `SignatureType`.
+ * @return tlv::SignatureTypeValue, or -1 to indicate the signature is invalid.
*/
int32_t
getSignatureType() const noexcept
@@ -323,7 +330,8 @@
return m_signatureInfo.getSignatureType();
}
- /** @brief Get KeyLocator
+ /**
+ * @brief Get the `KeyLocator` element.
*/
optional<KeyLocator>
getKeyLocator() const noexcept
diff --git a/ndn-cxx/detail/packet-base.hpp b/ndn-cxx/detail/packet-base.hpp
index 43d836d..9924e54 100644
--- a/ndn-cxx/detail/packet-base.hpp
+++ b/ndn-cxx/detail/packet-base.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -26,17 +26,17 @@
namespace ndn {
-/** \brief base class to allow simple management of packet tags
+/** \brief Base class to allow simple management of packet tags.
*/
class PacketBase : public TagHost
{
public:
- /** \brief get the value of the CongestionMark tag
+ /** \brief Get the value of the CongestionMark tag.
*/
uint64_t
getCongestionMark() const;
- /** \brief set the CongestionMark tag to the specified value
+ /** \brief Set the CongestionMark tag to the specified value.
*/
void
setCongestionMark(uint64_t mark);
diff --git a/ndn-cxx/detail/tag-host.hpp b/ndn-cxx/detail/tag-host.hpp
index 8d3039c..4e4805f 100644
--- a/ndn-cxx/detail/tag-host.hpp
+++ b/ndn-cxx/detail/tag-host.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,12 +29,13 @@
namespace ndn {
-/** \brief Base class to store tag information (e.g., inside Interest and Data packets)
+/**
+ * \brief Base class to store tag information, e.g., inside Interest and Data packets.
*/
class TagHost
{
public:
- /** \brief get a tag item
+ /** \brief Get a tag item.
* \tparam T type of the tag, which must be a subclass of ndn::Tag
* \retval nullptr if no Tag of type T is stored
*/
@@ -42,7 +43,7 @@
shared_ptr<T>
getTag() const;
- /** \brief set a tag item
+ /** \brief Set (add or replace) a tag item.
* \tparam T type of the tag, which must be a subclass of ndn::Tag
* \note Tag can be set even on a const tag host instance
*/
@@ -50,7 +51,7 @@
void
setTag(shared_ptr<T> tag) const;
- /** \brief remove tag item
+ /** \brief Remove a tag item.
* \note Tag can be removed even on a const tag host instance
*/
template<typename T>
diff --git a/ndn-cxx/encoding/nfd-constants.hpp b/ndn-cxx/encoding/nfd-constants.hpp
index 72b70a4..686f4c8 100644
--- a/ndn-cxx/encoding/nfd-constants.hpp
+++ b/ndn-cxx/encoding/nfd-constants.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -86,7 +86,7 @@
operator<<(std::ostream& os, FaceEventKind faceEventKind);
/** \ingroup management
- * \brief CS enablement flags
+ * \brief CS enablement flags.
* \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-config
*/
enum CsFlagBit {
@@ -107,7 +107,7 @@
ROUTE_ORIGIN_STATIC = 255,
};
-/** \brief extract RouteOrigin from stream
+/** \brief Extract RouteOrigin from stream.
* \post if the first token in \p contains a valid RouteOrigin as string or numeric value, it is
* extracted into \p routeOrigin ; otherwise, \p routeOrigin is set to \p ROUTE_ORIGIN_NONE ,
* and failbit is set on \p is
diff --git a/ndn-cxx/encoding/tlv.hpp b/ndn-cxx/encoding/tlv.hpp
index feb77f7..a892736 100644
--- a/ndn-cxx/encoding/tlv.hpp
+++ b/ndn-cxx/encoding/tlv.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -41,13 +41,14 @@
const size_t MAX_NDN_PACKET_SIZE = 8800;
/**
- * @brief Namespace defining NDN Packet Format related constants and procedures
+ * @brief Contains constants and low-level functions related to the NDN packet format.
*/
namespace tlv {
-/** @brief represents an error in TLV encoding or decoding
+/**
+ * @brief Represents an error in TLV encoding or decoding.
*
- * Element::Error SHOULD inherit from this Error class.
+ * `Element::Error` SHOULD inherit from this Error class.
*/
class Error : public std::runtime_error
{
@@ -57,8 +58,9 @@
Error(const char* expectedType, uint32_t actualType);
};
-/** @brief TLV-TYPE numbers defined in NDN Packet Format v0.3
- * @sa https://named-data.net/doc/NDN-packet-spec/current/types.html
+/**
+ * @brief TLV-TYPE numbers defined in NDN Packet Format v0.3.
+ * @sa https://named-data.net/doc/NDN-packet-spec/0.3/types.html
*/
enum : uint32_t {
Invalid = 0,
@@ -100,8 +102,9 @@
AppPrivateBlock2 = 32768,
};
-/** @brief TLV-TYPE numbers defined in NDN Packet Format v0.2 but not in v0.3
- * @sa https://named-data.net/doc/NDN-packet-spec/0.2.1/types.html
+/**
+ * @brief TLV-TYPE numbers defined in NDN Packet Format v0.2 but not in v0.3.
+ * @sa https://named-data.net/doc/NDN-packet-spec/0.2.1/types.html
*/
enum : uint32_t {
Selectors = 9,
@@ -113,8 +116,9 @@
Any = 19,
};
-/** @brief TLV-TYPE numbers for typed name components.
- * @sa https://redmine.named-data.net/projects/ndn-tlv/wiki/NameComponentType
+/**
+ * @brief TLV-TYPE numbers for typed name components.
+ * @sa https://redmine.named-data.net/projects/ndn-tlv/wiki/NameComponentType
*/
enum : uint32_t {
KeywordNameComponent = 32,
@@ -125,9 +129,10 @@
SequenceNumNameComponent = 58,
};
-/** @brief SignatureType values
- * @sa https://named-data.net/doc/NDN-packet-spec/current/signature.html
- * @sa https://redmine.named-data.net/projects/ndn-tlv/wiki/SignatureType
+/**
+ * @brief SignatureType values.
+ * @sa https://named-data.net/doc/NDN-packet-spec/0.3/signature.html
+ * @sa https://redmine.named-data.net/projects/ndn-tlv/wiki/SignatureType
*/
enum SignatureTypeValue : uint16_t {
DigestSha256 = 0,
@@ -140,8 +145,9 @@
std::ostream&
operator<<(std::ostream& os, SignatureTypeValue st);
-/** @brief TLV-TYPE numbers for SignatureInfo extensions
- * @sa <a href="../specs/certificate.html">NDN Certificate Format</a>
+/**
+ * @brief TLV-TYPE numbers for SignatureInfo extensions.
+ * @sa <a href="../specs/certificate.html">NDN Certificate Format</a>
*/
enum : uint32_t {
ValidityPeriod = 253,
@@ -154,8 +160,9 @@
DescriptionValue = 514
};
-/** @brief ContentType values
- * @sa https://redmine.named-data.net/projects/ndn-tlv/wiki/ContentType
+/**
+ * @brief ContentType values.
+ * @sa https://redmine.named-data.net/projects/ndn-tlv/wiki/ContentType
*/
enum ContentTypeValue : uint32_t {
ContentType_Blob = 0, ///< payload
@@ -250,7 +257,7 @@
/**
* @brief Write VAR-NUMBER to the specified stream.
- * @return length of written VAR-NUMBER
+ * @return Length of written VAR-NUMBER.
*/
size_t
writeVarNumber(std::ostream& os, uint64_t number);
@@ -280,7 +287,7 @@
/**
* @brief Write a NonNegativeInteger to the specified stream.
- * @return length of written NonNegativeInteger
+ * @return Length of written NonNegativeInteger.
*/
size_t
writeNonNegativeInteger(std::ostream& os, uint64_t integer);
@@ -297,7 +304,7 @@
namespace detail {
-/** @brief Function object to read a number from InputIterator
+/** @brief Function object to read a number from InputIterator.
*/
template<typename Iterator>
class ReadNumberSlow
@@ -315,7 +322,7 @@
}
};
-/** @brief Function object to read a number from ContiguousIterator
+/** @brief Function object to read a number from ContiguousIterator.
*/
template<typename Iterator>
class ReadNumberFast
@@ -362,7 +369,7 @@
}
};
-/** @brief Determine whether to select ReadNumber implementation for ContiguousIterator
+/** @brief Determine whether to select ReadNumber implementation for ContiguousIterator.
*
* This is not a full ContiguousIterator detection implementation. It returns true for the most
* common ContiguousIterator types used with TLV decoding function templates.
diff --git a/ndn-cxx/face.cpp b/ndn-cxx/face.cpp
index 48f1095..ed340e5 100644
--- a/ndn-cxx/face.cpp
+++ b/ndn-cxx/face.cpp
@@ -298,7 +298,7 @@
}
/**
- * @brief extract local fields from NDNLPv2 packet and tag onto a network layer packet
+ * @brief Extract local fields from NDNLPv2 packet and tag onto a network layer packet.
*/
template<typename NetPkt>
static void
diff --git a/ndn-cxx/face.hpp b/ndn-cxx/face.hpp
index 45eaad2..0a16fea 100644
--- a/ndn-cxx/face.hpp
+++ b/ndn-cxx/face.hpp
@@ -221,7 +221,7 @@
public: // consumer
/**
- * @brief Express Interest
+ * @brief Express an Interest.
* @param interest the Interest; a copy will be made, so that the caller is not
* required to maintain the argument unchanged
* @param afterSatisfied function to be invoked if Data is returned
@@ -238,13 +238,13 @@
const TimeoutCallback& afterTimeout);
/**
- * @brief Cancel all previously expressed Interests
+ * @brief Cancel all previously expressed Interests.
*/
void
removeAllPendingInterests();
/**
- * @brief Get number of pending Interests
+ * @brief Get number of pending Interests.
*/
size_t
getNPendingInterests() const;
@@ -252,7 +252,7 @@
public: // producer
/**
* @brief Set InterestFilter to dispatch incoming matching interest to onInterest
- * callback and register the filtered prefix with the connected NDN forwarder
+ * callback and register the filtered prefix with the connected NDN forwarder.
*
* This version of setInterestFilter combines setInterestFilter and registerPrefix
* operations and is intended to be used when only one filter for the same prefix needed
@@ -277,7 +277,7 @@
/**
* @brief Set InterestFilter to dispatch incoming matching interest to onInterest
- * callback and register the filtered prefix with the connected NDN forwarder
+ * callback and register the filtered prefix with the connected NDN forwarder.
*
* This version of setInterestFilter combines setInterestFilter and registerPrefix
* operations and is intended to be used when only one filter for the same prefix needed
@@ -318,7 +318,7 @@
setInterestFilter(const InterestFilter& filter, const InterestCallback& onInterest);
/**
- * @brief Register prefix with the connected NDN forwarder
+ * @brief Register prefix with the connected NDN forwarder.
*
* This method only modifies forwarder's RIB and does not associate any
* onInterest callbacks. Use setInterestFilter method to dispatch incoming Interests to
@@ -342,7 +342,7 @@
uint64_t flags = nfd::ROUTE_FLAG_CHILD_INHERIT);
/**
- * @brief Publish data packet
+ * @brief Publish a Data packet.
* @param data the Data; a copy will be made, so that the caller is not required to
* maintain the argument unchanged
*
@@ -355,7 +355,7 @@
put(Data data);
/**
- * @brief Send a network NACK
+ * @brief Send a %Network Nack.
* @param nack the Nack; a copy will be made, so that the caller is not required to
* maintain the argument unchanged
* @throw OversizedPacketError encoded Nack size exceeds MAX_NDN_PACKET_SIZE
diff --git a/ndn-cxx/impl/face-impl.hpp b/ndn-cxx/impl/face-impl.hpp
index d2e2ae8..1f28ca7 100644
--- a/ndn-cxx/impl/face-impl.hpp
+++ b/ndn-cxx/impl/face-impl.hpp
@@ -53,7 +53,7 @@
namespace ndn {
-/** @brief implementation detail of Face
+/** @brief Implementation detail of Face.
*/
class Face::Impl : public std::enable_shared_from_this<Face::Impl>
{
@@ -123,7 +123,8 @@
m_pendingInterestTable.clear();
}
- /** @return whether the Data should be sent to the forwarder, if it does not come from the forwarder
+ /**
+ * @return Whether the Data should be sent to the forwarder, if it does not come from the forwarder.
*/
bool
satisfyPendingInterests(const Data& data)
@@ -150,7 +151,8 @@
return hasForwarderMatch || !hasAppMatch;
}
- /** @return a Nack to be sent to the forwarder, or nullopt if no Nack should be sent
+ /**
+ * @return A Nack to be sent to the forwarder, or nullopt if no Nack should be sent.
*/
optional<lp::Nack>
nackPendingInterests(const lp::Nack& nack)
@@ -321,7 +323,7 @@
}
private:
- /** @brief Finish packet encoding
+ /** @brief Finish packet encoding.
* @param lpPacket NDNLP packet without FragmentField
* @param wire wire encoding of Interest or Data
* @param pktType packet type, 'I' for Interest, 'D' for Data, 'N' for Nack
diff --git a/ndn-cxx/impl/interest-filter-record.hpp b/ndn-cxx/impl/interest-filter-record.hpp
index 6472b3d..e3989c1 100644
--- a/ndn-cxx/impl/interest-filter-record.hpp
+++ b/ndn-cxx/impl/interest-filter-record.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -34,7 +34,7 @@
{
public:
/**
- * @brief Construct an Interest filter record
+ * @brief Constructor.
*
* @param filter an InterestFilter that represents what Interest should invoke the callback
* @param callback invoked when matching Interest is received
@@ -52,7 +52,7 @@
}
/**
- * @brief Check if Interest name matches the filter
+ * @brief Check if Interest name matches the filter.
* @param name Interest Name
*/
bool
@@ -63,7 +63,7 @@
}
/**
- * @brief invokes the InterestCallback
+ * @brief Invokes the InterestCallback.
* @note This method does nothing if the Interest callback is empty
*/
void
diff --git a/ndn-cxx/impl/name-component-types.hpp b/ndn-cxx/impl/name-component-types.hpp
index e1edd0e..8f88a97 100644
--- a/ndn-cxx/impl/name-component-types.hpp
+++ b/ndn-cxx/impl/name-component-types.hpp
@@ -76,8 +76,8 @@
* in the form of `<prefix>=<value>`, in addition to the plain `<type-number>=<escaped-value>`
* syntax.
*
- * \return the `<prefix>` portion of the alternate URI representation.
- * \retval nullptr this component does not have an alternate URI representation.
+ * \return The `<prefix>` portion of the alternate URI representation.
+ * \retval nullptr This component does not have an alternate URI representation.
*/
virtual const char*
getAltUriPrefix() const
@@ -111,7 +111,7 @@
protected:
/**
* \brief Calculate the successor of \p comp, extending TLV-LENGTH if value overflows.
- * \return whether TLV-LENGTH was extended, and the successor
+ * \return Whether TLV-LENGTH was extended, and the successor.
*/
static std::tuple<bool, Block>
getSuccessorImpl(const Component& comp)
diff --git a/ndn-cxx/impl/pending-interest.hpp b/ndn-cxx/impl/pending-interest.hpp
index 5e1340b..1f88fdb 100644
--- a/ndn-cxx/impl/pending-interest.hpp
+++ b/ndn-cxx/impl/pending-interest.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -40,14 +40,14 @@
FORWARDER ///< Interest was received from the forwarder via Transport
};
-std::ostream&
+inline std::ostream&
operator<<(std::ostream& os, PendingInterestOrigin origin)
{
switch (origin) {
- case PendingInterestOrigin::APP:
- return os << "app";
- case PendingInterestOrigin::FORWARDER:
- return os << "forwarder";
+ case PendingInterestOrigin::APP:
+ return os << "app";
+ case PendingInterestOrigin::FORWARDER:
+ return os << "forwarder";
}
NDN_CXX_UNREACHABLE;
}
@@ -77,7 +77,7 @@
}
/**
- * @brief Construct a pending Interest record for an Interest from the forwarder
+ * @brief Construct a pending Interest record for an Interest from the forwarder.
*/
PendingInterest(shared_ptr<const Interest> interest, Scheduler& scheduler)
: m_interest(std::move(interest))
@@ -99,7 +99,7 @@
}
/**
- * @brief Record that the Interest has been forwarded to one destination
+ * @brief Record that the Interest has been forwarded to one destination.
*
* A "destination" could be either a local InterestFilter or the forwarder.
*/
@@ -110,9 +110,9 @@
}
/**
- * @brief Record an incoming Nack against a forwarded Interest
- * @return least severe Nack if all destinations where the Interest was forwarded have Nacked;
- * otherwise, nullopt
+ * @brief Record an incoming Nack against a forwarded Interest.
+ * @return Least severe Nack if all destinations where the Interest was forwarded have Nacked;
+ * otherwise, @c nullopt.
*/
optional<lp::Nack>
recordNack(const lp::Nack& nack)
diff --git a/ndn-cxx/ims/in-memory-storage.hpp b/ndn-cxx/ims/in-memory-storage.hpp
index 8fa603e..0855e61 100644
--- a/ndn-cxx/ims/in-memory-storage.hpp
+++ b/ndn-cxx/ims/in-memory-storage.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -36,7 +36,7 @@
namespace ndn {
-/** @brief Represents in-memory storage
+/** @brief Represents in-memory storage.
*/
class InMemoryStorage : noncopyable
{
@@ -59,7 +59,7 @@
>
> Cache;
- /** @brief Represents a self-defined const_iterator for the in-memory storage
+ /** @brief Represents a self-defined const_iterator for the in-memory storage.
*
* @note Don't try to instantiate this class directly, use InMemoryStorage::begin() instead.
*/
@@ -100,7 +100,7 @@
};
/** @brief Represents an error might be thrown during reduce the current capacity of the
- * in-memory storage through function setCapacity(size_t nMaxPackets).
+ * in-memory storage through function setCapacity(size_t nMaxPackets).
*/
class Error : public std::runtime_error
{
@@ -111,13 +111,15 @@
}
};
- /** @brief Create a InMemoryStorage with up to @p limit entries
+ /** @brief Create a InMemoryStorage with up to @p limit entries.
+ *
* The InMemoryStorage created through this method will ignore MustBeFresh in interest processing
*/
explicit
InMemoryStorage(size_t limit = std::numeric_limits<size_t>::max());
- /** @brief Create a InMemoryStorage with up to @p limit entries
+ /** @brief Create a InMemoryStorage with up to @p limit entries.
+ *
* The InMemoryStorage created through this method will handle MustBeFresh in interest processing
*/
explicit
@@ -125,12 +127,12 @@
size_t limit = std::numeric_limits<size_t>::max());
/** @note Please make sure to implement it to free m_freeEntries and evict
- * all items in the derived class for anybody who wishes to inherit this class
- */
+ * all items in the derived class for anybody who wishes to inherit this class.
+ */
virtual
~InMemoryStorage();
- /** @brief Inserts a Data packet
+ /** @brief Inserts a Data packet.
*
* @param data the packet to insert, must be signed and have wire encoding
* @param mustBeFreshProcessingWindow Beyond this time period after the data is inserted, the
@@ -145,7 +147,7 @@
void
insert(const Data& data, const time::milliseconds& mustBeFreshProcessingWindow = INFINITE_WINDOW);
- /** @brief Finds the best match Data for an Interest
+ /** @brief Finds the best match Data for an Interest.
*
* @note It will invoke afterAccess(shared_ptr<InMemoryStorageEntry>).
* As currently it is impossible to determine whether a Name contains implicit digest or not,
@@ -153,13 +155,12 @@
* including implicit digest) whose name is not the full name of the data matching the
* implicit digest.
*
- * @return{ the best match, if any; otherwise a null shared_ptr }
+ * @return the best match, if any; otherwise a null shared_ptr
*/
shared_ptr<const Data>
find(const Interest& interest);
- /** @brief Finds the best match Data for a Name with or without
- * the implicit digest.
+ /** @brief Finds the best match Data for a Name with or without implicit digest.
*
* If packets with the same name but different digests exist
* and the Name supplied is the one without implicit digest, a packet
@@ -167,12 +168,13 @@
*
* @note It will invoke afterAccess(shared_ptr<InMemoryStorageEntry>).
*
- * @return{ the one matched the Name; otherwise a null shared_ptr }
+ * @return the one matched the Name; otherwise a null shared_ptr
*/
shared_ptr<const Data>
find(const Name& name);
/** @brief Deletes in-memory storage entry by prefix by default.
+ *
* @param prefix Exact name of a prefix of the data to remove
* @param isPrefix If false, the function will only delete the
* entry completely matched with the prefix according to canonical ordering.
@@ -185,7 +187,7 @@
void
erase(const Name& prefix, const bool isPrefix = true);
- /** @return{ maximum number of packets that can be allowed to store in in-memory storage }
+ /** @return Maximum number of packets that can be allowed to store in in-memory storage.
*/
size_t
getLimit() const
@@ -193,7 +195,7 @@
return m_limit;
}
- /** @return{ number of packets stored in in-memory storage }
+ /** @return Number of packets stored in in-memory storage.
*/
size_t
size() const
@@ -201,18 +203,16 @@
return m_nPackets;
}
- /** @brief Returns begin iterator of the in-memory storage ordering by
- * name with digest
+ /** @brief Returns begin iterator of the in-memory storage ordering by name with digest.
*
- * @return{ const_iterator pointing to the beginning of the m_cache }
+ * @return const_iterator pointing to the beginning of the m_cache
*/
InMemoryStorage::const_iterator
begin() const;
- /** @brief Returns end iterator of the in-memory storage ordering by
- * name with digest
+ /** @brief Returns end iterator of the in-memory storage ordering by name with digest.
*
- * @return{ const_iterator pointing to the end of the m_cache }
+ * @return const_iterator pointing to the end of the m_cache
*/
InMemoryStorage::const_iterator
end() const;
@@ -249,13 +249,13 @@
evictItem() = 0;
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
- /** @brief sets current capacity of in-memory storage (in packets)
+ /** @brief Sets current capacity of in-memory storage (in packets).
*/
void
setCapacity(size_t nMaxPackets);
- /** @brief returns current capacity of in-memory storage (in packets)
- * @return{ number of packets that can be stored in application cache }
+ /** @brief Returns current capacity of in-memory storage (in packets).
+ * @return number of packets that can be stored in application cache
*/
size_t
getCapacity() const
@@ -263,7 +263,7 @@
return m_capacity;
}
- /** @brief returns true if the in-memory storage uses up the current capacity, false otherwise
+ /** @brief Returns true if the in-memory storage uses up the current capacity, false otherwise.
*/
bool
isFull() const
@@ -271,7 +271,7 @@
return size() >= m_capacity;
}
- /** @brief deletes in-memory storage entries by the Name with implicit digest.
+ /** @brief Deletes in-memory storage entries by the Name with implicit digest.
*
* This is the function one should use to erase entry in the cache
* in derived class.
@@ -280,19 +280,20 @@
void
eraseImpl(const Name& name);
- /** @brief Prints contents of the in-memory storage
+ /** @brief Prints contents of the in-memory storage.
*/
void
printCache(std::ostream& os) const;
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
- /** @brief free in-memory storage entries by an iterator pointing to that entry.
- @return An iterator pointing to the element that followed the last element erased.
+ /** @brief Free in-memory storage entries by an iterator pointing to that entry.
+ * @return An iterator pointing to the element that followed the last element erased.
*/
Cache::iterator
freeEntry(Cache::iterator it);
/** @brief Implements child selector (leftmost, rightmost, undeclared).
+ *
* Operates on the first layer of a skip list.
*
* startingPoint must be less than Interest Name.
@@ -304,13 +305,14 @@
* other selectors. When childSelector = rightmost, it goes till the end, and returns application
* cache entry that satisfies other selectors. Returned application cache entry is the leftmost
* child of the rightmost child.
- * @return{ the best match, if any; otherwise 0 }
+ *
+ * @return the best match, if any; otherwise 0
*/
InMemoryStorageEntry*
selectChild(const Interest& interest,
Cache::index<byFullName>::type::iterator startingPoint) const;
- /** @brief Get the next iterator (include startingPoint) that satisfies MustBeFresh requirement
+ /** @brief Get the next iterator (include startingPoint) that satisfies MustBeFresh requirement.
*
* @param startingPoint The iterator to start with.
* @return The next qualified iterator
diff --git a/ndn-cxx/interest-filter.hpp b/ndn-cxx/interest-filter.hpp
index deee5f4..ac4600d 100644
--- a/ndn-cxx/interest-filter.hpp
+++ b/ndn-cxx/interest-filter.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,8 +29,9 @@
class RegexPatternListMatcher;
/**
- * @brief declares the set of Interests a producer can serve,
- * which starts with a name prefix, plus an optional regular expression
+ * @brief Declares the set of Interests a producer can serve.
+ *
+ * A filter starts with a name prefix, followed by an optional NDN regular expression.
*/
class InterestFilter
{
@@ -42,7 +43,7 @@
};
/**
- * @brief Construct an InterestFilter to match Interests by prefix
+ * @brief Construct an InterestFilter to match Interests by prefix.
*
* This filter matches Interests whose name start with the given prefix.
*
@@ -51,7 +52,7 @@
InterestFilter(const Name& prefix);
/**
- * @brief Construct an InterestFilter to match Interests by prefix
+ * @brief Construct an InterestFilter to match Interests by prefix.
*
* This filter matches Interests whose name start with the given prefix.
*
@@ -61,7 +62,7 @@
InterestFilter(const char* prefixUri);
/**
- * @brief Construct an InterestFilter to match Interests by prefix
+ * @brief Construct an InterestFilter to match Interests by prefix.
*
* This filter matches Interests whose name start with the given prefix.
*
@@ -71,7 +72,7 @@
InterestFilter(const std::string& prefixUri);
/**
- * @brief Construct an InterestFilter to match Interests by prefix and regular expression
+ * @brief Construct an InterestFilter to match Interests by prefix and regular expression.
*
* This filter matches Interests whose name start with the given prefix and
* the remaining components match the given regular expression.
@@ -91,14 +92,14 @@
InterestFilter(const Name& prefix, const std::string& regexFilter);
/**
- * @brief Implicit conversion to Name
+ * @brief Implicit conversion to Name.
* @note This allows InterestCallback to be declared with `Name` rather than `InterestFilter`,
* but this does not work if InterestFilter has regular expression.
*/
operator const Name&() const;
/**
- * @brief Check if specified Interest name matches the filter
+ * @brief Check if specified Interest name matches the filter.
*/
bool
doesMatch(const Name& name) const;
@@ -121,7 +122,7 @@
return *m_regexFilter;
}
- /** \brief Get whether Interest loopback is allowed
+ /** \brief Get whether Interest loopback is allowed.
*/
NDN_CXX_NODISCARD bool
allowsLoopback() const
@@ -129,7 +130,7 @@
return m_allowsLoopback;
}
- /** \brief Set whether Interest loopback is allowed
+ /** \brief Set whether Interest loopback is allowed.
* \param wantLoopback if true, this InterestFilter may receive Interests that are expressed
* locally on the same \p ndn::Face ; if false, this InterestFilter can only
* receive Interests received from the forwarder. The default is true.
diff --git a/ndn-cxx/interest.hpp b/ndn-cxx/interest.hpp
index 16a5006..1d438ca 100644
--- a/ndn-cxx/interest.hpp
+++ b/ndn-cxx/interest.hpp
@@ -37,13 +37,14 @@
class Data;
-/** @var const unspecified_duration_type DEFAULT_INTEREST_LIFETIME;
- * @brief default value for InterestLifetime
+/**
+ * @brief Default value of `InterestLifetime`.
*/
const time::milliseconds DEFAULT_INTEREST_LIFETIME = 4_s;
-/** @brief Represents an %Interest packet.
- * @sa https://named-data.net/doc/NDN-packet-spec/0.3/interest.html
+/**
+ * @brief Represents an %Interest packet.
+ * @sa https://named-data.net/doc/NDN-packet-spec/0.3/interest.html
*/
class Interest : public PacketBase, public std::enable_shared_from_this<Interest>
{
@@ -174,13 +175,15 @@
return m_name;
}
- /** @brief Set the Interest's name.
- * @throw std::invalid_argument @p name is invalid
+ /**
+ * @brief Set the %Interest's name.
+ * @throw std::invalid_argument @p name is invalid
*/
Interest&
setName(const Name& name);
- /** @brief Check whether the CanBePrefix element is present.
+ /**
+ * @brief Check whether the `CanBePrefix` element is present.
*/
bool
getCanBePrefix() const noexcept
@@ -188,8 +191,9 @@
return m_canBePrefix;
}
- /** @brief Add or remove CanBePrefix element.
- * @param canBePrefix whether CanBePrefix element should be present.
+ /**
+ * @brief Add or remove `CanBePrefix` element.
+ * @param canBePrefix Whether the element should be present.
*/
Interest&
setCanBePrefix(bool canBePrefix)
@@ -199,7 +203,8 @@
return *this;
}
- /** @brief Check whether the MustBeFresh element is present.
+ /**
+ * @brief Check whether the `MustBeFresh` element is present.
*/
bool
getMustBeFresh() const noexcept
@@ -207,8 +212,9 @@
return m_mustBeFresh;
}
- /** @brief Add or remove MustBeFresh element.
- * @param mustBeFresh whether MustBeFresh element should be present.
+ /**
+ * @brief Add or remove `MustBeFresh` element.
+ * @param mustBeFresh Whether the element should be present.
*/
Interest&
setMustBeFresh(bool mustBeFresh)
@@ -227,7 +233,8 @@
Interest&
setForwardingHint(std::vector<Name> value);
- /** @brief Check if the Nonce element is present.
+ /**
+ * @brief Check if the `Nonce` element is present.
*/
bool
hasNonce() const noexcept
@@ -235,55 +242,66 @@
return m_nonce.has_value();
}
- /** @brief Get nonce value.
+ /**
+ * @brief Get nonce value.
*
- * If nonce was not present, it is added and assigned a random value.
+ * If nonce was not present, it is added and assigned a random value.
*/
Nonce
getNonce() const;
- /** @brief Set the Interest's nonce.
+ /**
+ * @brief Set the %Interest's nonce.
*
- * Use `setNonce(nullopt)` to remove any nonce from the Interest.
+ * Use `setNonce(nullopt)` to remove any nonce from the Interest.
*/
Interest&
setNonce(optional<Nonce> nonce);
- /** @brief Change nonce value.
+ /**
+ * @brief Change nonce value.
*
- * If the Nonce element is present, the new nonce value will differ from the old value.
- * If the Nonce element is not present, this method does nothing.
+ * If the `Nonce` element is present, the new nonce value will differ from the old value.
+ * If the `Nonce` element is not present, this method does nothing.
*/
void
refreshNonce();
+ /**
+ * @brief Get the %Interest's lifetime.
+ */
time::milliseconds
getInterestLifetime() const noexcept
{
return m_interestLifetime;
}
- /** @brief Set the Interest's lifetime.
- * @throw std::invalid_argument @p lifetime is negative
+ /**
+ * @brief Set the %Interest's lifetime.
+ * @throw std::invalid_argument @p lifetime is negative
*/
Interest&
setInterestLifetime(time::milliseconds lifetime);
+ /**
+ * @brief Get the %Interest's hop limit.
+ */
optional<uint8_t>
getHopLimit() const noexcept
{
return m_hopLimit;
}
- /** @brief Set the Interest's hop limit.
+ /**
+ * @brief Set the %Interest's hop limit.
*
- * Use `setHopLimit(nullopt)` to remove any hop limit from the Interest.
+ * Use `setHopLimit(nullopt)` to remove any hop limit from the Interest.
*/
Interest&
setHopLimit(optional<uint8_t> hopLimit);
/**
- * @brief Return whether this Interest has any ApplicationParameters.
+ * @brief Return whether this Interest has any `ApplicationParameters` element.
*/
bool
hasApplicationParameters() const noexcept
@@ -292,7 +310,7 @@
}
/**
- * @brief Get the ApplicationParameters.
+ * @brief Get the `ApplicationParameters` element.
*
* If the element is not present, an invalid Block will be returned.
*
@@ -308,9 +326,9 @@
}
/**
- * @brief Set ApplicationParameters from a Block.
+ * @brief Set `ApplicationParameters` from a Block.
* @param block TLV block to be used as ApplicationParameters; must be valid
- * @return a reference to this Interest
+ * @return A reference to this Interest.
*
* If the block's TLV-TYPE is tlv::ApplicationParameters, it will be used directly as
* this Interest's ApplicationParameters element. Otherwise, the block will be nested
@@ -324,9 +342,9 @@
setApplicationParameters(const Block& block);
/**
- * @brief Set ApplicationParameters by copying from a contiguous sequence of bytes.
+ * @brief Set `ApplicationParameters` by copying from a contiguous sequence of bytes.
* @param value buffer from which the TLV-VALUE of the parameters will be copied
- * @return a reference to this Interest
+ * @return A reference to this Interest.
*
* This function will also recompute the value of the ParametersSha256DigestComponent in the
* Interest's name. If the name does not contain a ParametersSha256DigestComponent, one will
@@ -336,11 +354,11 @@
setApplicationParameters(span<const uint8_t> value);
/**
- * @brief Set ApplicationParameters by copying from a raw buffer.
+ * @brief Set `ApplicationParameters` by copying from a raw buffer.
* @param value points to a buffer from which the TLV-VALUE of the parameters will be copied;
* may be nullptr if @p length is zero
* @param length size of the buffer
- * @return a reference to this Interest
+ * @return A reference to this Interest.
* @deprecated Use setApplicationParameters(span<const uint8_t>)
*
* This function will also recompute the value of the ParametersSha256DigestComponent in the
@@ -352,9 +370,9 @@
setApplicationParameters(const uint8_t* value, size_t length);
/**
- * @brief Set ApplicationParameters from a shared buffer.
+ * @brief Set `ApplicationParameters` from a shared buffer.
* @param value buffer containing the TLV-VALUE of the parameters; must not be nullptr
- * @return a reference to this Interest
+ * @return A reference to this Interest.
*
* This function will also recompute the value of the ParametersSha256DigestComponent in the
* Interest's name. If the name does not contain a ParametersSha256DigestComponent, one will
@@ -364,8 +382,8 @@
setApplicationParameters(ConstBufferPtr value);
/**
- * @brief Remove the ApplicationParameters element from this Interest.
- * @return a reference to this Interest
+ * @brief Remove the `ApplicationParameters` element from this Interest.
+ * @return A reference to this Interest.
* @post hasApplicationParameters() == false
*
* This function will also remove any InterestSignatureInfo and InterestSignatureValue elements
@@ -374,26 +392,29 @@
Interest&
unsetApplicationParameters();
- /** @brief Return whether the Interest is signed
- * @warning This function only determines whether signature information is present in the
- * Interest and does not verify that the signature is valid.
+ /**
+ * @brief Return whether the Interest is signed.
+ * @warning This function only determines whether signature information is present in the
+ * Interest; it does not verify that the signature is valid.
*/
bool
isSigned() const noexcept;
- /** @brief Get the InterestSignatureInfo
- * @retval nullopt InterestSignatureInfo is not present
+ /**
+ * @brief Get the `InterestSignatureInfo` element.
+ * @retval nullopt The element is not present.
*/
optional<SignatureInfo>
getSignatureInfo() const;
- /** @brief Set the InterestSignatureInfo
+ /**
+ * @brief Set the `InterestSignatureInfo` element.
*/
Interest&
setSignatureInfo(const SignatureInfo& info);
/**
- * @brief Get the InterestSignatureValue element.
+ * @brief Get the `InterestSignatureValue` element.
*
* If the element is not present, an invalid Block will be returned.
*/
@@ -401,9 +422,9 @@
getSignatureValue() const;
/**
- * @brief Set InterestSignatureValue by copying from a contiguous sequence of bytes.
+ * @brief Set `InterestSignatureValue` by copying from a contiguous sequence of bytes.
* @param value buffer from which the TLV-VALUE of the InterestSignatureValue will be copied
- * @return a reference to this Interest
+ * @return A reference to this Interest.
* @throw Error InterestSignatureInfo is unset
*
* InterestSignatureInfo must be set before setting InterestSignatureValue.
@@ -412,9 +433,9 @@
setSignatureValue(span<const uint8_t> value);
/**
- * @brief Set InterestSignatureValue from a shared buffer.
+ * @brief Set `InterestSignatureValue` from a shared buffer.
* @param value buffer containing the TLV-VALUE of the InterestSignatureValue; must not be nullptr
- * @return a reference to this Interest
+ * @return A reference to this Interest.
* @throw Error InterestSignatureInfo is unset
*
* InterestSignatureInfo must be set before setting InterestSignatureValue.
diff --git a/ndn-cxx/key-locator.hpp b/ndn-cxx/key-locator.hpp
index 1643b5b..d12ac23 100644
--- a/ndn-cxx/key-locator.hpp
+++ b/ndn-cxx/key-locator.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -88,26 +88,26 @@
KeyLocator&
clear();
- /** \brief Get nested Name element.
+ /** \brief Get nested `%Name` element.
* \throw Error if type is not tlv::Name
*/
const Name&
getName() const;
- /** \brief Set nested Name element.
+ /** \brief Set nested `%Name` element.
* \post `getType() == tlv::Name`
* \return self
*/
KeyLocator&
setName(const Name& name);
- /** \brief Get nested KeyDigest element.
+ /** \brief Get nested `KeyDigest` element.
* \throw Error if type is not tlv::KeyDigest
*/
const Block&
getKeyDigest() const;
- /** \brief Set nested KeyDigest element (whole TLV).
+ /** \brief Set nested `KeyDigest` element (whole TLV).
* \post `getType() == tlv::KeyDigest`
* \throw std::invalid_argument Block type is not tlv::KeyDigest
* \return self
@@ -115,8 +115,8 @@
KeyLocator&
setKeyDigest(const Block& keyDigest);
- /** \brief Set nested KeyDigest element value.
- * \param keyDigest buffer to use as TLV-VALUE of the nested KeyDigest element.
+ /** \brief Set nested `KeyDigest` element value.
+ * \param keyDigest buffer to use as TLV-VALUE of the nested `KeyDigest` element.
* \post `getType() == tlv::KeyDigest`
* \return self
*/
diff --git a/ndn-cxx/link.hpp b/ndn-cxx/link.hpp
index b245530..6afac64 100644
--- a/ndn-cxx/link.hpp
+++ b/ndn-cxx/link.hpp
@@ -26,7 +26,9 @@
namespace ndn {
-/** @brief represents a Link object
+/**
+ * @brief Represents a `%LinkObject` TLV element.
+ * @sa https://named-data.net/doc/NDN-packet-spec/0.3/link.html
*/
class Link : public Data
{
@@ -37,7 +39,7 @@
using Data::Error::Error;
};
- /** @brief Create an empty Link object
+ /** @brief Create an empty Link object.
*
* Note that in certain contexts that use Link::shared_from_this(), Link must be
* created using `make_shared`:
@@ -46,7 +48,7 @@
*/
Link();
- /** @brief Decode a Link object from a Block
+ /** @brief Decode a Link object from a Block.
* @param wire a TLV block
*
* Note that in certain contexts that use Link::shared_from_this(), Link must be
@@ -57,7 +59,7 @@
explicit
Link(const Block& wire);
- /** @brief Create a Link object with the given name and delegations
+ /** @brief Create a Link object with the given name and delegations.
* @param name A reference to the name of the redirected namespace
* @param delegations Delegations in payload
*
@@ -69,13 +71,13 @@
explicit
Link(const Name& name, std::initializer_list<Name> delegations = {});
- /** @brief Decode from the wire format
+ /** @brief Decode from the wire format.
* @param wire a TLV block
*/
void
wireDecode(const Block& wire);
- /** @brief Get the delegations
+ /** @brief Get the delegations.
*/
span<const Name>
getDelegationList() const
@@ -83,20 +85,20 @@
return m_delegations;
}
- /** @brief Set the delegations
+ /** @brief Set the delegations.
* @note This is more efficient than multiple addDelegation and removeDelegation invocations.
*/
void
setDelegationList(std::vector<Name> delegations);
- /** @brief Append a delegation at the end
+ /** @brief Append a delegation at the end.
* @param name Delegation name
* @return true if delegation is added, false if same name already exists
*/
bool
addDelegation(const Name& name);
- /** @brief Remove a delegation whose name is @p name
+ /** @brief Remove a delegation whose name is @p name.
* @param name Delegation name
* @return true if delegation is removed, otherwise false
*/
diff --git a/ndn-cxx/lp/cache-policy.hpp b/ndn-cxx/lp/cache-policy.hpp
index 4307ce1..1b2a436 100644
--- a/ndn-cxx/lp/cache-policy.hpp
+++ b/ndn-cxx/lp/cache-policy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -31,7 +31,7 @@
namespace lp {
/**
- * \brief indicates the cache policy applied to a Data packet
+ * \brief Indicates the cache policy applied to a Data packet.
*/
enum class CachePolicyType {
NONE = 0,
@@ -42,7 +42,7 @@
operator<<(std::ostream& os, CachePolicyType policy);
/**
- * \brief represents a CachePolicy header field
+ * \brief Represents a CachePolicy header field.
*/
class CachePolicy
{
@@ -59,7 +59,7 @@
CachePolicy(const Block& block);
/**
- * \brief prepend CachePolicy to encoder
+ * \brief Prepend CachePolicy to encoder.
* \pre getPolicy() != CachePolicyType::NONE
* \throw Error policy type is unset
*/
@@ -68,27 +68,27 @@
wireEncode(EncodingImpl<TAG>& encoder) const;
/**
- * \brief encode CachePolicy into wire format
+ * \brief Encode CachePolicy into wire format.
*/
const Block&
wireEncode() const;
/**
- * \brief get CachePolicyType from wire format
+ * \brief Get CachePolicyType from wire format.
*/
void
wireDecode(const Block& wire);
public: // policy type
/**
- * \return policy type code
+ * \brief Get policy type code.
* \retval CachePolicyType::NONE if policy type is unset or has an unknown code
*/
CachePolicyType
getPolicy() const;
/**
- * \brief set policy type code
+ * \brief Set policy type code.
* \param policy a policy type code; CachePolicyType::NONE clears the policy
*/
CachePolicy&
diff --git a/ndn-cxx/lp/empty-value.hpp b/ndn-cxx/lp/empty-value.hpp
index 9485ce2..2733d2d 100644
--- a/ndn-cxx/lp/empty-value.hpp
+++ b/ndn-cxx/lp/empty-value.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -28,7 +28,7 @@
namespace lp {
/**
- * \brief represents a zero-length TLV-VALUE
+ * \brief Represents a zero-length TLV-VALUE.
*/
struct EmptyValue
{
@@ -37,4 +37,4 @@
} // namespace lp
} // namespace ndn
-#endif // NDN_CXX_LP_TLV_EMPTY_VALUE_HPP
\ No newline at end of file
+#endif // NDN_CXX_LP_TLV_EMPTY_VALUE_HPP
diff --git a/ndn-cxx/lp/field.hpp b/ndn-cxx/lp/field.hpp
index 6ae7465..abe40a1 100644
--- a/ndn-cxx/lp/field.hpp
+++ b/ndn-cxx/lp/field.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2020 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -30,7 +30,7 @@
namespace lp {
/**
- * \brief indicates where a field may occur
+ * \brief Indicates where a field may occur.
*/
namespace field_location_tags {
@@ -39,14 +39,14 @@
};
/**
- * \brief a header field
+ * \brief A header field.
*/
class Header : public Base
{
};
/**
- * \brief the Fragment field
+ * \brief The Fragment field.
*/
class Fragment : public Base
{
@@ -55,7 +55,7 @@
} // namespace field_location_tags
/**
- * \brief concept check for fields
+ * \brief Concept check for fields.
*/
template<class X>
struct Field
diff --git a/ndn-cxx/lp/nack-header.hpp b/ndn-cxx/lp/nack-header.hpp
index 5e2525b..6284624 100644
--- a/ndn-cxx/lp/nack-header.hpp
+++ b/ndn-cxx/lp/nack-header.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -32,7 +32,7 @@
namespace lp {
/**
- * \brief indicates the reason type of a network NACK
+ * \brief Indicates the reason type of a %Network %Nack.
*/
enum class NackReason {
NONE = 0,
@@ -44,15 +44,16 @@
std::ostream&
operator<<(std::ostream& os, NackReason reason);
-/** \brief compare NackReason for severity
+/**
+ * \brief Compare NackReason according to severity.
*
- * lp::NackReason::NONE is treated as most severe
+ * NackReason::NONE is treated as most severe.
*/
bool
isLessSevere(lp::NackReason x, lp::NackReason y);
/**
- * \brief represents a Network NACK header
+ * \brief Represents a %Network %Nack header.
*/
class NackHeader
{
@@ -74,14 +75,14 @@
public: // reason
/**
- * \return reason code
+ * \brief Get reason code.
* \retval NackReason::NONE if NackReason element does not exist or has an unknown code
*/
NackReason
getReason() const;
/**
- * \brief set reason code
+ * \brief Set reason code.
* \param reason a reason code; NackReason::NONE clears the reason
*/
NackHeader&
diff --git a/ndn-cxx/lp/nack.hpp b/ndn-cxx/lp/nack.hpp
index e08307d..e166971 100644
--- a/ndn-cxx/lp/nack.hpp
+++ b/ndn-cxx/lp/nack.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -31,9 +31,10 @@
namespace ndn {
namespace lp {
-/** \brief represents a Network Nack
+/**
+ * \brief Represents a %Network %Nack.
*
- * This type binds a NackHeader and an Interest, and is intended for use in network layer.
+ * This type binds a NackHeader and an Interest, and is intended for use in network layer.
*/
class Nack : public PacketBase
{
diff --git a/ndn-cxx/lp/packet.hpp b/ndn-cxx/lp/packet.hpp
index d3a9766..4febf54 100644
--- a/ndn-cxx/lp/packet.hpp
+++ b/ndn-cxx/lp/packet.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -25,6 +25,9 @@
#include "ndn-cxx/lp/fields.hpp"
namespace ndn {
+/**
+ * @brief Contains classes and functions related to NDNLPv2.
+ */
namespace lp {
class Packet
@@ -42,13 +45,13 @@
Packet(const Block& wire);
/**
- * \brief encode packet into wire format
+ * \brief Encode packet into wire format.
*/
Block
wireEncode() const;
/**
- * \brief decode packet from wire format
+ * \brief Decode packet from wire format.
* \throws Error unknown TLV-TYPE
*/
void
@@ -66,7 +69,7 @@
public: // field access
/**
- * \return true if FIELD occurs one or more times
+ * \brief Returns true if \c FIELD occurs one or more times.
* \details This is equivalent to count() > 0
*/
template<typename FIELD>
@@ -77,7 +80,7 @@
}
/**
- * \return number of occurrences of FIELD
+ * \brief Returns the number of occurrences of \c FIELD.
*/
template<typename FIELD>
NDN_CXX_NODISCARD size_t
@@ -88,8 +91,8 @@
}
/**
- * \return value of index-th occurrence of FIELD
- * \throw std::out_of_range if index>=count()
+ * \brief Returns the value of the index-th occurrence of \c FIELD.
+ * \throw std::out_of_range if index >= count()
*/
template<typename FIELD>
typename FIELD::ValueType
@@ -109,7 +112,7 @@
}
/**
- * \return values of all occurrences of FIELD
+ * \brief Returns the values of all occurrences of \c FIELD.
*/
template<typename FIELD>
NDN_CXX_NODISCARD std::vector<typename FIELD::ValueType>
@@ -128,7 +131,7 @@
}
/**
- * \brief remove all occurrences of FIELD, and add a FIELD with value
+ * \brief Remove all occurrences of \c FIELD, and add a \c FIELD with value.
* \details This equivalent to clear() followed by add(value)
*/
template<typename FIELD>
@@ -140,7 +143,7 @@
}
/**
- * \brief add a FIELD with value
+ * \brief Add a \c FIELD with value.
* \throw std::invalid_argument if field already exists and is not repeatable
*/
template<typename FIELD>
@@ -165,7 +168,7 @@
}
/**
- * \brief remove the index-th occurrence of FIELD
+ * \brief Remove the index-th occurrence of \c FIELD.
* \throw std::out_of_range if index>=count()
*/
template<typename FIELD>
@@ -187,7 +190,7 @@
}
/**
- * \brief remove all occurrences of FIELD
+ * \brief Remove all occurrences of \c FIELD.
*/
template<typename FIELD>
Packet&
diff --git a/ndn-cxx/lp/pit-token.hpp b/ndn-cxx/lp/pit-token.hpp
index 413bf7c..9d0371d 100644
--- a/ndn-cxx/lp/pit-token.hpp
+++ b/ndn-cxx/lp/pit-token.hpp
@@ -28,7 +28,7 @@
namespace ndn {
namespace lp {
-/** \brief represent a PIT token field
+/** \brief Represent a PIT token field.
* \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2#PIT-Token
*/
class PitToken : public Buffer, public Tag
diff --git a/ndn-cxx/lp/prefix-announcement-header.hpp b/ndn-cxx/lp/prefix-announcement-header.hpp
index 89b59a6..a316ee4 100644
--- a/ndn-cxx/lp/prefix-announcement-header.hpp
+++ b/ndn-cxx/lp/prefix-announcement-header.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -27,7 +27,7 @@
namespace ndn {
namespace lp {
-/** \brief represents a PrefixAnnouncement header field in NDNLP
+/** \brief Represents a PrefixAnnouncement header field in NDNLP.
*/
class PrefixAnnouncementHeader
{
@@ -43,14 +43,14 @@
explicit
PrefixAnnouncementHeader(const Block& block);
- /** \brief constructs PrefixAnnouncementHeader using PrefixAnnouncement
+ /** \brief Constructs PrefixAnnouncementHeader using PrefixAnnouncement.
*
* \throw Error PrefixAnnouncement does not contain Data.
*/
explicit
PrefixAnnouncementHeader(PrefixAnnouncement prefixAnn);
- /** \brief encodes the prefix announcement header to the wire format
+ /** \brief Encodes the prefix announcement header to the wire format.
*
* \throw Error this instance does not contain a PrefixAnnouncement.
*/
diff --git a/ndn-cxx/lp/sequence.hpp b/ndn-cxx/lp/sequence.hpp
index f6b3184..b6dfddd 100644
--- a/ndn-cxx/lp/sequence.hpp
+++ b/ndn-cxx/lp/sequence.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -30,11 +30,11 @@
namespace lp {
/**
- * \brief represents a sequence number
+ * \brief Represents a sequence number.
*/
typedef uint64_t Sequence;
} // namespace lp
} // namespace ndn
-#endif // NDN_CXX_LP_SEQUENCE_HPP
\ No newline at end of file
+#endif // NDN_CXX_LP_SEQUENCE_HPP
diff --git a/ndn-cxx/lp/tags.hpp b/ndn-cxx/lp/tags.hpp
index 9863700..b32bc60 100644
--- a/ndn-cxx/lp/tags.hpp
+++ b/ndn-cxx/lp/tags.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -30,47 +30,53 @@
namespace ndn {
namespace lp {
-/** \class IncomingFaceIdTag
- * \brief a packet tag for IncomingFaceId field
+/**
+ * \class IncomingFaceIdTag
+ * \brief A packet tag for IncomingFaceId field.
*
- * This tag can be attached to Interest, Data, Nack.
+ * This tag can be attached to Interest, Data, Nack.
*/
-typedef SimpleTag<uint64_t, 10> IncomingFaceIdTag;
+using IncomingFaceIdTag = SimpleTag<uint64_t, 10>;
-/** \class NextHopFaceIdTag
- * \brief a packet tag for NextHopFaceId field
+/**
+ * \class NextHopFaceIdTag
+ * \brief A packet tag for NextHopFaceId field.
*
- * This tag can be attached to Interest.
+ * This tag can be attached to Interest.
*/
-typedef SimpleTag<uint64_t, 11> NextHopFaceIdTag;
+using NextHopFaceIdTag = SimpleTag<uint64_t, 11>;
-/** \class CachePolicyTag
- * \brief a packet tag for CachePolicy field
+/**
+ * \class CachePolicyTag
+ * \brief A packet tag for CachePolicy field.
*
- * This tag can be attached to Data.
+ * This tag can be attached to Data.
*/
-typedef SimpleTag<CachePolicy, 12> CachePolicyTag;
+using CachePolicyTag = SimpleTag<CachePolicy, 12>;
-/** \class CongestionMarkTag
- * \brief a packet tag for CongestionMark field
+/**
+ * \class CongestionMarkTag
+ * \brief A packet tag for CongestionMark field.
*
- * This tag can be attached to Interest, Data, Nack.
+ * This tag can be attached to Interest, Data, Nack.
*/
-typedef SimpleTag<uint64_t, 13> CongestionMarkTag;
+using CongestionMarkTag = SimpleTag<uint64_t, 13>;
-/** \class NonDiscoveryTag
- * \brief a packet tag for NonDiscovery field
+/**
+ * \class NonDiscoveryTag
+ * \brief A packet tag for NonDiscovery field.
*
- * This tag can be attached to Interest.
+ * This tag can be attached to Interest.
*/
-typedef SimpleTag<EmptyValue, 14> NonDiscoveryTag;
+using NonDiscoveryTag = SimpleTag<EmptyValue, 14>;
-/** \class PrefixAnnouncementTag
- * \brief a packet tag for PrefixAnnouncement field
+/**
+ * \class PrefixAnnouncementTag
+ * \brief A packet tag for PrefixAnnouncement field.
*
- * This tag can be attached to Data.
+ * This tag can be attached to Data.
*/
-typedef SimpleTag<PrefixAnnouncementHeader, 15> PrefixAnnouncementTag;
+using PrefixAnnouncementTag = SimpleTag<PrefixAnnouncementHeader, 15>;
} // namespace lp
} // namespace ndn
diff --git a/ndn-cxx/lp/tlv.hpp b/ndn-cxx/lp/tlv.hpp
index b1db594..3678dbd 100644
--- a/ndn-cxx/lp/tlv.hpp
+++ b/ndn-cxx/lp/tlv.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -24,10 +24,13 @@
namespace ndn {
namespace lp {
+/**
+ * @brief Contains constants related to the NDNLPv2 packet format.
+ */
namespace tlv {
/**
- * \brief TLV-TYPE numbers for NDNLPv2
+ * \brief TLV-TYPE numbers for NDNLPv2.
*/
enum {
LpPacket = 100,
@@ -51,22 +54,22 @@
enum {
/**
- * \brief lower bound of 1-octet header field
+ * \brief Lower bound of 1-octet header field.
*/
HEADER1_MIN = 81,
/**
- * \brief upper bound of 1-octet header field
+ * \brief Upper bound of 1-octet header field.
*/
HEADER1_MAX = 99,
/**
- * \brief lower bound of 3-octet header field
+ * \brief Lower bound of 3-octet header field.
*/
HEADER3_MIN = 800,
/**
- * \brief upper bound of 3-octet header field
+ * \brief Upper bound of 3-octet header field.
*/
HEADER3_MAX = 959
};
diff --git a/ndn-cxx/meta-info.hpp b/ndn-cxx/meta-info.hpp
index a4155cd..0003c35 100644
--- a/ndn-cxx/meta-info.hpp
+++ b/ndn-cxx/meta-info.hpp
@@ -32,10 +32,13 @@
namespace ndn {
-const time::milliseconds DEFAULT_FRESHNESS_PERIOD = time::milliseconds::zero();
+/**
+ * @brief Default value of `FreshnessPeriod`.
+ */
+const time::milliseconds DEFAULT_FRESHNESS_PERIOD{0};
/**
- * @brief A MetaInfo holds the meta info which is signed inside the data packet.
+ * @brief A MetaInfo holds the meta info which is signed inside the Data packet.
*
* The class allows experimentation with application-defined meta-information elements.
* When using these application-defined elements, be aware that it may result in dropped
@@ -67,7 +70,7 @@
MetaInfo();
/**
- * @brief Create from wire encoding
+ * @brief Create from wire encoding.
*/
explicit
MetaInfo(const Block& block);
@@ -83,9 +86,9 @@
wireDecode(const Block& wire);
public: // getter/setter
- /** @brief return ContentType
+ /** @brief Return the value of `ContentType`.
*
- * If ContentType element is omitted, returns \c tlv::ContentType_Blob.
+ * If the `ContentType` element is not present, returns tlv::ContentType_Blob.
*/
uint32_t
getType() const
@@ -93,15 +96,15 @@
return m_type;
}
- /** @brief set ContentType
- * @param type a number defined in \c tlv::ContentTypeValue
+ /** @brief Set `ContentType`.
+ * @param type a number defined in tlv::ContentTypeValue
*/
MetaInfo&
setType(uint32_t type);
- /** @brief return FreshnessPeriod
+ /** @brief Return the value of `FreshnessPeriod`.
*
- * If FreshnessPeriod element is omitted, returns \c DEFAULT_FRESHNESS_PERIOD.
+ * If the `FreshnessPeriod` element is not present, returns #DEFAULT_FRESHNESS_PERIOD.
*/
time::milliseconds
getFreshnessPeriod() const
@@ -109,13 +112,13 @@
return m_freshnessPeriod;
}
- /** @brief set FreshnessPeriod
+ /** @brief Set `FreshnessPeriod`.
* @throw std::invalid_argument specified FreshnessPeriod is negative
*/
MetaInfo&
setFreshnessPeriod(time::milliseconds freshnessPeriod);
- /** @brief return FinalBlockId
+ /** @brief Return the value of `FinalBlockId`.
*/
const optional<name::Component>&
getFinalBlock() const
@@ -123,14 +126,14 @@
return m_finalBlockId;
}
- /** @brief set FinalBlockId
+ /** @brief Set `FinalBlockId`.
*/
MetaInfo&
setFinalBlock(optional<name::Component> finalBlockId);
public: // app-defined MetaInfo items
/**
- * @brief Get all app-defined MetaInfo items
+ * @brief Get all app-defined MetaInfo items.
*
* @note If MetaInfo is decoded from wire and setType, setFreshnessPeriod, or setFinalBlock
* is called before *AppMetaInfo, all app-defined blocks will be lost
@@ -139,7 +142,7 @@
getAppMetaInfo() const;
/**
- * @brief Set app-defined MetaInfo items
+ * @brief Set app-defined MetaInfo items.
*
* This method will replace all existing app-defined MetaInfo items, if they existed.
*
@@ -153,7 +156,7 @@
setAppMetaInfo(const std::list<Block>& info);
/**
- * @brief Add an app-defined MetaInfo item
+ * @brief Add an app-defined MetaInfo item.
*
* @throw Error if @p block has type not in the application range
* (https://named-data.net/doc/NDN-packet-spec/0.3/types.html)
@@ -165,7 +168,7 @@
addAppMetaInfo(const Block& block);
/**
- * @brief Remove a first app-defined MetaInfo item with type @p tlvType
+ * @brief Remove a first app-defined MetaInfo item with type @p tlvType.
*
* @return true if an item was deleted
*
@@ -176,7 +179,7 @@
removeAppMetaInfo(uint32_t tlvType);
/**
- * @brief Find a first app-defined MetaInfo item of type @p tlvType
+ * @brief Find a first app-defined MetaInfo item of type @p tlvType.
*
* @return NULL if an item is not found, otherwise const pointer to the item
*
diff --git a/ndn-cxx/mgmt/control-parameters.hpp b/ndn-cxx/mgmt/control-parameters.hpp
index 8992571..382a7af 100644
--- a/ndn-cxx/mgmt/control-parameters.hpp
+++ b/ndn-cxx/mgmt/control-parameters.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -27,7 +27,8 @@
namespace ndn {
namespace mgmt {
-/** \brief base class for a struct that contains ControlCommand parameters
+/**
+ * \brief Base class for a struct that contains ControlCommand parameters.
*/
class ControlParameters
{
diff --git a/ndn-cxx/mgmt/dispatcher.hpp b/ndn-cxx/mgmt/dispatcher.hpp
index a382e65..d0c88ef 100644
--- a/ndn-cxx/mgmt/dispatcher.hpp
+++ b/ndn-cxx/mgmt/dispatcher.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -37,29 +37,29 @@
// ---- AUTHORIZATION ----
-/** \brief a function to be called if authorization is successful
+/** \brief A function to be called if authorization is successful.
* \param requester a string that indicates the requester, whose semantics is determined by
* the Authorization function; this value is intended for logging only,
* and should not affect how the request is processed
*/
typedef std::function<void(const std::string& requester)> AcceptContinuation;
-/** \brief indicate how to reply in case authorization is rejected
+/** \brief Indicate how to reply in case authorization is rejected.
*/
enum class RejectReply {
- /** \brief do not reply
+ /** \brief Do not reply.
*/
SILENT,
- /** \brief reply with a ControlResponse where StatusCode is 403
+ /** \brief Reply with a ControlResponse where StatusCode is 403.
*/
STATUS403
};
-/** \brief a function to be called if authorization is rejected
+/** \brief A function to be called if authorization is rejected.
*/
typedef std::function<void(RejectReply reply)> RejectContinuation;
-/** \brief a function that performs authorization
+/** \brief A function that performs authorization.
* \param prefix top-level prefix, e.g., "/localhost/nfd";
* This argument can be inspected to allow Interests only under a subset of
* top-level prefixes (e.g., allow "/localhost/nfd" only),
@@ -76,25 +76,25 @@
const AcceptContinuation& accept,
const RejectContinuation& reject)> Authorization;
-/** \brief return an Authorization that accepts all Interests, with empty string as requester
+/** \brief Return an Authorization that accepts all Interests, with empty string as requester.
*/
Authorization
makeAcceptAllAuthorization();
// ---- CONTROL COMMAND ----
-/** \brief a function to validate input ControlParameters
+/** \brief A function to validate input ControlParameters.
* \param params parsed ControlParameters;
* This is guaranteed to have correct type for the command.
*/
typedef std::function<bool(const ControlParameters& params)> ValidateParameters;
-/** \brief a function to be called after ControlCommandHandler completes
+/** \brief A function to be called after ControlCommandHandler completes.
* \param resp the response to be sent to requester
*/
typedef std::function<void(const ControlResponse& resp)> CommandContinuation;
-/** \brief a function to handle an authorized ControlCommand
+/** \brief A function to handle an authorized ControlCommand.
* \param prefix top-level prefix, e.g., "/localhost/nfd";
* \param interest incoming Interest
* \param params parsed ControlParameters;
@@ -107,7 +107,7 @@
// ---- STATUS DATASET ----
-/** \brief a function to handle a StatusDataset request
+/** \brief A function to handle a StatusDataset request.
* \param prefix top-level prefix, e.g., "/localhost/nfd";
* \param interest incoming Interest; its Name doesn't contain version and segment components
*
@@ -119,18 +119,18 @@
//---- NOTIFICATION STREAM ----
-/** \brief a function to post a notification
+/** \brief A function to post a notification.
*/
typedef std::function<void(const Block& notification)> PostNotification;
// ---- DISPATCHER ----
-/** \brief represents a dispatcher on server side of NFD Management protocol
+/** \brief Implements a request dispatcher on server side of NFD Management protocol.
*/
class Dispatcher : noncopyable
{
public:
- /** \brief constructor
+ /** \brief Constructor.
* \param face the Face on which the dispatcher operates
* \param keyChain a KeyChain to sign Data
* \param signingInfo signing parameters to sign Data with \p keyChain
@@ -143,7 +143,7 @@
virtual
~Dispatcher();
- /** \brief add a top-level prefix
+ /** \brief Add a top-level prefix.
* \param prefix a top-level prefix, e.g., "/localhost/nfd"
* \param wantRegister whether prefix registration should be performed through the Face
* \param signingInfo signing parameters to sign the prefix registration command
@@ -166,7 +166,7 @@
addTopPrefix(const Name& prefix, bool wantRegister = true,
const security::SigningInfo& signingInfo = security::SigningInfo());
- /** \brief remove a top-level prefix
+ /** \brief Remove a top-level prefix.
* \param prefix a top-level prefix, e.g., "/localhost/nfd"
*
* Procedure for removing a top-level prefix:
@@ -178,7 +178,7 @@
removeTopPrefix(const Name& prefix);
public: // ControlCommand
- /** \brief register a ControlCommand
+ /** \brief Register a ControlCommand.
* \tparam CP subclass of ControlParameters used by this command
* \param relPrefix a prefix for this command, e.g., "faces/create";
* relPrefixes in ControlCommands, StatusDatasets, NotificationStreams must be
@@ -211,7 +211,7 @@
ControlCommandHandler handle);
public: // StatusDataset
- /** \brief register a StatusDataset or a prefix under which StatusDatasets can be requested
+ /** \brief Register a StatusDataset or a prefix under which StatusDatasets can be requested.
* \param relPrefix a prefix for this dataset, e.g., "faces/list";
* relPrefixes in ControlCommands, StatusDatasets, NotificationStreams must be
* non-overlapping (no relPrefix is a prefix of another relPrefix)
@@ -247,7 +247,7 @@
StatusDatasetHandler handle);
public: // NotificationStream
- /** \brief register a NotificationStream
+ /** \brief Register a NotificationStream.
* \param relPrefix a prefix for this notification stream, e.g., "faces/events";
* relPrefixes in ControlCommands, StatusDatasets, NotificationStreams must be
* non-overlapping (no relPrefix is a prefix of another relPrefix)
@@ -280,8 +280,8 @@
using AuthorizationRejectedCallback = std::function<void(RejectReply, const Interest&)>;
/**
- * @brief the parser for extracting control parameters from a name component.
- * @return a shared pointer to the extracted ControlParameters.
+ * @brief The parser for extracting control parameters from a name component.
+ * @return A shared pointer to the extracted ControlParameters.
* @throw tlv::Error if the name component cannot be parsed as ControlParameters
*/
using ControlParametersParser = std::function<shared_ptr<ControlParameters>(const name::Component&)>;
@@ -290,7 +290,7 @@
isOverlappedWithOthers(const PartialName& relPrefix) const;
/**
- * @brief process unauthorized request
+ * @brief Process unauthorized request.
* @param act action to reply
* @param interest the incoming Interest
*/
@@ -298,7 +298,7 @@
afterAuthorizationRejected(RejectReply act, const Interest& interest);
/**
- * @brief query Data the in-memory storage by a given Interest
+ * @brief Query Data the in-memory storage by a given Interest.
*
* if the query fails, invoke @p missContinuation to process @p interest.
*
@@ -317,7 +317,7 @@
};
/**
- * @brief send data to the face and/or in-memory storage
+ * @brief Send data to the face and/or in-memory storage.
*
* Create a Data packet with the given @p dataName, @p content, and @p metaInfo,
* set its FreshnessPeriod to 1 second, and then send it out through the face
@@ -336,7 +336,7 @@
SendDestination destination);
/**
- * @brief send out a data packt through the face
+ * @brief Send out a data packt through the face.
*
* @param data the data packet to insert
*/
@@ -344,7 +344,7 @@
sendOnFace(const Data& data);
/**
- * @brief process the control-command Interest before authorization.
+ * @brief Process the control-command Interest before authorization.
*
* @param prefix the top-level prefix
* @param relPrefix the relative prefix
@@ -364,7 +364,7 @@
const AuthorizationRejectedCallback& rejected);
/**
- * @brief process the authorized control-command.
+ * @brief Process the authorized control-command.
*
* @param requester the requester
* @param prefix the top-level prefix
@@ -385,7 +385,7 @@
sendControlResponse(const ControlResponse& resp, const Interest& interest, bool isNack = false);
/**
- * @brief process the status-dataset Interest before authorization.
+ * @brief Process the status-dataset Interest before authorization.
*
* @param prefix the top-level prefix
* @param interest the incoming Interest
@@ -401,7 +401,7 @@
const AuthorizationRejectedCallback& rejected);
/**
- * @brief process the authorized StatusDataset request
+ * @brief Process the authorized StatusDataset request.
*
* @param prefix the top-level prefix
* @param interest the incoming Interest
@@ -413,7 +413,7 @@
const StatusDatasetHandler& handler);
/**
- * @brief send a segment of StatusDataset
+ * @brief Send a segment of StatusDataset.
*
* @param dataName the name of this piece of data
* @param content the content of this piece of data
diff --git a/ndn-cxx/mgmt/nfd/channel-status.hpp b/ndn-cxx/mgmt/nfd/channel-status.hpp
index 8c4d9b1..2373ef5 100644
--- a/ndn-cxx/mgmt/nfd/channel-status.hpp
+++ b/ndn-cxx/mgmt/nfd/channel-status.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,7 +29,7 @@
/**
* \ingroup management
- * \brief represents an item in NFD Channel dataset
+ * \brief Represents an item in NFD Channel dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Channel-Dataset
*/
class ChannelStatus
diff --git a/ndn-cxx/mgmt/nfd/command-options.hpp b/ndn-cxx/mgmt/nfd/command-options.hpp
index 18afe62..5101294 100644
--- a/ndn-cxx/mgmt/nfd/command-options.hpp
+++ b/ndn-cxx/mgmt/nfd/command-options.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -28,28 +28,29 @@
namespace nfd {
/** \ingroup management
- * \brief contains options for ControlCommand execution
+ * \brief Contains options for ControlCommand execution.
* \note This type is intentionally copyable
*/
class CommandOptions
{
public:
- /** \brief constructs CommandOptions
+ /** \brief Constructs CommandOptions.
* \post getTimeout() == DEFAULT_TIMEOUT
* \post getPrefix() == DEFAULT_PREFIX
* \post getSigningInfo().getSignerType() == SIGNER_TYPE_NULL
*/
CommandOptions();
- /** \return command timeout
+ /**
+ * \brief Returns the command timeout.
*/
- const time::milliseconds&
+ time::milliseconds
getTimeout() const
{
return m_timeout;
}
- /** \brief sets command timeout
+ /** \brief Sets the command timeout.
* \param timeout the new command timeout, must be positive
* \throw std::out_of_range if timeout is non-positive
* \return self
@@ -57,7 +58,8 @@
CommandOptions&
setTimeout(const time::milliseconds& timeout);
- /** \return command prefix
+ /**
+ * \brief Returns the command prefix.
*/
const Name&
getPrefix() const
@@ -65,13 +67,14 @@
return m_prefix;
}
- /** \brief sets command prefix
+ /** \brief Sets the command prefix.
* \return self
*/
CommandOptions&
setPrefix(const Name& prefix);
- /** \return signing parameters
+ /**
+ * \brief Returns the signing parameters.
*/
const security::SigningInfo&
getSigningInfo() const
@@ -79,19 +82,17 @@
return m_signingInfo;
}
- /** \brief sets signing parameters
+ /** \brief Sets the signing parameters.
* \return self
*/
CommandOptions&
setSigningInfo(const security::SigningInfo& signingInfo);
public:
- /** \brief gives the default command timeout: 10000ms
- */
+ /// The default command timeout: 10 seconds.
static const time::milliseconds DEFAULT_TIMEOUT;
- /** \brief gives the default command prefix: ndn:/localhost/nfd
- */
+ /// The default command prefix: `/localhost/nfd`.
static const Name DEFAULT_PREFIX;
private:
diff --git a/ndn-cxx/mgmt/nfd/control-command.hpp b/ndn-cxx/mgmt/nfd/control-command.hpp
index 19d12ed..9aa5820 100644
--- a/ndn-cxx/mgmt/nfd/control-command.hpp
+++ b/ndn-cxx/mgmt/nfd/control-command.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,50 +29,46 @@
/**
* \ingroup management
- * \brief base class of NFD ControlCommand
+ * \brief Base class of NFD `%ControlCommand`.
* \sa https://redmine.named-data.net/projects/nfd/wiki/ControlCommand
*/
class ControlCommand : noncopyable
{
public:
- /** \brief represents an error in ControlParameters
+ /** \brief Represents an error in ControlParameters.
*/
class ArgumentError : public std::invalid_argument
{
public:
- explicit
- ArgumentError(const std::string& what)
- : std::invalid_argument(what)
- {
- }
+ using std::invalid_argument::invalid_argument;
};
virtual
~ControlCommand();
- /** \brief validate request parameters
+ /** \brief Validate request parameters.
* \throw ArgumentError if parameters are invalid
*/
virtual void
validateRequest(const ControlParameters& parameters) const;
- /** \brief apply default values to missing fields in request
+ /** \brief Apply default values to missing fields in request.
*/
virtual void
applyDefaultsToRequest(ControlParameters& parameters) const;
- /** \brief validate response parameters
+ /** \brief Validate response parameters.
* \throw ArgumentError if parameters are invalid
*/
virtual void
validateResponse(const ControlParameters& parameters) const;
- /** \brief apply default values to missing fields in response
+ /** \brief Apply default values to missing fields in response.
*/
virtual void
applyDefaultsToResponse(ControlParameters& parameters) const;
- /** \brief construct the Name for a request Interest
+ /** \brief Construct the Name for a request Interest.
* \throw ArgumentError if parameters are invalid
*/
Name
@@ -86,7 +82,7 @@
public:
FieldValidator();
- /** \brief declare a required field
+ /** \brief Declare a required field.
*/
FieldValidator&
required(ControlParameterField field)
@@ -95,7 +91,7 @@
return *this;
}
- /** \brief declare an optional field
+ /** \brief Declare an optional field.
*/
FieldValidator&
optional(ControlParameterField field)
@@ -104,8 +100,8 @@
return *this;
}
- /** \brief verify that all required fields are present,
- * and all present fields are either required or optional
+ /** \brief Verify that all required fields are present,
+ * and all present fields are either required or optional.
* \throw ArgumentError
*/
void
@@ -117,12 +113,12 @@
};
protected:
- /** \brief FieldValidator for request ControlParameters
+ /** \brief FieldValidator for request ControlParameters.
*
* Constructor of subclass should populate this validator.
*/
FieldValidator m_requestValidator;
- /** \brief FieldValidator for response ControlParameters
+ /** \brief FieldValidator for response ControlParameters.
*
* Constructor of subclass should populate this validator.
*/
@@ -136,7 +132,7 @@
/**
* \ingroup management
- * \brief represents a faces/create command
+ * \brief Represents a `faces/create` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Create-a-face
*/
class FaceCreateCommand : public ControlCommand
@@ -154,7 +150,7 @@
/**
* \ingroup management
- * \brief represents a faces/update command
+ * \brief Represents a `faces/update` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Update-the-static-properties-of-a-face
*/
class FaceUpdateCommand : public ControlCommand
@@ -176,7 +172,7 @@
/**
* \ingroup management
- * \brief represents a faces/destroy command
+ * \brief Represents a `faces/destroy` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Destroy-a-face
*/
class FaceDestroyCommand : public ControlCommand
@@ -194,7 +190,7 @@
/**
* \ingroup management
- * \brief represents a fib/add-nexthop command
+ * \brief Represents a `fib/add-nexthop` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FibMgmt#Add-a-nexthop
*/
class FibAddNextHopCommand : public ControlCommand
@@ -212,7 +208,7 @@
/**
* \ingroup management
- * \brief represents a fib/remove-nexthop command
+ * \brief Represents a `fib/remove-nexthop` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FibMgmt#Remove-a-nexthop
*/
class FibRemoveNextHopCommand : public ControlCommand
@@ -230,7 +226,7 @@
/**
* \ingroup management
- * \brief represents a cs/config command
+ * \brief Represents a `cs/config` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-configuration
*/
class CsConfigCommand : public ControlCommand
@@ -242,7 +238,7 @@
/**
* \ingroup management
- * \brief represents a cs/erase command
+ * \brief Represents a `cs/erase` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Erase-entries
*/
class CsEraseCommand : public ControlCommand
@@ -260,7 +256,7 @@
/**
* \ingroup management
- * \brief represents a strategy-choice/set command
+ * \brief Represents a `strategy-choice/set` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/StrategyChoice#Set-the-strategy-for-a-namespace
*/
class StrategyChoiceSetCommand : public ControlCommand
@@ -272,7 +268,7 @@
/**
* \ingroup management
- * \brief represents a strategy-choice/set command
+ * \brief Represents a `strategy-choice/set` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/StrategyChoice#Unset-the-strategy-for-a-namespace
*/
class StrategyChoiceUnsetCommand : public ControlCommand
@@ -290,7 +286,7 @@
/**
* \ingroup management
- * \brief represents a rib/register command
+ * \brief Represents a `rib/register` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/RibMgmt#Register-a-route
*/
class RibRegisterCommand : public ControlCommand
@@ -308,7 +304,7 @@
/**
* \ingroup management
- * \brief represents a rib/unregister command
+ * \brief Represents a `rib/unregister` command.
* \sa https://redmine.named-data.net/projects/nfd/wiki/RibMgmt#Unregister-a-route
*/
class RibUnregisterCommand : public ControlCommand
diff --git a/ndn-cxx/mgmt/nfd/control-parameters.hpp b/ndn-cxx/mgmt/nfd/control-parameters.hpp
index adf96f4..2d1a3ea 100644
--- a/ndn-cxx/mgmt/nfd/control-parameters.hpp
+++ b/ndn-cxx/mgmt/nfd/control-parameters.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -74,7 +74,7 @@
/**
* \ingroup management
- * \brief represents parameters in a ControlCommand request or response
+ * \brief Represents parameters in a ControlCommand request or response.
* \sa https://redmine.named-data.net/projects/nfd/wiki/ControlCommand#ControlParameters
* \details This type is copyable because it's an abstraction of a TLV type.
*/
@@ -529,7 +529,7 @@
return m_hasFields[CONTROL_PARAMETER_DEFAULT_CONGESTION_THRESHOLD];
}
- /** \brief get default congestion threshold (measured in bytes)
+ /** \brief Get default congestion threshold (measured in bytes).
*/
uint64_t
getDefaultCongestionThreshold() const
@@ -538,7 +538,7 @@
return m_defaultCongestionThreshold;
}
- /** \brief set default congestion threshold (measured in bytes)
+ /** \brief Set default congestion threshold (measured in bytes).
*/
ControlParameters&
setDefaultCongestionThreshold(uint64_t threshold)
@@ -563,7 +563,7 @@
return m_hasFields[CONTROL_PARAMETER_MTU];
}
- /** \brief get MTU (measured in bytes)
+ /** \brief Get MTU (measured in bytes).
*
* This value is capped at MAX_NDN_PACKET_SIZE, even if the MTU of the face is unlimited.
*/
@@ -574,7 +574,7 @@
return m_mtu;
}
- /** \brief set MTU (measured in bytes)
+ /** \brief Set MTU (measured in bytes).
*
* This value is capped at MAX_NDN_PACKET_SIZE, even if the MTU of the face is unlimited.
*/
@@ -617,7 +617,7 @@
getFlagBit(size_t bit) const;
/**
- * \brief set a bit in Flags
+ * \brief Set a bit in Flags.
* \param bit bit position within range [0, 64) (least significant bit is 0)
* \param value new value in Flags
* \param wantMask if true, enable the bit in Mask
@@ -626,7 +626,7 @@
setFlagBit(size_t bit, bool value, bool wantMask = true);
/**
- * \brief disable a bit in Mask
+ * \brief Disable a bit in Mask.
* \param bit bit position within range [0, 64) (least significant bit is 0)
* \post If all bits are disabled, Flags and Mask fields are deleted.
*/
diff --git a/ndn-cxx/mgmt/nfd/controller.hpp b/ndn-cxx/mgmt/nfd/controller.hpp
index 0d4bb6a..3cb2c0d 100644
--- a/ndn-cxx/mgmt/nfd/controller.hpp
+++ b/ndn-cxx/mgmt/nfd/controller.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -40,38 +40,41 @@
/**
* \defgroup management Management
- * \brief Classes and data structures to manage NDN forwarder
+ * \brief Classes and data structures to manage NDN forwarder.
*/
/**
* \ingroup management
- * \brief NFD Management protocol client
+ * \brief NFD Management protocol client.
* \sa https://redmine.named-data.net/projects/nfd/wiki/Management
*/
class Controller : noncopyable
{
public:
- /** \brief a callback on command success
+ /**
+ * \brief Callback on command success.
*/
using CommandSucceedCallback = function<void(const ControlParameters&)>;
- /** \brief a callback on command failure
+ /**
+ * \brief Callback on command failure.
*/
using CommandFailCallback = function<void(const ControlResponse&)>;
- /** \brief a callback on dataset retrieval failure
+ /**
+ * \brief Callback on dataset retrieval failure.
*/
using DatasetFailCallback = function<void(uint32_t code, const std::string& reason)>;
- /** \brief construct a Controller that uses face for transport,
- * and uses the passed KeyChain to sign commands
+ /**
+ * \brief Construct a Controller that uses \p face as transport and \p keyChain to sign commands.
*/
Controller(Face& face, KeyChain& keyChain,
security::Validator& validator = security::getAcceptAllValidator());
~Controller();
- /** \brief start command execution
+ /** \brief Start command execution.
*/
template<typename Command>
void
@@ -83,7 +86,7 @@
startCommand(make_shared<Command>(), parameters, onSuccess, onFailure, options);
}
- /** \brief start dataset fetching
+ /** \brief Start dataset fetching.
*/
template<typename Dataset>
std::enable_if_t<std::is_default_constructible<Dataset>::value>
@@ -94,7 +97,7 @@
fetchDataset(make_shared<Dataset>(), onSuccess, onFailure, options);
}
- /** \brief start dataset fetching
+ /** \brief Start dataset fetching.
*/
template<typename Dataset, typename ParamType = typename Dataset::ParamType>
void
@@ -150,24 +153,19 @@
processDatasetFetchError(const DatasetFailCallback& onFailure, uint32_t code, std::string msg);
public:
- /** \brief error code for timeout
- */
+ /// Error code for timeout.
static const uint32_t ERROR_TIMEOUT;
- /** \brief error code for network Nack
- */
+ /// Error code for network %Nack.
static const uint32_t ERROR_NACK;
- /** \brief error code for response validation failure
- */
+ /// Error code for response validation failure.
static const uint32_t ERROR_VALIDATION;
- /** \brief error code for server error
- */
+ /// Error code for server error.
static const uint32_t ERROR_SERVER;
- /** \brief inclusive lower bound of error codes
- */
+ /// Inclusive lower bound of error codes.
static const uint32_t ERROR_LBOUND;
protected:
diff --git a/ndn-cxx/mgmt/nfd/cs-info.hpp b/ndn-cxx/mgmt/nfd/cs-info.hpp
index 85dc615..095c86f 100644
--- a/ndn-cxx/mgmt/nfd/cs-info.hpp
+++ b/ndn-cxx/mgmt/nfd/cs-info.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -31,7 +31,7 @@
namespace nfd {
/** \ingroup management
- * \brief represents the CS Information dataset
+ * \brief Represents the CS Information dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#CS-Information-Dataset
*/
class CsInfo
@@ -58,7 +58,7 @@
void
wireDecode(const Block& wire);
- /** \brief get CS capacity (in number of packets)
+ /** \brief Get CS capacity (in number of packets).
*/
uint64_t
getCapacity() const
@@ -69,7 +69,7 @@
CsInfo&
setCapacity(uint64_t capacity);
- /** \brief get CS_ENABLE_ADMIT flag
+ /** \brief Get \c CS_ENABLE_ADMIT flag.
*/
bool
getEnableAdmit() const
@@ -80,7 +80,7 @@
CsInfo&
setEnableAdmit(bool enableAdmit);
- /** \brief get CS_ENABLE_SERVE flag
+ /** \brief Get \c CS_ENABLE_SERVE flag.
*/
bool
getEnableServe() const
@@ -91,7 +91,7 @@
CsInfo&
setEnableServe(bool enableServe);
- /** \brief get number of stored CS entries
+ /** \brief Get number of stored CS entries.
*/
uint64_t
getNEntries() const
@@ -102,7 +102,7 @@
CsInfo&
setNEntries(uint64_t nEntries);
- /** \brief get number of CS lookup hits since NFD starts
+ /** \brief Get number of CS lookup hits since NFD started.
*/
uint64_t
getNHits() const
@@ -113,7 +113,7 @@
CsInfo&
setNHits(uint64_t nHits);
- /** \brief get number of CS lookup misses since NFD starts
+ /** \brief Get number of CS lookup misses since NFD started.
*/
uint64_t
getNMisses() const
diff --git a/ndn-cxx/mgmt/nfd/face-event-notification.hpp b/ndn-cxx/mgmt/nfd/face-event-notification.hpp
index ea1fbdd..df6909b 100644
--- a/ndn-cxx/mgmt/nfd/face-event-notification.hpp
+++ b/ndn-cxx/mgmt/nfd/face-event-notification.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,7 +29,7 @@
/**
* \ingroup management
- * \brief represents a Face status change notification
+ * \brief Represents a Face status change notification.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Face-Status-Change-Notification
*/
class FaceEventNotification : public FaceTraits<FaceEventNotification>
@@ -40,18 +40,18 @@
explicit
FaceEventNotification(const Block& block);
- /** \brief prepend FaceEventNotification to the encoder
+ /** \brief Prepend FaceEventNotification to the encoder.
*/
template<encoding::Tag TAG>
size_t
wireEncode(EncodingImpl<TAG>& encoder) const;
- /** \brief encode FaceEventNotification
+ /** \brief Encode FaceEventNotification.
*/
const Block&
wireEncode() const;
- /** \brief decode FaceEventNotification
+ /** \brief Decode FaceEventNotification.
*/
void
wireDecode(const Block& wire);
diff --git a/ndn-cxx/mgmt/nfd/face-query-filter.hpp b/ndn-cxx/mgmt/nfd/face-query-filter.hpp
index 4362acc..7bff9aa 100644
--- a/ndn-cxx/mgmt/nfd/face-query-filter.hpp
+++ b/ndn-cxx/mgmt/nfd/face-query-filter.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -31,7 +31,7 @@
/**
* \ingroup management
- * \brief represents Face Query Filter
+ * \brief Represents Face Query Filter.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Query-Operation
*/
class FaceQueryFilter
@@ -48,23 +48,23 @@
explicit
FaceQueryFilter(const Block& block);
- /** \brief prepend FaceQueryFilter to the encoder
+ /** \brief Prepend FaceQueryFilter to the encoder.
*/
template<encoding::Tag TAG>
size_t
wireEncode(EncodingImpl<TAG>& encoder) const;
- /** \brief encode FaceQueryFilter
+ /** \brief Encode FaceQueryFilter.
*/
const Block&
wireEncode() const;
- /** \brief decode FaceQueryFilter
+ /** \brief Decode FaceQueryFilter.
*/
void
wireDecode(const Block& wire);
- /** \return whether the filter is empty
+ /** \return Whether the filter is empty.
*/
bool
empty() const;
diff --git a/ndn-cxx/mgmt/nfd/face-status.hpp b/ndn-cxx/mgmt/nfd/face-status.hpp
index 5419694..8d0e59c 100644
--- a/ndn-cxx/mgmt/nfd/face-status.hpp
+++ b/ndn-cxx/mgmt/nfd/face-status.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -31,7 +31,7 @@
/**
* \ingroup management
- * \brief represents an item in NFD Face dataset
+ * \brief Represents an item in NFD %Face dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Face-Dataset
*/
class FaceStatus : public FaceTraits<FaceStatus>
@@ -42,18 +42,18 @@
explicit
FaceStatus(const Block& block);
- /** \brief prepend FaceStatus to the encoder
+ /** \brief Prepend FaceStatus to the encoder.
*/
template<encoding::Tag TAG>
size_t
wireEncode(EncodingImpl<TAG>& encoder) const;
- /** \brief encode FaceStatus
+ /** \brief Encode FaceStatus.
*/
const Block&
wireEncode() const;
- /** \brief decode FaceStatus
+ /** \brief Decode FaceStatus.
*/
void
wireDecode(const Block& wire);
@@ -103,7 +103,7 @@
return !!m_defaultCongestionThreshold;
}
- /** \brief get default congestion threshold (measured in bytes)
+ /** \brief Get default congestion threshold (measured in bytes).
*/
uint64_t
getDefaultCongestionThreshold() const
@@ -112,7 +112,7 @@
return *m_defaultCongestionThreshold;
}
- /** \brief set default congestion threshold (measured in bytes)
+ /** \brief Set default congestion threshold (measured in bytes).
*/
FaceStatus&
setDefaultCongestionThreshold(uint64_t threshold);
@@ -126,7 +126,7 @@
return !!m_mtu;
}
- /** \brief get MTU (measured in bytes)
+ /** \brief Get MTU (measured in bytes).
*
* This value is capped at MAX_NDN_PACKET_SIZE, even if the MTU of the face is unlimited.
*/
@@ -137,7 +137,7 @@
return *m_mtu;
}
- /** \brief set MTU (measured in bytes)
+ /** \brief Set MTU (measured in bytes).
*
* This value is capped at MAX_NDN_PACKET_SIZE, even if the MTU of the face is unlimited.
*/
diff --git a/ndn-cxx/mgmt/nfd/face-traits.hpp b/ndn-cxx/mgmt/nfd/face-traits.hpp
index 67bf8c4..d497b4d 100644
--- a/ndn-cxx/mgmt/nfd/face-traits.hpp
+++ b/ndn-cxx/mgmt/nfd/face-traits.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -30,8 +30,8 @@
/**
* \ingroup management
- * \brief provides getters and setters for face information fields
- * \tparam C the concrete subclass
+ * \brief Provides getters and setters for face information fields.
+ * \tparam C The concrete subclass
*/
template<class C>
class FaceTraits
diff --git a/ndn-cxx/mgmt/nfd/forwarder-status.hpp b/ndn-cxx/mgmt/nfd/forwarder-status.hpp
index d20a1ff..5733c1f 100644
--- a/ndn-cxx/mgmt/nfd/forwarder-status.hpp
+++ b/ndn-cxx/mgmt/nfd/forwarder-status.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -30,7 +30,7 @@
/**
* \ingroup management
- * \brief represents NFD General Status dataset
+ * \brief Represents NFD General Status dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/ForwarderStatus#General-Status-Dataset
*/
class ForwarderStatus
@@ -47,7 +47,7 @@
explicit
ForwarderStatus(const Block& payload);
- /** \brief prepend ForwarderStatus as a Content block to the encoder
+ /** \brief Prepend ForwarderStatus as a Content block to the encoder.
*
* The outermost Content element isn't part of ForwarderStatus structure.
*/
@@ -55,14 +55,14 @@
size_t
wireEncode(EncodingImpl<TAG>& encoder) const;
- /** \brief encode ForwarderStatus as a Content block
+ /** \brief Encode ForwarderStatus as a Content block.
*
* The outermost Content element isn't part of ForwarderStatus structure.
*/
const Block&
wireEncode() const;
- /** \brief decode ForwarderStatus from a Content block
+ /** \brief Decode ForwarderStatus from a Content block.
*
* The outermost Content element isn't part of ForwarderStatus structure.
*/
diff --git a/ndn-cxx/mgmt/nfd/rib-entry.hpp b/ndn-cxx/mgmt/nfd/rib-entry.hpp
index 9cf673c..066bbab 100644
--- a/ndn-cxx/mgmt/nfd/rib-entry.hpp
+++ b/ndn-cxx/mgmt/nfd/rib-entry.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -32,7 +32,7 @@
/**
* \ingroup management
- * \brief represents a route in a RibEntry
+ * \brief Represents a route in a RibEntry.
*
* A route indicates the availability of content via a certain face and
* provides meta-information about the face.
@@ -144,7 +144,7 @@
/**
* \ingroup management
- * \brief represents an item in NFD RIB dataset
+ * \brief Represents an item in NFD RIB dataset.
*
* A RIB entry contains one or more routes for a name prefix
*
diff --git a/ndn-cxx/mgmt/nfd/route-flags-traits.hpp b/ndn-cxx/mgmt/nfd/route-flags-traits.hpp
index a23ab85..be7553e 100644
--- a/ndn-cxx/mgmt/nfd/route-flags-traits.hpp
+++ b/ndn-cxx/mgmt/nfd/route-flags-traits.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,7 +29,7 @@
/**
* \ingroup management
- * \brief defines getters for each route inheritance flag
+ * \brief Defines getters for each route inheritance flag.
*
* \tparam T class containing a RouteFlags field and implementing
* a `RouteFlags getFlags() const` member function
diff --git a/ndn-cxx/mgmt/nfd/status-dataset.cpp b/ndn-cxx/mgmt/nfd/status-dataset.cpp
index 005d1e5..54d638f 100644
--- a/ndn-cxx/mgmt/nfd/status-dataset.cpp
+++ b/ndn-cxx/mgmt/nfd/status-dataset.cpp
@@ -47,7 +47,7 @@
}
/**
- * \brief parses elements into a vector of T
+ * \brief Parses elements into a vector of T.
* \tparam T element type
* \param payload pointer to a buffer of zero or more blocks of decodable by T
* \return a vector of T
diff --git a/ndn-cxx/mgmt/nfd/status-dataset.hpp b/ndn-cxx/mgmt/nfd/status-dataset.hpp
index d06950a..24ac0a8 100644
--- a/ndn-cxx/mgmt/nfd/status-dataset.hpp
+++ b/ndn-cxx/mgmt/nfd/status-dataset.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -37,7 +37,7 @@
/**
* \ingroup management
- * \brief base class of NFD StatusDataset
+ * \brief Base class of NFD `%StatusDataset`.
* \sa https://redmine.named-data.net/projects/nfd/wiki/StatusDataset
*/
class StatusDataset : noncopyable
@@ -48,29 +48,29 @@
#ifdef DOXYGEN
/**
- * \brief if defined, specifies constructor argument type;
- * otherwise, constructor has no argument
+ * \brief If defined, specifies constructor argument type;
+ * otherwise, the constructor has no arguments.
*/
using ParamType = int;
#endif
/**
- * \brief constructs a name prefix for the dataset
+ * \brief Constructs a name prefix for the dataset.
* \param prefix top-level prefix, such as ndn:/localhost/nfd
- * \return name prefix without version and segment components
+ * \return %Name prefix without version and segment components.
*/
Name
getDatasetPrefix(const Name& prefix) const;
#ifdef DOXYGEN
/**
- * \brief provides the result type, usually a vector
+ * \brief Specifies the result type, usually a vector.
*/
using ResultType = std::vector<int>;
#endif
/**
- * \brief indicates reassembled payload cannot be parsed as ResultType
+ * \brief Indicates reassembled payload cannot be parsed as ResultType.
*/
class ParseResultError : public tlv::Error
{
@@ -80,7 +80,7 @@
#ifdef DOXYGEN
/**
- * \brief parses a result from reassembled payload
+ * \brief Parses a result from reassembled payload.
* \param payload reassembled payload
* \throw tlv::Error cannot parse payload
*/
@@ -90,7 +90,7 @@
protected:
/**
- * \brief constructs a StatusDataset instance with given sub-prefix
+ * \brief Constructs a StatusDataset instance with given sub-prefix.
* \param datasetName dataset name after top-level prefix, such as faces/list
*/
explicit
@@ -98,7 +98,7 @@
private:
/**
- * \brief appends parameters to the dataset name prefix
+ * \brief Appends parameters to the dataset name prefix.
* \param[in,out] the dataset name prefix onto which parameter components can be appended
*/
virtual void
@@ -110,7 +110,7 @@
/**
* \ingroup management
- * \brief represents a status/general dataset
+ * \brief Represents a `status/general` dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/ForwarderStatus#General-Status-Dataset
*/
class ForwarderGeneralStatusDataset : public StatusDataset
@@ -126,7 +126,7 @@
/**
* \ingroup management
- * \brief provides common functionality among FaceDataset and FaceQueryDataset
+ * \brief Provides common functionality among FaceDataset and FaceQueryDataset.
*/
class FaceDatasetBase : public StatusDataset
{
@@ -143,7 +143,7 @@
/**
* \ingroup management
- * \brief represents a faces/list dataset
+ * \brief Represents a `faces/list` dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Face-Dataset
*/
class FaceDataset : public FaceDatasetBase
@@ -154,7 +154,7 @@
/**
* \ingroup management
- * \brief represents a faces/query dataset
+ * \brief Represents a `faces/query` dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Query-Operation
*/
class FaceQueryDataset : public FaceDatasetBase
@@ -175,7 +175,7 @@
/**
* \ingroup management
- * \brief represents a faces/channels dataset
+ * \brief Represents a `faces/channels` dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Channel-Dataset
*/
class ChannelDataset : public StatusDataset
@@ -191,7 +191,7 @@
/**
* \ingroup management
- * \brief represents a fib/list dataset
+ * \brief Represents a `fib/list` dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/FibMgmt#FIB-Dataset
*/
class FibDataset : public StatusDataset
@@ -207,7 +207,7 @@
/**
* \ingroup management
- * \brief represents a cs/info dataset
+ * \brief Represents a `cs/info` dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#CS-Information-Dataset
*/
class CsInfoDataset : public StatusDataset
@@ -223,7 +223,7 @@
/**
* \ingroup management
- * \brief represents a strategy-choice/list dataset
+ * \brief Represents a `strategy-choice/list` dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/StrategyChoice#Strategy-Choice-Dataset
*/
class StrategyChoiceDataset : public StatusDataset
@@ -239,7 +239,7 @@
/**
* \ingroup management
- * \brief represents a rib/list dataset
+ * \brief Represents a `rib/list` dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/RibMgmt#RIB-Dataset
*/
class RibDataset : public StatusDataset
diff --git a/ndn-cxx/mgmt/nfd/strategy-choice.hpp b/ndn-cxx/mgmt/nfd/strategy-choice.hpp
index efb3132..59db5ba 100644
--- a/ndn-cxx/mgmt/nfd/strategy-choice.hpp
+++ b/ndn-cxx/mgmt/nfd/strategy-choice.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -30,7 +30,7 @@
/**
* \ingroup management
- * \brief represents an item in NFD StrategyChoice dataset
+ * \brief Represents an item in NFD StrategyChoice dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/StrategyChoice#Strategy-Choice-Dataset
*/
class StrategyChoice
diff --git a/ndn-cxx/name.hpp b/ndn-cxx/name.hpp
index 98a9d7d..36c579b 100644
--- a/ndn-cxx/name.hpp
+++ b/ndn-cxx/name.hpp
@@ -31,12 +31,14 @@
class Name;
-/** @brief Represents an arbitrary sequence of name components
+/**
+ * @brief Represents an arbitrary sequence of name components.
*/
using PartialName = Name;
-/** @brief Represents an absolute name
- * @sa https://named-data.net/doc/NDN-packet-spec/0.3/name.html
+/**
+ * @brief Represents an absolute name.
+ * @sa https://named-data.net/doc/NDN-packet-spec/0.3/name.html
*/
class Name
{
@@ -61,12 +63,12 @@
using size_type = component_container::size_type;
public: // constructors, encoding, decoding
- /** @brief Create an empty name
+ /** @brief Create an empty name.
* @post empty() == true
*/
Name();
- /** @brief Decode Name from wire encoding
+ /** @brief Decode Name from wire encoding.
* @throw tlv::Error wire encoding is invalid
*
* This is a more efficient equivalent for
@@ -78,25 +80,25 @@
explicit
Name(const Block& wire);
- /** @brief Parse name from NDN URI
+ /** @brief Parse name from NDN URI.
* @param uri a null-terminated URI string
* @sa https://named-data.net/doc/NDN-packet-spec/0.3/name.html#ndn-uri-scheme
*/
Name(const char* uri);
- /** @brief Create name from NDN URI
+ /** @brief Create name from NDN URI.
* @param uri a URI string
* @sa https://named-data.net/doc/NDN-packet-spec/0.3/name.html#ndn-uri-scheme
*/
Name(std::string uri);
- /** @brief Write URI representation of the name to the output stream
+ /** @brief Write URI representation of the name to the output stream.
* @sa https://named-data.net/doc/NDN-packet-spec/0.3/name.html#ndn-uri-scheme
*/
void
toUri(std::ostream& os, name::UriFormat format = name::UriFormat::DEFAULT) const;
- /** @brief Get URI representation of the name
+ /** @brief Get URI representation of the name.
* @return URI representation; the "ndn:" scheme identifier is not included
* @note To print URI representation into a stream, it is more efficient to use `os << name`.
* @sa https://named-data.net/doc/NDN-packet-spec/0.3/name.html#ndn-uri-scheme
@@ -104,7 +106,7 @@
std::string
toUri(name::UriFormat format = name::UriFormat::DEFAULT) const;
- /** @brief Check if this instance already has wire encoding
+ /** @brief Check if this instance already has wire encoding.
*/
bool
hasWire() const noexcept
@@ -112,26 +114,26 @@
return m_wire.hasWire();
}
- /** @brief Fast encoding or block size estimation
+ /** @brief Fast encoding or block size estimation.
*/
template<encoding::Tag TAG>
size_t
wireEncode(EncodingImpl<TAG>& encoder) const;
- /** @brief Perform wire encoding, or return existing wire encoding
+ /** @brief Perform wire encoding, or return existing wire encoding.
* @post hasWire() == true
*/
const Block&
wireEncode() const;
- /** @brief Decode name from wire encoding
+ /** @brief Decode name from wire encoding.
* @throw tlv::Error wire encoding is invalid
* @post hasWire() == true
*/
void
wireDecode(const Block& wire);
- /** @brief Make a deep copy of the name, reallocating the underlying memory buffer
+ /** @brief Make a deep copy of the name, reallocating the underlying memory buffer.
*/
Name
deepCopy() const;
@@ -215,7 +217,7 @@
}
public: // iterators
- /** @brief Begin iterator
+ /** @brief Begin iterator.
*/
const_iterator
begin() const
@@ -223,7 +225,7 @@
return reinterpret_cast<const_iterator>(m_wire.elements().data());
}
- /** @brief End iterator
+ /** @brief End iterator.
*/
const_iterator
end() const
@@ -231,7 +233,7 @@
return reinterpret_cast<const_iterator>(m_wire.elements().data() + m_wire.elements().size());
}
- /** @brief Reverse begin iterator
+ /** @brief Reverse begin iterator.
*/
const_reverse_iterator
rbegin() const
@@ -239,7 +241,7 @@
return const_reverse_iterator(end());
}
- /** @brief Reverse end iterator
+ /** @brief Reverse end iterator.
*/
const_reverse_iterator
rend() const
@@ -252,7 +254,7 @@
* @param i zero-based index of the component to replace;
* if negative, it is interpreted as offset from the end of the name
* @param component the new component to use as a replacement
- * @return a reference to this name, to allow chaining.
+ * @return A reference to this Name, to allow chaining.
* @warning No bounds checking is performed, using an out-of-range index is undefined behavior.
*/
Name&
@@ -262,14 +264,15 @@
* @param i zero-based index of the component to replace;
* if negative, it is interpreted as offset from the end of the name
* @param component the new component to use as a replacement
- * @return a reference to this name, to allow chaining.
+ * @return A reference to this Name, to allow chaining.
* @warning No bounds checking is performed, using an out-of-range index is undefined behavior.
*/
Name&
set(ssize_t i, Component&& component);
- /** @brief Append a component.
- * @return a reference to this name, to allow chaining.
+ /**
+ * @brief Append a name component.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
append(const Component& component)
@@ -278,8 +281,9 @@
return *this;
}
- /** @brief Append a component.
- * @return a reference to this name, to allow chaining.
+ /**
+ * @brief Append a name component.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
append(Component&& component)
@@ -289,8 +293,8 @@
}
/**
- * @brief Append a NameComponent of TLV-TYPE @p type, copying the TLV-VALUE from @p value.
- * @return a reference to this name, to allow chaining.
+ * @brief Append a `NameComponent` of TLV-TYPE @p type, copying the TLV-VALUE from @p value.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
append(uint32_t type, span<const uint8_t> value)
@@ -299,8 +303,8 @@
}
/**
- * @brief Append a GenericNameComponent, copying the TLV-VALUE from @p value.
- * @return a reference to this name, to allow chaining.
+ * @brief Append a `GenericNameComponent`, copying the TLV-VALUE from @p value.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
append(span<const uint8_t> value)
@@ -309,8 +313,8 @@
}
/**
- * @brief Append a NameComponent of TLV-TYPE @p type, copying @p count bytes at @p value as TLV-VALUE.
- * @return a reference to this name, to allow chaining.
+ * @brief Append a `NameComponent` of TLV-TYPE @p type, copying @p count bytes at @p value as TLV-VALUE.
+ * @return A reference to this Name, to allow chaining.
* @deprecated Use append(uint32_t, span<const uint8_t>)
*/
[[deprecated("use the overload that takes a span<>")]]
@@ -321,8 +325,8 @@
}
/**
- * @brief Append a GenericNameComponent, copying @p count bytes at @p value as TLV-VALUE.
- * @return a reference to this name, to allow chaining.
+ * @brief Append a `GenericNameComponent`, copying @p count bytes at @p value as TLV-VALUE.
+ * @return A reference to this Name, to allow chaining.
* @deprecated Use append(span<const uint8_t>)
*/
[[deprecated("use the overload that takes a span<>")]]
@@ -332,13 +336,13 @@
return append(make_span(value, count));
}
- /** @brief Append a NameComponent of TLV-TYPE @p type, copying TLV-VALUE from a range.
+ /** @brief Append a `NameComponent` of TLV-TYPE @p type, copying TLV-VALUE from a range.
* @tparam Iterator an @c InputIterator dereferencing to a one-octet value type. More efficient
* implementation is available when it is a @c RandomAccessIterator.
* @param type the TLV-TYPE.
* @param first beginning of the range.
* @param last past-end of the range.
- * @return a reference to this name, to allow chaining.
+ * @return A reference to this Name, to allow chaining.
*/
template<class Iterator>
Name&
@@ -347,12 +351,12 @@
return append(Component(type, first, last));
}
- /** @brief Append a GenericNameComponent, copying TLV-VALUE from a range.
+ /** @brief Append a `GenericNameComponent`, copying TLV-VALUE from a range.
* @tparam Iterator an @c InputIterator dereferencing to a one-octet value type. More efficient
* implementation is available when it is a @c RandomAccessIterator.
* @param first beginning of the range.
* @param last past-end of the range.
- * @return a reference to this name, to allow chaining.
+ * @return A reference to this Name, to allow chaining.
*/
template<class Iterator>
Name&
@@ -361,10 +365,10 @@
return append(Component(tlv::GenericNameComponent, first, last));
}
- /** @brief Append a GenericNameComponent, copying TLV-VALUE from a null-terminated string.
+ /** @brief Append a `GenericNameComponent`, copying TLV-VALUE from a null-terminated string.
* @param str a null-terminated string. Bytes from the string are copied as is, and not
* interpreted as URI component.
- * @return a reference to this name, to allow chaining.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
append(const char* str)
@@ -374,13 +378,13 @@
/** @brief Append a PartialName.
* @param name the components to append
- * @return a reference to this name, to allow chaining
+ * @return A reference to this Name, to allow chaining.
*/
Name&
append(const PartialName& name);
- /** @brief Append a component with a NonNegativeInteger
- * @return a reference to this name, to allow chaining
+ /** @brief Append a component with a NonNegativeInteger.
+ * @return A reference to this Name, to allow chaining.
* @sa https://named-data.net/doc/NDN-packet-spec/0.3/tlv.html#non-negative-integer-encoding
*/
Name&
@@ -389,13 +393,13 @@
return append(Component::fromNumber(number));
}
- /** @brief Append a component with a marked number
+ /** @brief Append a component with a marked number.
* @param marker 1-octet marker
* @param number the number
*
* The component is encoded as a 1-octet marker, followed by a NonNegativeInteger.
*
- * @return a reference to this name, to allow chaining
+ * @return A reference to this Name, to allow chaining.
* @sa NDN Naming Conventions revision 1 (obsolete)
* https://named-data.net/wp-content/uploads/2014/08/ndn-tr-22-ndn-memo-naming-conventions.pdf
*/
@@ -406,8 +410,8 @@
}
/**
- * @brief Append a segment number (sequential) component
- * @return a reference to this name, to allow chaining
+ * @brief Append a segment number (sequential) component.
+ * @return A reference to this Name, to allow chaining.
* @sa NDN Naming Conventions
* https://named-data.net/publications/techreports/ndn-tr-22-3-ndn-memo-naming-conventions/
*/
@@ -418,8 +422,8 @@
}
/**
- * @brief Append a byte offset component
- * @return a reference to this name, to allow chaining
+ * @brief Append a byte offset component.
+ * @return A reference to this Name, to allow chaining.
* @sa NDN Naming Conventions
* https://named-data.net/publications/techreports/ndn-tr-22-3-ndn-memo-naming-conventions/
*/
@@ -430,10 +434,10 @@
}
/**
- * @brief Append a version component
+ * @brief Append a version component.
* @param version the version number to append; if nullopt, the current UNIX time
* in milliseconds is used
- * @return a reference to this name, to allow chaining
+ * @return A reference to this Name, to allow chaining.
* @sa NDN Naming Conventions
* https://named-data.net/publications/techreports/ndn-tr-22-3-ndn-memo-naming-conventions/
*/
@@ -441,9 +445,9 @@
appendVersion(const optional<uint64_t>& version = nullopt);
/**
- * @brief Append a timestamp component
+ * @brief Append a timestamp component.
* @param timestamp the timestamp to append; if nullopt, the current system time is used
- * @return a reference to this name, to allow chaining
+ * @return A reference to this Name, to allow chaining.
* @sa NDN Naming Conventions
* https://named-data.net/publications/techreports/ndn-tr-22-3-ndn-memo-naming-conventions/
*/
@@ -451,8 +455,8 @@
appendTimestamp(const optional<time::system_clock::time_point>& timestamp = nullopt);
/**
- * @brief Append a sequence number component
- * @return a reference to this name, to allow chaining
+ * @brief Append a sequence number component.
+ * @return A reference to this Name, to allow chaining.
* @sa NDN Naming Conventions
* https://named-data.net/publications/techreports/ndn-tr-22-3-ndn-memo-naming-conventions/
*/
@@ -463,8 +467,8 @@
}
/**
- * @brief Append an ImplicitSha256Digest component.
- * @return a reference to this name, to allow chaining
+ * @brief Append an `ImplicitSha256Digest` component.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
appendImplicitSha256Digest(ConstBufferPtr digest)
@@ -473,8 +477,8 @@
}
/**
- * @brief Append an ImplicitSha256Digest component.
- * @return a reference to this name, to allow chaining
+ * @brief Append an `ImplicitSha256Digest` component.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
appendImplicitSha256Digest(span<const uint8_t> digestBytes)
@@ -483,8 +487,8 @@
}
/**
- * @brief Append a ParametersSha256Digest component.
- * @return a reference to this name, to allow chaining
+ * @brief Append a `ParametersSha256Digest` component.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
appendParametersSha256Digest(ConstBufferPtr digest)
@@ -493,8 +497,8 @@
}
/**
- * @brief Append a ParametersSha256Digest component.
- * @return a reference to this name, to allow chaining
+ * @brief Append a `ParametersSha256Digest` component.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
appendParametersSha256Digest(span<const uint8_t> digestBytes)
@@ -503,15 +507,15 @@
}
/**
- * @brief Append a placeholder for a ParametersSha256Digest component.
- * @return a reference to this name, to allow chaining
+ * @brief Append a placeholder for a `ParametersSha256Digest` component.
+ * @return A reference to this Name, to allow chaining.
*/
Name&
appendParametersSha256DigestPlaceholder();
/**
* @brief Append a keyword component.
- * @return a reference to this name, to allow chaining
+ * @return A reference to this Name, to allow chaining.
*/
Name&
appendKeyword(span<const uint8_t> keyword)
@@ -521,7 +525,7 @@
/**
* @brief Append a keyword component.
- * @return a reference to this name, to allow chaining
+ * @return A reference to this Name, to allow chaining.
*/
Name&
appendKeyword(const char* keyword)
@@ -531,8 +535,8 @@
}
/**
- * @brief Append a component.
- * @note This makes push_back an alias of append, giving Name a similar API as `std::vector`.
+ * @brief Append a name component.
+ * @note This makes push_back() an alias of append(), giving Name a similar API as `std::vector`.
*/
template<class T>
void
@@ -558,7 +562,7 @@
clear();
public: // algorithms
- /** @brief Get the successor of a name
+ /** @brief Get the successor of a name.
*
* The successor of a name is defined as follows:
*
@@ -585,7 +589,7 @@
Name
getSuccessor() const;
- /** @brief Check if this name is a prefix of another name
+ /** @brief Check if this name is a prefix of another name.
*
* This name is a prefix of @p other if the N components of this name are same as the first N
* components of @p other.
@@ -596,7 +600,7 @@
bool
isPrefixOf(const Name& other) const;
- /** @brief Check if this name equals another name
+ /** @brief Check if this name equals another name.
*
* Two names are equal if they have the same number of components, and components at each index
* are equal.
@@ -631,8 +635,8 @@
return this->compare(0, npos, other);
}
- /** @brief compares [pos1, pos1+count1) components in this Name
- * to [pos2, pos2+count2) components in @p other
+ /** @brief Compares `[pos1, pos1+count1)` components in this Name
+ * to `[pos2, pos2+count2)` components in @p other.
*
* Equivalent to `getSubName(pos1, count1).compare(other.getSubName(pos2, count2))`.
*/
diff --git a/ndn-cxx/net/ethernet.hpp b/ndn-cxx/net/ethernet.hpp
index 9d81cce..ad79187 100644
--- a/ndn-cxx/net/ethernet.hpp
+++ b/ndn-cxx/net/ethernet.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021 Regents of the University of California,
+ * Copyright (c) 2014-2022 Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -46,37 +46,37 @@
const size_t MAX_DATA_LEN = 1500; ///< Max octets in Ethernet payload
const size_t CRC_LEN = 4; ///< Octets in Ethernet frame check sequence
-
-/** \brief represents an Ethernet hardware address
+/**
+ * \brief Represents an Ethernet hardware address.
*/
class Address : public std::array<uint8_t, ADDR_LEN>
{
public:
- /// Constructs a null Ethernet address (00:00:00:00:00:00)
+ /// Constructs a null Ethernet address (`00:00:00:00:00:00`).
Address();
- /// Constructs a new Ethernet address with the given octets
+ /// Constructs a new Ethernet address with the given octets.
Address(uint8_t a1, uint8_t a2, uint8_t a3,
uint8_t a4, uint8_t a5, uint8_t a6);
- /// Constructs a new Ethernet address with the given octets
+ /// Constructs a new Ethernet address with the given octets.
explicit
Address(const uint8_t octets[ADDR_LEN]);
- /// True if this is a broadcast address (ff:ff:ff:ff:ff:ff)
+ /// True if this is a broadcast address (`ff:ff:ff:ff:ff:ff`).
bool
isBroadcast() const;
- /// True if this is a multicast address
+ /// True if this is a multicast address.
bool
isMulticast() const;
- /// True if this is a null address (00:00:00:00:00:00)
+ /// True if this is a null address (`00:00:00:00:00:00`).
bool
isNull() const;
/**
- * \brief Converts the address to a human-readable string
+ * \brief Converts the address to a human-readable string.
*
* \param sep A character used to visually separate the octets,
* usually ':' (the default value) or '-'
@@ -86,7 +86,7 @@
/**
* \brief Creates an Address from a string containing an Ethernet address
- * in hexadecimal notation, with colons or hyphens as separators
+ * in hexadecimal notation, with colons or hyphens as separators.
*
* \param str The string to be parsed
* \return Always an instance of Address, which will be null
@@ -96,11 +96,15 @@
fromString(const std::string& str);
};
-/// Returns the Ethernet broadcast address (ff:ff:ff:ff:ff:ff)
+/**
+ * @brief Returns the Ethernet broadcast address (`ff:ff:ff:ff:ff:ff`).
+ */
Address
getBroadcastAddress();
-/// Returns the default Ethernet multicast address for NDN
+/**
+ * @brief Returns the default Ethernet multicast address for NDN.
+ */
Address
getDefaultMulticastAddress();
diff --git a/ndn-cxx/net/face-uri.cpp b/ndn-cxx/net/face-uri.cpp
index 00e1060..cb4e279 100644
--- a/ndn-cxx/net/face-uri.cpp
+++ b/ndn-cxx/net/face-uri.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California,
+ * Copyright (c) 2013-2022 Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -211,7 +211,7 @@
}
-/** \brief a CanonizeProvider provides FaceUri canonization functionality for a group of schemes
+/** \brief A CanonizeProvider provides FaceUri canonization functionality for a group of schemes.
*/
class CanonizeProvider : noncopyable
{
@@ -389,7 +389,7 @@
onFailure(reason);
}
- /** \brief when overriden in a subclass, check the IP address is allowable
+ /** \brief When overriden in a subclass, check the IP address is allowable.
* \return (true,ignored) if the address is allowable;
* (false,reason) if the address is not allowable.
*/
diff --git a/ndn-cxx/net/face-uri.hpp b/ndn-cxx/net/face-uri.hpp
index 8194dad..87555f4 100644
--- a/ndn-cxx/net/face-uri.hpp
+++ b/ndn-cxx/net/face-uri.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California,
+ * Copyright (c) 2013-2022 Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -38,8 +38,9 @@
namespace ndn {
-/** \brief represents the underlying protocol and address used by a Face
- * \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#FaceUri
+/**
+ * \brief The underlying protocol and address used by a Face.
+ * \sa https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#FaceUri
*/
class FaceUri
{
@@ -52,10 +53,10 @@
FaceUri();
- /** \brief construct by parsing
- *
- * \param uri scheme://host[:port]/path
- * \throw FaceUri::Error if URI cannot be parsed
+ /**
+ * \brief Construct by parsing.
+ * \param uri scheme://host[:port]/path
+ * \throw FaceUri::Error if URI cannot be parsed
*/
explicit
FaceUri(const std::string& uri);
@@ -65,84 +66,85 @@
explicit
FaceUri(const char* uri);
- /// exception-safe parsing
+ /// Exception-safe parsing.
NDN_CXX_NODISCARD bool
parse(const std::string& uri);
public: // scheme-specific construction
- /// construct udp4 or udp6 canonical FaceUri
+ /// Construct a udp4 or udp6 canonical FaceUri.
explicit
FaceUri(const boost::asio::ip::udp::endpoint& endpoint);
- /// construct tcp4 or tcp6 canonical FaceUri
+ /// Construct a tcp4 or tcp6 canonical FaceUri.
explicit
FaceUri(const boost::asio::ip::tcp::endpoint& endpoint);
- /// construct tcp canonical FaceUri with custom scheme
+ /// Construct a tcp canonical FaceUri with custom scheme.
FaceUri(const boost::asio::ip::tcp::endpoint& endpoint, const std::string& scheme);
#ifdef BOOST_ASIO_HAS_LOCAL_SOCKETS
- /// construct unix canonical FaceUri
+ /// Construct a unix canonical FaceUri.
explicit
FaceUri(const boost::asio::local::stream_protocol::endpoint& endpoint);
#endif // BOOST_ASIO_HAS_LOCAL_SOCKETS
- /// create fd FaceUri from file descriptor
+ /// Construct an fd FaceUri from a file descriptor.
static FaceUri
fromFd(int fd);
- /// construct ether canonical FaceUri
+ /// Construct an ether canonical FaceUri.
explicit
FaceUri(const ethernet::Address& address);
- /// create dev FaceUri from network device name
+ /// Construct a dev FaceUri from a network device name.
static FaceUri
fromDev(const std::string& ifname);
- /// create udp4 or udp6 NIC-associated FaceUri from endpoint and network device name
+ /// Construct a udp4 or udp6 NIC-associated FaceUri from endpoint and network device name.
static FaceUri
fromUdpDev(const boost::asio::ip::udp::endpoint& endpoint, const std::string& ifname);
public: // getters
- /// get scheme (protocol)
+ /// Get scheme (protocol)
const std::string&
getScheme() const
{
return m_scheme;
}
- /// get host (domain)
+ /// Get host (domain)
const std::string&
getHost() const
{
return m_host;
}
- /// get port
+ /// Get port
const std::string&
getPort() const
{
return m_port;
}
- /// get path
+ /// Get path
const std::string&
getPath() const
{
return m_path;
}
- /// write as a string
+ /// Serialize as a string
std::string
toString() const;
public: // canonical FaceUri
- /** \return whether a FaceUri of the scheme can be canonized
+ /**
+ * \brief Return whether a FaceUri of the specified scheme can be canonized.
*/
static bool
canCanonize(const std::string& scheme);
- /** \brief determine whether this FaceUri is in canonical form
+ /** \brief Determine whether this FaceUri is in canonical form.
* \return true if this FaceUri is in canonical form,
* false if this FaceUri is not in canonical form or
* or it's undetermined whether this FaceUri is in canonical form
@@ -153,7 +155,7 @@
typedef function<void(const FaceUri&)> CanonizeSuccessCallback;
typedef function<void(const std::string& reason)> CanonizeFailureCallback;
- /** \brief asynchronously convert this FaceUri to canonical form
+ /** \brief Asynchronously convert this FaceUri to canonical form.
* \param onSuccess function to call after this FaceUri is converted to canonical form
* \note A new FaceUri in canonical form will be created; this FaceUri is unchanged.
* \param onFailure function to call if this FaceUri cannot be converted to canonical form
diff --git a/ndn-cxx/net/impl/network-monitor-impl-netlink.hpp b/ndn-cxx/net/impl/network-monitor-impl-netlink.hpp
index 87dcf35..a7c7193 100644
--- a/ndn-cxx/net/impl/network-monitor-impl-netlink.hpp
+++ b/ndn-cxx/net/impl/network-monitor-impl-netlink.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -41,7 +41,7 @@
class NetworkMonitorImplNetlink : public NetworkMonitorImpl
{
public:
- /** \brief initialize netlink socket and start enumerating interfaces
+ /** \brief Initialize netlink socket and start enumerating interfaces.
*/
explicit
NetworkMonitorImplNetlink(boost::asio::io_service& io);
diff --git a/ndn-cxx/net/network-monitor-stub.hpp b/ndn-cxx/net/network-monitor-stub.hpp
index fcfe536..054a85a 100644
--- a/ndn-cxx/net/network-monitor-stub.hpp
+++ b/ndn-cxx/net/network-monitor-stub.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,23 +29,24 @@
class NetworkMonitorImplStub;
-/** \brief a stub NetworkMonitor for unit testing
+/**
+ * \brief A dummy NetworkMonitor for unit testing.
*/
class NetworkMonitorStub : public NetworkMonitor
{
public:
- /** \brief constructor
+ /** \brief Constructor.
* \param capabilities capabilities reported by \p getCapabilities
*/
explicit
NetworkMonitorStub(uint32_t capabilities);
- /** \brief create a NetworkInterface instance
+ /** \brief Create a NetworkInterface instance.
*/
static shared_ptr<NetworkInterface>
makeNetworkInterface();
- /** \brief emit the \p onInterfaceAdded signal and add \p netif internally
+ /** \brief Emit the \p onInterfaceAdded signal and add \p netif internally.
* \param netif new network interface
* \post getNetworkInterface(netif->getName()) == netif
* \post listNetworkInterface() contains netif
@@ -54,7 +55,7 @@
void
addInterface(shared_ptr<NetworkInterface> netif);
- /** \brief emit the \p onInterfaceRemoved signal and remove \p netif internally
+ /** \brief Emit the \p onInterfaceRemoved signal and remove \p netif internally.
* \param ifname network interface name
* \post getNetworkInterface(ifname) == nullptr
* \post listNetworkInterface() does not contains an interface with specified name
@@ -63,7 +64,7 @@
void
removeInterface(const std::string& ifname);
- /** \brief emit the \p onEnumerationCompleted signal
+ /** \brief Emit the \p onEnumerationCompleted signal.
*
* A real NetworkMonitor starts with an "enumerating" state, during which the initial
* information about network interfaces is collected from the OS. Upon discovering a network
diff --git a/ndn-cxx/security/certificate-request.hpp b/ndn-cxx/security/certificate-request.hpp
index d856a72..bb270dd 100644
--- a/ndn-cxx/security/certificate-request.hpp
+++ b/ndn-cxx/security/certificate-request.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,7 +29,7 @@
inline namespace v2 {
/**
- * @brief Request for a certificate, associated with the number of attempts
+ * @brief Request for a certificate, associated with the number of attempts.
*/
class CertificateRequest : noncopyable
{
@@ -50,11 +50,11 @@
}
public:
- /// @brief the name for the requested data/certificate.
+ /// The name for the requested certificate.
Interest interest;
- /// @brief the number of remaining retries after timeout or NACK.
+ /// The number of remaining retries after a timeout or Nack.
int nRetriesLeft = 0;
- /// @brief the amount of time to wait before sending the next interest after a NACK.
+ /// The amount of time to wait before sending the next Interest after a Nack.
time::milliseconds waitAfterNack = 500_ms;
};
diff --git a/ndn-cxx/security/certificate-storage.hpp b/ndn-cxx/security/certificate-storage.hpp
index e3ce5cd..0f5a126 100644
--- a/ndn-cxx/security/certificate-storage.hpp
+++ b/ndn-cxx/security/certificate-storage.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -39,24 +39,23 @@
CertificateStorage();
/**
- * @brief Find a trusted certificate in trust anchor container or in verified cache
+ * @brief Find a trusted certificate in trust anchor container or in verified cache.
* @param interestForCert Interest for certificate
- * @return found certificate, nullptr if not found.
+ * @return Found certificate, nullptr if not found.
*
- * @note The returned pointer may get invalidated after next findTrustedCert or findCert calls.
+ * @note The returned pointer may get invalidated after next findTrustedCert() or findCert() calls.
*/
const Certificate*
findTrustedCert(const Interest& interestForCert) const;
/**
- * @brief Check if certificate exists in verified, unverified cache, or in the set of trust
- * anchors
+ * @brief Check if certificate exists in the verified/unverified cache or in the set of trust anchors.
*/
bool
isCertKnown(const Name& certPrefix) const;
/**
- * @brief Cache unverified certificate for a period of time (5 minutes)
+ * @brief Cache unverified certificate for a period of time (5 minutes).
* @param cert The certificate packet
*
* @todo Add ability to customize time period
@@ -84,7 +83,7 @@
protected:
/**
- * @brief load static trust anchor.
+ * @brief Load static trust anchor.
*
* Static trust anchors are permanently associated with the validator and never expire.
*
@@ -95,7 +94,7 @@
loadAnchor(const std::string& groupId, Certificate&& cert);
/**
- * @brief load dynamic trust anchors.
+ * @brief Load dynamic trust anchors.
*
* Dynamic trust anchors are associated with the validator for as long as the underlying
* trust anchor file (set of files) exist(s).
@@ -110,13 +109,13 @@
time::nanoseconds refreshPeriod, bool isDir = false);
/**
- * @brief remove any previously loaded static or dynamic trust anchor
+ * @brief Remove any previously loaded static or dynamic trust anchor.
*/
void
resetAnchors();
/**
- * @brief Cache verified certificate a period of time (1 hour)
+ * @brief Cache verified certificate a period of time (1 hour).
* @param cert The certificate packet
*
* @todo Add ability to customize time period
@@ -125,7 +124,7 @@
cacheVerifiedCert(Certificate&& cert);
/**
- * @brief Remove any cached verified certificates
+ * @brief Remove any cached verified certificates.
*/
void
resetVerifiedCerts();
diff --git a/ndn-cxx/security/key-params.hpp b/ndn-cxx/security/key-params.hpp
index 0c657d6..fc28f10 100644
--- a/ndn-cxx/security/key-params.hpp
+++ b/ndn-cxx/security/key-params.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -70,7 +70,7 @@
protected:
/**
- * @brief Constructor
+ * @brief Constructor.
*
* @param keyType Type of the created key
* @param keyIdType The method how the key id should be generated; must not be
@@ -79,7 +79,7 @@
KeyParams(KeyType keyType, KeyIdType keyIdType);
/**
- * @brief Constructor
+ * @brief Constructor.
*
* @param keyType Type of the created key
* @param keyId The user-specified key id. The keyIdType will be set to KeyIdType::USER_SPECIFIED.
@@ -108,7 +108,7 @@
}
/**
- * @brief check if @p size is valid and supported for this key type.
+ * @brief Check if @p size is valid and supported for this key type.
*
* @throw KeyParams::Error if the key size is not supported.
*/
@@ -130,7 +130,7 @@
}
/**
- * @brief check if @p size is valid and supported for this key type.
+ * @brief Check if @p size is valid and supported for this key type.
*
* @throw KeyParams::Error if the key size is not supported.
*/
@@ -215,7 +215,7 @@
}
/**
- * @brief check if @p size is valid and supported for this key type.
+ * @brief Check if @p size is valid and supported for this key type.
*
* @throw KeyParams::Error if the key size is not supported.
*/
@@ -237,7 +237,7 @@
}
/**
- * @brief check if @p size is valid and supported for this key type.
+ * @brief Check if @p size is valid and supported for this key type.
*
* @throw KeyParams::Error if the key size is not supported.
*/
diff --git a/ndn-cxx/security/pib/pib.hpp b/ndn-cxx/security/pib/pib.hpp
index e6a26bf..4ae4c8d 100644
--- a/ndn-cxx/security/pib/pib.hpp
+++ b/ndn-cxx/security/pib/pib.hpp
@@ -123,7 +123,7 @@
*
* If no default identity is currently set, the new identity will become the default identity.
*
- * @return handle of the added identity.
+ * @return Handle of the added identity.
*/
Identity
addIdentity(const Name& identity);
@@ -141,7 +141,7 @@
*
* The identity will be created if it does not exist.
*
- * @return handle of the default identity
+ * @return Handle of the default identity.
*/
Identity
setDefaultIdentity(const Name& identity);
diff --git a/ndn-cxx/security/security-common.hpp b/ndn-cxx/security/security-common.hpp
index dfbe6cf..b193746 100644
--- a/ndn-cxx/security/security-common.hpp
+++ b/ndn-cxx/security/security-common.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -34,7 +34,7 @@
const ssize_t POS_SIG_VALUE = -1;
const ssize_t POS_SIG_INFO = -2;
-/** \brief minimal number of components for Signed Interest
+/** \brief Minimum number of name components for an old-style Signed %Interest.
* \sa https://redmine.named-data.net/projects/ndn-cxx/wiki/SignedInterest
*/
const size_t MIN_SIZE = 2;
@@ -48,7 +48,7 @@
const ssize_t POS_RANDOM_VAL = -3;
const ssize_t POS_TIMESTAMP = -4;
-/** \brief minimal number of components for Command Interest
+/** \brief Minimum number of name components for a Command %Interest.
* \sa https://redmine.named-data.net/projects/ndn-cxx/wiki/CommandInterest
*/
const size_t MIN_SIZE = 4;
diff --git a/ndn-cxx/security/signing-helpers.hpp b/ndn-cxx/security/signing-helpers.hpp
index 55d8ad5..3ebadfb 100644
--- a/ndn-cxx/security/signing-helpers.hpp
+++ b/ndn-cxx/security/signing-helpers.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -22,50 +22,49 @@
#ifndef NDN_CXX_SECURITY_SIGNING_HELPERS_HPP
#define NDN_CXX_SECURITY_SIGNING_HELPERS_HPP
-#include "ndn-cxx/detail/common.hpp"
#include "ndn-cxx/security/signing-info.hpp"
namespace ndn {
namespace security {
/**
- * \return a SigningInfo for signing with an identity
+ * \brief Return a SigningInfo for signing with an identity.
*/
SigningInfo
signingByIdentity(const Name& identityName);
/**
- * \return a SigningInfo for signing with an identity
+ * \brief Return a SigningInfo for signing with an identity.
*/
SigningInfo
signingByIdentity(const Identity& identity);
/**
- * \return a SigningInfo for signing with a key
+ * \brief Return a SigningInfo for signing with a key.
*/
SigningInfo
signingByKey(const Name& keyName);
/**
- * \return a SigningInfo for signing with a key
+ * \brief Return a SigningInfo for signing with a key.
*/
SigningInfo
signingByKey(const Key& key);
/**
- * \return a SigningInfo for signing with a certificate
+ * \brief Return a SigningInfo for signing with a certificate.
*/
SigningInfo
signingByCertificate(const Name& certName);
/**
- * \return a SigningInfo for signing with a certificate
+ * \brief Return a SigningInfo for signing with a certificate.
*/
SigningInfo
signingByCertificate(const Certificate& cert);
/**
- * \return a SigningInfo for signing with Sha256
+ * \brief Return a SigningInfo for signing with a SHA-256 digest.
*/
SigningInfo
signingWithSha256();
diff --git a/ndn-cxx/security/signing-info.hpp b/ndn-cxx/security/signing-info.hpp
index 12bc713..7a87a3f 100644
--- a/ndn-cxx/security/signing-info.hpp
+++ b/ndn-cxx/security/signing-info.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -152,21 +152,21 @@
setSha256Signing();
/**
- * @brief Set signer as a PIB identity handler @p identity
+ * @brief Set signer as a PIB identity handle @p identity
* @post Change the signerType to SIGNER_TYPE_ID
*/
SigningInfo&
setPibIdentity(const Identity& identity);
/**
- * @brief Set signer as a PIB key handler @p key
+ * @brief Set signer as a PIB key handle @p key
* @post Change the signerType to SIGNER_TYPE_KEY
*/
SigningInfo&
setPibKey(const Key& key);
/**
- * @return Type of the signer
+ * @brief Return the signer type.
*/
SignerType
getSignerType() const
@@ -175,7 +175,7 @@
}
/**
- * @return Name of signer; interpretation differs per signerType
+ * @return Name of signer; interpretation differs per signerType.
*/
const Name&
getSignerName() const
@@ -185,8 +185,8 @@
/**
* @pre signerType must be SIGNER_TYPE_ID
- * @return the identity handler of signer, or Identity() if getSignerName() should be used
- * to find the identity
+ * @return The identity handle of signer, or Identity() if getSignerName() should be used
+ * to find the identity.
*/
const Identity&
getPibIdentity() const
@@ -197,7 +197,7 @@
/**
* @pre signerType must be SIGNER_TYPE_KEY
- * @return the key handler of signer, or Key() if getSignerName() should be used to find the key
+ * @return The key handle of signer, or Key() if getSignerName() should be used to find the key.
*/
const Key&
getPibKey() const
@@ -214,7 +214,7 @@
}
/**
- * @brief Set the digest algorithm for signing operations
+ * @brief Set the digest algorithm for signing operations.
*/
SigningInfo&
setDigestAlgorithm(const DigestAlgorithm& algorithm)
@@ -224,7 +224,7 @@
}
/**
- * @return The digest algorithm for signing operations
+ * @brief Get the digest algorithm for signing operations.
*/
DigestAlgorithm
getDigestAlgorithm() const
@@ -233,13 +233,13 @@
}
/**
- * @brief Set a semi-prepared SignatureInfo
+ * @brief Set a semi-prepared SignatureInfo.
*/
SigningInfo&
setSignatureInfo(const SignatureInfo& signatureInfo);
/**
- * @return Semi-prepared SignatureInfo
+ * @brief Get a semi-prepared SignatureInfo.
*/
const SignatureInfo&
getSignatureInfo() const
@@ -248,7 +248,7 @@
}
/**
- * @brief Set signed Interest format
+ * @brief Set the signed %Interest format.
* @note This is a transitional API to handle the change in signed Interest format and will
* disappear after a few releases.
*/
@@ -260,9 +260,9 @@
}
/**
- * @return Signed Interest format
- * @note This is a transitional API to handle the change in signed Interest format and will
- * disappear after a few releases.
+ * @brief Get the signed %Interest format.
+ * @note This is a transitional API to handle the change in signed Interest format and will
+ * disappear after a few releases.
*/
SignedInterestFormat
getSignedInterestFormat() const
diff --git a/ndn-cxx/security/transform/step-source.hpp b/ndn-cxx/security/transform/step-source.hpp
index 10fe86a..2c08260 100644
--- a/ndn-cxx/security/transform/step-source.hpp
+++ b/ndn-cxx/security/transform/step-source.hpp
@@ -51,7 +51,7 @@
* One can keep calling this method to until end() is called, which
* indicates the end of input. After that, calling this method will cause Error.
*
- * @return number of bytes that has been written into next module
+ * @return Number of bytes that have been written into the next module.
*/
size_t
write(span<const uint8_t> buf);
diff --git a/ndn-cxx/security/transform/stream-sink.hpp b/ndn-cxx/security/transform/stream-sink.hpp
index 53e5408..d2e6e32 100644
--- a/ndn-cxx/security/transform/stream-sink.hpp
+++ b/ndn-cxx/security/transform/stream-sink.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -35,23 +35,20 @@
{
public:
/**
- * @brief Create a stream sink which outputs to @p os
+ * @brief Create a stream sink which outputs to @p os.
*/
explicit
StreamSink(std::ostream& os);
private:
/**
- * @brief Write data into the stream
+ * @brief Write data into the stream.
*
- * @return number of bytes that have been written into the stream
+ * @return Number of bytes that have been written into the stream.
*/
size_t
doWrite(span<const uint8_t> buf) final;
- /**
- * @brief Finalize sink processing
- */
void
doEnd() final;
diff --git a/ndn-cxx/security/transform/strip-space.hpp b/ndn-cxx/security/transform/strip-space.hpp
index b4867c6..f01e936 100644
--- a/ndn-cxx/security/transform/strip-space.hpp
+++ b/ndn-cxx/security/transform/strip-space.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -54,7 +54,7 @@
std::bitset<CHARMAP_SIZE> m_isWhitespace; // char => whether char is whitespace
};
-/** \brief constructs a StripSpace transform
+/** \brief Constructs a StripSpace transform.
* \param whitespaces characters classified as whitespaces, terminated with null
*/
unique_ptr<Transform>
diff --git a/ndn-cxx/security/transform/transform-base.hpp b/ndn-cxx/security/transform/transform-base.hpp
index f1f9806..faf96be 100644
--- a/ndn-cxx/security/transform/transform-base.hpp
+++ b/ndn-cxx/security/transform/transform-base.hpp
@@ -85,7 +85,7 @@
* If a Downstream implementation expects structured input (e.g., hex decoding requires byte-pair),
* it should not return less than size if final portion of input is not a complete record.
*
- * @return number of bytes that has been written into this module
+ * @return Number of bytes that have been written into this module.
* @throws Error if this module is closed or transformation error happens.
*/
size_t
diff --git a/ndn-cxx/security/trust-anchor-container.hpp b/ndn-cxx/security/trust-anchor-container.hpp
index 6db7d2e..18afa36 100644
--- a/ndn-cxx/security/trust-anchor-container.hpp
+++ b/ndn-cxx/security/trust-anchor-container.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -36,7 +36,7 @@
inline namespace v2 {
/**
- * @brief represents a container for trust anchors.
+ * @brief A container for trust anchors.
*
* There are two kinds of anchors:
* - static anchors that are permanent for the lifetime of the container
@@ -92,13 +92,13 @@
time::nanoseconds refreshPeriod, bool isDir = false);
/**
- * @brief Remove all static or dynamic anchors
+ * @brief Remove all static or dynamic anchors.
*/
void
clear();
/**
- * @brief Search for certificate across all groups (longest prefix match)
+ * @brief Search for certificate across all groups (longest prefix match).
* @param keyName Key name prefix for searching the certificate.
* @return The found certificate, nullptr if not found.
*
@@ -108,26 +108,25 @@
find(const Name& keyName) const;
/**
- * @brief Find certificate given interest
+ * @brief Find certificate given interest.
* @param interest The input interest packet.
* @return The found certificate, nullptr if not found.
*
* @note The returned value may be invalidated after next call to one of `find` methods.
- *
* @note Interest with implicit digest is not supported.
*/
const Certificate*
find(const Interest& interest) const;
/**
- * @brief Get trusted anchor group
+ * @brief Get trusted anchor group.
* @throw Error @p groupId does not exist
*/
TrustAnchorGroup&
getGroup(const std::string& groupId) const;
/**
- * @brief Get number of trust anchors across all groups
+ * @brief Get number of trust anchors across all groups.
*/
size_t
size() const;
diff --git a/ndn-cxx/security/validation-policy-command-interest.hpp b/ndn-cxx/security/validation-policy-command-interest.hpp
index 34a0e9a..68a7719 100644
--- a/ndn-cxx/security/validation-policy-command-interest.hpp
+++ b/ndn-cxx/security/validation-policy-command-interest.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -50,7 +50,7 @@
}
public:
- /** \brief tolerance of initial timestamp
+ /** \brief Tolerance of initial timestamp.
*
* A stop-and-wait command Interest is considered "initial" if the validator
* has not recorded the last timestamp from the same public key, or when
@@ -65,7 +65,7 @@
*/
time::nanoseconds gracePeriod = 2_min;
- /** \brief max number of distinct public keys of which to record the last timestamp
+ /** \brief Max number of distinct public keys of which to record the last timestamp.
*
* The validator records last timestamps for every public key.
* For a subsequent command Interest using the same public key,
@@ -82,7 +82,7 @@
*/
ssize_t maxRecords = 1000;
- /** \brief max lifetime of a last timestamp record
+ /** \brief Max lifetime of a last timestamp record.
*
* A last timestamp record expires and can be deleted if it has not been refreshed
* within this duration.
@@ -92,7 +92,7 @@
time::nanoseconds recordLifetime = 1_h;
};
- /** \brief constructor
+ /** \brief Constructor.
* \param inner a Validator for signed Interest signature validation and Data validation;
* this must not be nullptr
* \param options stop-and-wait command Interest validation options
diff --git a/ndn-cxx/security/validation-state.hpp b/ndn-cxx/security/validation-state.hpp
index aed0264..15ea8f1 100644
--- a/ndn-cxx/security/validation-state.hpp
+++ b/ndn-cxx/security/validation-state.hpp
@@ -143,7 +143,7 @@
std::unordered_set<Name> m_seenCertificateNames;
/**
- * @brief the certificate chain
+ * @brief The certificate chain.
*
* Each certificate in the chain signs the next certificate. The last certificate signs the
* original packet.
diff --git a/ndn-cxx/security/validator-config/checker.hpp b/ndn-cxx/security/validator-config/checker.hpp
index 3086ee7..fa5c021 100644
--- a/ndn-cxx/security/validator-config/checker.hpp
+++ b/ndn-cxx/security/validator-config/checker.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -78,7 +78,7 @@
~Checker() = default;
/**
- * @brief Check if packet name and KeyLocator satisfy the checker's conditions
+ * @brief Check if packet name and KeyLocator satisfy the checker's conditions.
*
* @param pktType tlv::Interest or tlv::Data
* @param sigType Signature type
@@ -91,7 +91,7 @@
const Name& pktName, const Name& klName, const ValidationState& state);
/**
- * @brief create a checker from configuration section
+ * @brief Create a checker from configuration section.
*
* @param configSection The section containing the definition of checker.
* @param configFilename The configuration file name.
@@ -102,7 +102,7 @@
protected:
/**
- * @brief Base version of name checking
+ * @brief Base version of name checking.
* @return always returns accept()
*/
virtual Result
diff --git a/ndn-cxx/security/validator-config/name-relation.hpp b/ndn-cxx/security/validator-config/name-relation.hpp
index 3f6c6a0..8559770 100644
--- a/ndn-cxx/security/validator-config/name-relation.hpp
+++ b/ndn-cxx/security/validator-config/name-relation.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -40,13 +40,13 @@
operator<<(std::ostream& os, NameRelation relation);
/**
- * @brief check whether @p name1 and @p name2 satisfies @p relation
+ * @brief Check whether @p name1 and @p name2 satisfies @p relation.
*/
bool
checkNameRelation(NameRelation relation, const Name& name1, const Name& name2);
/**
- * @brief convert @p relationString to NameRelation
+ * @brief Convert @p relationString to NameRelation.
* @throw Error if @p relationString cannot be converted
*/
NameRelation
diff --git a/ndn-cxx/security/validator-config/rule.hpp b/ndn-cxx/security/validator-config/rule.hpp
index 4d51fe8..e2d3daf 100644
--- a/ndn-cxx/security/validator-config/rule.hpp
+++ b/ndn-cxx/security/validator-config/rule.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -57,7 +57,7 @@
addChecker(unique_ptr<Checker> checker);
/**
- * @brief check if the packet name matches rule's filter
+ * @brief Check if the packet name matches rule's filter.
*
* If no filters were added, the rule matches everything.
*
@@ -93,7 +93,7 @@
public:
/**
- * @brief create a rule from configuration section
+ * @brief Create a rule from configuration section.
*
* @param configSection The section containing the definition of checker.
* @param configFilename The configuration file name.
diff --git a/ndn-cxx/security/validator.hpp b/ndn-cxx/security/validator.hpp
index 1e453ec..3fc011e 100644
--- a/ndn-cxx/security/validator.hpp
+++ b/ndn-cxx/security/validator.hpp
@@ -102,7 +102,7 @@
}
/**
- * @brief Asynchronously validate @p data
+ * @brief Asynchronously validate @p data.
*
* @note @p successCb and @p failureCb must not be nullptr
*/
@@ -112,7 +112,7 @@
const DataValidationFailureCallback& failureCb);
/**
- * @brief Asynchronously validate @p interest
+ * @brief Asynchronously validate @p interest.
*
* @note @p successCb and @p failureCb must not be nullptr
*/
@@ -123,7 +123,7 @@
public: // anchor management
/**
- * @brief load static trust anchor.
+ * @brief Load static trust anchor.
*
* Static trust anchors are permanently associated with the validator and never expire.
*
@@ -134,7 +134,7 @@
loadAnchor(const std::string& groupId, Certificate&& cert);
/**
- * @brief load dynamic trust anchors.
+ * @brief Load dynamic trust anchors.
*
* Dynamic trust anchors are associated with the validator for as long as the underlying
* trust anchor file (set of files) exist(s).
@@ -149,13 +149,13 @@
time::nanoseconds refreshPeriod, bool isDir = false);
/**
- * @brief remove any previously loaded static or dynamic trust anchor
+ * @brief Remove any previously loaded static or dynamic trust anchor.
*/
void
resetAnchors();
/**
- * @brief Cache verified @p cert a period of time (1 hour)
+ * @brief Cache verified @p cert a period of time (1 hour).
*
* @todo Add ability to customize time period
*/
@@ -163,14 +163,14 @@
cacheVerifiedCertificate(Certificate&& cert);
/**
- * @brief Remove any cached verified certificates
+ * @brief Remove any cached verified certificates.
*/
void
resetVerifiedCertificates();
private: // Common validator operations
/**
- * @brief Recursive validation of the certificate in the certification chain
+ * @brief Recursive validation of the certificate in the certification chain.
*
* @param cert The certificate to check.
* @param state The current validation state.
diff --git a/ndn-cxx/signature-info.hpp b/ndn-cxx/signature-info.hpp
index 87f5531..afb3ff5 100644
--- a/ndn-cxx/signature-info.hpp
+++ b/ndn-cxx/signature-info.hpp
@@ -27,7 +27,8 @@
namespace ndn {
-/** @brief Represents a SignatureInfo or InterestSignatureInfo TLV element
+/**
+ * @brief Represents a `%SignatureInfo` or `%InterestSignatureInfo` TLV element.
*/
class SignatureInfo
{
@@ -71,7 +72,7 @@
* @param encoder EncodingEstimator or EncodingBuffer instance
* @param type Which type of SignatureInfo block to encode
*
- * Elements are encoded in the following order: SignatureType, KeyLocator (if present), and
+ * Elements are encoded in the following order: `SignatureType`, `%KeyLocator` (if present), and
* other elements in the order they were set (changing the value of an already present element
* will not change that element's encoding order).
*/
@@ -82,7 +83,7 @@
/** @brief Encode to wire format
* @param type Which type of SignatureInfo block to encode
*
- * Elements are encoded in the following order: SignatureType, KeyLocator (if present), and
+ * Elements are encoded in the following order: `SignatureType`, `%KeyLocator` (if present), and
* other elements in the order they were set (changing the value of an already present element
* will not change that element's encoding order).
*/
@@ -106,8 +107,8 @@
}
public: // field access
- /** @brief Get SignatureType
- * @return tlv::SignatureTypeValue, or -1 to indicate an invalid SignatureInfo
+ /** @brief Get the `SignatureType`.
+ * @return tlv::SignatureTypeValue, or -1 to indicate an invalid SignatureInfo.
*/
int32_t
getSignatureType() const noexcept
@@ -115,13 +116,13 @@
return m_type;
}
- /** @brief Set SignatureType
- * @return A reference to this SignatureInfo, to allow chaining
+ /** @brief Set the `SignatureType`.
+ * @return A reference to this SignatureInfo, to allow chaining.
*/
SignatureInfo&
setSignatureType(tlv::SignatureTypeValue type);
- /** @brief Check if KeyLocator is present
+ /** @brief Check if `%KeyLocator` is present.
*/
bool
hasKeyLocator() const noexcept
@@ -129,30 +130,32 @@
return m_keyLocator.has_value();
}
- /** @brief Get KeyLocator
- * @throw Error This SignatureInfo does not contain a KeyLocator
+ /** @brief Get the `%KeyLocator` element.
+ * @throw Error This SignatureInfo does not contain a `%KeyLocator` element.
*/
const KeyLocator&
getKeyLocator() const;
- /** @brief Set KeyLocator
- * @return A reference to this SignatureInfo, to allow chaining
+ /** @brief Set or unset the `%KeyLocator` element.
*
- * Passing `nullopt` will remove the KeyLocator.
+ * Passing `nullopt` will remove the `%KeyLocator` element.
+ *
+ * @return A reference to this SignatureInfo, to allow chaining.
*/
SignatureInfo&
setKeyLocator(optional<KeyLocator> keyLocator);
- /** @brief Get ValidityPeriod
+ /** @brief Get the `ValidityPeriod` element.
* @throw Error This SignatureInfo does not contain a ValidityPeriod
*/
security::ValidityPeriod
getValidityPeriod() const;
- /** @brief Append or replace ValidityPeriod
- * @return A reference to this SignatureInfo, to allow chaining
+ /** @brief Append, replace, or remove the `ValidityPeriod` element.
*
- * Passing `nullopt` will remove the ValidityPeriod.
+ * Passing `nullopt` will remove the `ValidityPeriod` element.
+ *
+ * @return A reference to this SignatureInfo, to allow chaining.
*/
SignatureInfo&
setValidityPeriod(optional<security::ValidityPeriod> validityPeriod);
@@ -164,9 +167,10 @@
getNonce() const;
/** @brief Append or replace SignatureNonce
- * @return A reference to this SignatureInfo, to allow chaining
*
* Passing `nullopt` will remove the SignatureNonce.
+ *
+ * @return A reference to this SignatureInfo, to allow chaining.
*/
SignatureInfo&
setNonce(optional<span<const uint8_t>> nonce);
@@ -178,9 +182,10 @@
getTime() const;
/** @brief Append or replace SignatureTime
- * @return A reference to this SignatureInfo, to allow chaining
*
* Passing `nullopt` will remove the SignatureTime.
+ *
+ * @return A reference to this SignatureInfo, to allow chaining.
*/
SignatureInfo&
setTime(optional<time::system_clock::time_point> time = time::system_clock::now());
@@ -192,9 +197,10 @@
getSeqNum() const;
/** @brief Append or replace SignatureSeqNum
- * @return A reference to this SignatureInfo, to allow chaining
*
* Passing `nullopt` will remove the SignatureSeqNum.
+ *
+ * @return A reference to this SignatureInfo, to allow chaining.
*/
SignatureInfo&
setSeqNum(optional<uint64_t> seqNum);
diff --git a/ndn-cxx/tag.hpp b/ndn-cxx/tag.hpp
index 383d973..ac3f1d3 100644
--- a/ndn-cxx/tag.hpp
+++ b/ndn-cxx/tag.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -25,20 +25,19 @@
namespace ndn {
/**
- * @brief Base class for packet tags that can hold any arbitrary information
+ * @brief Base class for packet tags that can hold any arbitrary information.
*/
class Tag
{
public:
virtual
- ~Tag();
+ ~Tag() = default;
+#ifdef DOXYGEN
/**
- * @fn static constexpr int getTypeId() noexcept
- * @return an integer that uniquely identifies this Tag type
+ * @brief Returns an integer that uniquely identifies this Tag type.
* @sa https://redmine.named-data.net/projects/ndn-cxx/wiki/PacketTagTypes
*/
-#ifdef DOXYGEN
static constexpr int
getTypeId() noexcept
{
@@ -47,12 +46,10 @@
#endif // DOXYGEN
};
-inline
-Tag::~Tag() = default;
-
-/** @brief provides a tag type for simple types
- * @tparam T the value type
- * @tparam TypeId the TypeId
+/**
+ * @brief Provides a tag type for simple types.
+ * @tparam T the value type
+ * @tparam TypeId the TypeId
*/
template<typename T, int TypeId>
class SimpleTag : public Tag
@@ -64,7 +61,8 @@
return TypeId;
}
- /** \brief explicitly convertible from T
+ /**
+ * \brief Explicitly convertible from \c T.
*/
constexpr explicit
SimpleTag(const T& value) noexcept
@@ -72,15 +70,17 @@
{
}
- /** \brief implicitly convertible to T
- * \return a copy of the enclosed value
+ /**
+ * \brief Implicitly convertible to \c T.
+ * \return A copy of the enclosed value.
*/
operator T() const
{
return m_value;
}
- /** \return the enclosed value
+ /**
+ * \brief Returns the enclosed value.
*/
constexpr const T&
get() const noexcept
diff --git a/ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp b/ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp
index f8ebe31..ded87f6 100644
--- a/ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp
+++ b/ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -27,8 +27,8 @@
namespace ndn {
namespace detail {
-/** \brief implementation detail of a Boost.Asio-based stream-oriented transport
- * with resolver support
+/** \brief Implementation detail of a Boost.Asio-based stream-oriented transport
+ * with resolver support.
*/
template<typename BaseTransport, typename Protocol>
class StreamTransportWithResolverImpl : public StreamTransportImpl<BaseTransport, Protocol>
diff --git a/ndn-cxx/transport/tcp-transport.hpp b/ndn-cxx/transport/tcp-transport.hpp
index 95c28ea..a40ba0f 100644
--- a/ndn-cxx/transport/tcp-transport.hpp
+++ b/ndn-cxx/transport/tcp-transport.hpp
@@ -38,7 +38,7 @@
} // namespace detail
-/** \brief a transport using TCP socket
+/** \brief A transport using TCP socket.
*/
class TcpTransport : public Transport
{
@@ -63,7 +63,7 @@
void
send(const Block& wire) override;
- /** \brief Create transport with parameters defined in URI
+ /** \brief Create transport with parameters defined in URI.
* \throw Transport::Error incorrect URI or unsupported protocol is specified
*/
static shared_ptr<TcpTransport>
diff --git a/ndn-cxx/transport/unix-transport.hpp b/ndn-cxx/transport/unix-transport.hpp
index 2d1ef05..4a31a59 100644
--- a/ndn-cxx/transport/unix-transport.hpp
+++ b/ndn-cxx/transport/unix-transport.hpp
@@ -35,7 +35,7 @@
} // namespace detail
-/** \brief a transport using Unix stream socket
+/** \brief A transport using Unix stream socket.
*/
class UnixTransport : public Transport
{
@@ -60,7 +60,7 @@
void
send(const Block& wire) override;
- /** \brief Create transport with parameters defined in URI
+ /** \brief Create transport with parameters defined in URI.
* \throw Transport::Error incorrect URI or unsupported protocol is specified
*/
static shared_ptr<UnixTransport>
diff --git a/ndn-cxx/util/concepts.hpp b/ndn-cxx/util/concepts.hpp
index 24968fc..7170c9d 100644
--- a/ndn-cxx/util/concepts.hpp
+++ b/ndn-cxx/util/concepts.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021 Regents of the University of California,
+ * Copyright (c) 2014-2022 Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -38,7 +38,7 @@
namespace ndn {
-/** \brief a concept check for TLV abstraction with .wireEncode method
+/** \brief A concept check for TLV abstraction with a `wireEncode()` method.
*/
template<class X>
class WireEncodable
@@ -54,7 +54,7 @@
X j;
};
-/** \brief a concept check for TLV abstraction with .wireEncode method
+/** \brief A concept check for TLV abstraction with a `wireEncode(EncodingBuffer)` method.
*/
template<class X>
class WireEncodableWithEncodingBuffer
@@ -73,8 +73,8 @@
X j;
};
-/** \brief a concept check for TLV abstraction with .wireDecode method
- * and constructible from Block
+/** \brief A concept check for TLV abstraction with a `wireDecode(Block)` method
+ * and constructible from Block.
*/
template<class X>
class WireDecodable
@@ -108,7 +108,7 @@
} // namespace detail
-/** \brief concept check for an item in a Status Dataset
+/** \brief Concept check for an item in a Status Dataset.
* \sa https://redmine.named-data.net/projects/nfd/wiki/StatusDataset
*/
template<class X>
@@ -116,7 +116,7 @@
{
};
-/** \brief concept check for an item in a Notification Stream
+/** \brief Concept check for an item in a Notification Stream.
* \sa https://redmine.named-data.net/projects/nfd/wiki/Notification
*/
template<class X>
@@ -139,7 +139,7 @@
} // namespace detail
} // namespace ndn
-/** \brief assert T is a forward iterator
+/** \brief Assert T is a forward iterator.
* \sa http://en.cppreference.com/w/cpp/concept/ForwardIterator
* \note A forward iterator should be default constructible, but boost::ForwardIterator follows
* SGI standard which doesn't require DefaultConstructible, so a separate check is needed.
diff --git a/ndn-cxx/util/dummy-client-face.hpp b/ndn-cxx/util/dummy-client-face.hpp
index 4b86222..22a80d8 100644
--- a/ndn-cxx/util/dummy-client-face.hpp
+++ b/ndn-cxx/util/dummy-client-face.hpp
@@ -34,7 +34,7 @@
class DummyClientFace : public ndn::Face
{
public:
- /** \brief options for DummyClientFace
+ /** \brief %Options for DummyClientFace.
*/
class Options
{
@@ -58,12 +58,12 @@
}
public:
- /** \brief if true, packets sent out of DummyClientFace will be appended to a container
+ /** \brief If true, packets sent out of DummyClientFace will be appended to a container.
*/
bool enablePacketLogging;
- /** \brief if true, prefix registration command will be automatically
- * replied with a successful response
+ /** \brief If true, prefix registration command will be automatically
+ * replied with a successful response.
*/
bool enableRegistrationReply;
@@ -71,7 +71,7 @@
*/
uint64_t registrationReplyFaceId = 1;
- /** \brief if not empty, face.processEvents() will be overridden by this function
+ /** \brief If not empty, `face.processEvents()` will be overridden by this function.
*/
std::function<void(time::milliseconds)> processEventsOverride;
};
@@ -82,49 +82,49 @@
AlreadyLinkedError();
};
- /** \brief Create a dummy face with internal IO service
+ /** \brief Create a dummy face with internal IO service.
*/
explicit
DummyClientFace(const Options& options = Options());
- /** \brief Create a dummy face with internal IO service and the specified KeyChain
+ /** \brief Create a dummy face with internal IO service and the specified KeyChain.
*/
explicit
DummyClientFace(KeyChain& keyChain, const Options& options = Options());
- /** \brief Create a dummy face with the provided IO service
+ /** \brief Create a dummy face with the provided IO service.
*/
explicit
DummyClientFace(boost::asio::io_service& ioService, const Options& options = Options());
- /** \brief Create a dummy face with the provided IO service and the specified KeyChain
+ /** \brief Create a dummy face with the provided IO service and the specified KeyChain.
*/
DummyClientFace(boost::asio::io_service& ioService, KeyChain& keyChain,
const Options& options = Options());
~DummyClientFace() override;
- /** \brief cause the Face to receive an interest
+ /** \brief Cause the Face to receive an Interest packet.
*/
void
receive(const Interest& interest);
- /** \brief cause the Face to receive a data
+ /** \brief Cause the Face to receive a Data packet.
*/
void
receive(const Data& data);
- /** \brief cause the Face to receive a nack
+ /** \brief Cause the Face to receive a Nack packet.
*/
void
receive(const lp::Nack& nack);
- /** \brief link another DummyClientFace through a broadcast media
+ /** \brief Link another DummyClientFace through a broadcast media.
*/
void
linkTo(DummyClientFace& other);
- /** \brief unlink the broadcast media if previously linked
+ /** \brief Unlink the broadcast media if previously linked.
*/
void
unlink();
@@ -148,7 +148,7 @@
doProcessEvents(time::milliseconds timeout, bool keepThread) override;
public:
- /** \brief Interests sent out of this DummyClientFace
+ /** \brief Interests sent out of this DummyClientFace.
*
* Sent Interests are appended to this container if options.enablePacketLogger is true.
* User of this class is responsible for cleaning up the container, if necessary.
@@ -156,7 +156,7 @@
*/
std::vector<Interest> sentInterests;
- /** \brief Data sent out of this DummyClientFace
+ /** \brief Data sent out of this DummyClientFace.
*
* Sent Data are appended to this container if options.enablePacketLogger is true.
* User of this class is responsible for cleaning up the container, if necessary.
@@ -164,7 +164,7 @@
*/
std::vector<Data> sentData;
- /** \brief Nacks sent out of this DummyClientFace
+ /** \brief Nacks sent out of this DummyClientFace.
*
* Sent Nacks are appended to this container if options.enablePacketLogger is true.
* User of this class is responsible for cleaning up the container, if necessary.
@@ -172,19 +172,19 @@
*/
std::vector<lp::Nack> sentNacks;
- /** \brief emits whenever an Interest is sent
+ /** \brief Emits whenever an Interest is sent.
*
* After .expressInterest, .processEvents must be called before this signal would be emitted.
*/
Signal<DummyClientFace, Interest> onSendInterest;
- /** \brief emits whenever a Data packet is sent
+ /** \brief Emits whenever a Data packet is sent.
*
* After .put, .processEvents must be called before this signal would be emitted.
*/
Signal<DummyClientFace, Data> onSendData;
- /** \brief emits whenever a Nack is sent
+ /** \brief Emits whenever a Nack is sent.
*
* After .put, .processEvents must be called before this signal would be emitted.
*/
diff --git a/ndn-cxx/util/io.hpp b/ndn-cxx/util/io.hpp
index 576f3f8..52c7814 100644
--- a/ndn-cxx/util/io.hpp
+++ b/ndn-cxx/util/io.hpp
@@ -79,7 +79,7 @@
/**
* \brief Reads bytes from a stream until EOF.
- * \return a Buffer containing the bytes read from the stream
+ * \return A Buffer containing the bytes read from the stream.
* \throw Error An error occurred, e.g., malformed input.
* \throw std::invalid_argument The specified encoding is not supported.
*/
@@ -89,7 +89,7 @@
/**
* \brief Reads a TLV element of type `T` from a stream.
* \tparam T Class type representing the TLV element; must be WireDecodable.
- * \return the parsed TLV element
+ * \return The parsed TLV element.
* \throw Error An error occurred, e.g., malformed input.
* \throw std::invalid_argument The specified encoding is not supported.
*/
@@ -112,7 +112,7 @@
* \brief Reads a TLV element from a stream.
* \tparam T Type of TLV element; `T` must be WireDecodable and the nested type
* `T::Error`, if defined, must be a subclass of ndn::tlv::Error.
- * \return the TLV element, or nullptr if an error occurs
+ * \return The TLV element, or nullptr if an error occurs.
* \note This function has a peculiar error handling behavior. Consider using loadTlv() instead.
*/
template<typename T>
@@ -145,7 +145,7 @@
* \brief Reads a TLV element from a file.
* \tparam T Type of TLV element; `T` must be WireDecodable and the nested type
* `T::Error`, if defined, must be a subclass of ndn::tlv::Error.
- * \return the TLV element, or nullptr if an error occurs
+ * \return The TLV element, or nullptr if an error occurs.
* \note This function has a peculiar error handling behavior. Consider using loadTlv() instead.
*/
template<typename T>
diff --git a/ndn-cxx/util/logger.cpp b/ndn-cxx/util/logger.cpp
index f845ff8..4ebdf15 100644
--- a/ndn-cxx/util/logger.cpp
+++ b/ndn-cxx/util/logger.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -75,10 +75,6 @@
NDN_THROW(std::invalid_argument("unrecognized log level '" + s + "'"));
}
-/**
- * \brief checks if incoming logger name meets criteria
- * \param name name of logger
- */
static bool
isValidLoggerName(const std::string& name)
{
diff --git a/ndn-cxx/util/notification-stream.hpp b/ndn-cxx/util/notification-stream.hpp
index c5a25e8..de37498 100644
--- a/ndn-cxx/util/notification-stream.hpp
+++ b/ndn-cxx/util/notification-stream.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -30,7 +30,7 @@
namespace ndn {
namespace util {
-/** \brief provides a publisher of Notification Stream
+/** \brief Provides a publisher of Notification Stream.
* \sa https://redmine.named-data.net/projects/nfd/wiki/Notification
*/
template<typename Notification>
diff --git a/ndn-cxx/util/notification-subscriber.hpp b/ndn-cxx/util/notification-subscriber.hpp
index fcd0ed9..3b78fdb 100644
--- a/ndn-cxx/util/notification-subscriber.hpp
+++ b/ndn-cxx/util/notification-subscriber.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021 Regents of the University of California,
+ * Copyright (c) 2014-2022 Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -43,7 +43,7 @@
virtual
~NotificationSubscriberBase();
- /** \return InterestLifetime of Interests to retrieve notifications
+ /** \return InterestLifetime of Interests to retrieve notifications.
*
* This must be greater than FreshnessPeriod of Notification Data packets,
* to ensure correct operation of this subscriber implementation.
@@ -60,22 +60,22 @@
return m_isRunning;
}
- /** \brief start or resume receiving notifications
+ /** \brief Start or resume receiving notifications.
* \note onNotification must have at least one listener,
* otherwise this operation has no effect.
*/
void
start();
- /** \brief stop receiving notifications
+ /** \brief Stop receiving notifications.
*/
void
stop();
protected:
- /** \brief construct a NotificationSubscriber
+ /** \brief Construct a NotificationSubscriber.
* \note The subscriber is not started after construction.
- * User should add one or more handlers to onNotification, and invoke .start().
+ * User should add one or more handlers to onNotification, and invoke start().
*/
NotificationSubscriberBase(Face& face, const Name& prefix,
time::milliseconds interestLifetime);
@@ -102,7 +102,7 @@
void
afterReceiveData(const Data& data);
- /** \brief decode the Data as a notification, and deliver it to subscribers
+ /** \brief Decode the Data as a notification, and deliver it to subscribers.
* \return whether decode was successful
*/
virtual bool
@@ -118,15 +118,15 @@
exponentialBackoff(lp::Nack nack);
public:
- /** \brief fires when a NACK is received
+ /** \brief Fires when a Nack is received.
*/
signal::Signal<NotificationSubscriberBase, lp::Nack> onNack;
- /** \brief fires when no Notification is received within .getInterestLifetime period
+ /** \brief Fires when no Notification is received within getInterestLifetime() period.
*/
signal::Signal<NotificationSubscriberBase> onTimeout;
- /** \brief fires when a Data packet in the Notification Stream cannot be decoded as Notification
+ /** \brief Fires when a Data packet in the Notification Stream cannot be decoded as Notification.
*/
signal::Signal<NotificationSubscriberBase, Data> onDecodeError;
@@ -143,7 +143,7 @@
time::milliseconds m_interestLifetime;
};
-/** \brief provides a subscriber of Notification Stream
+/** \brief Provides a subscriber of Notification Stream.
* \sa https://redmine.named-data.net/projects/nfd/wiki/Notification
* \tparam Notification type of Notification item, appears in payload of Data packets
*/
@@ -154,7 +154,7 @@
BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<Notification>));
BOOST_CONCEPT_ASSERT((WireDecodable<Notification>));
- /** \brief construct a NotificationSubscriber
+ /** \brief Construct a NotificationSubscriber.
* \note The subscriber is not started after construction.
* User should add one or more handlers to onNotification, and invoke .start().
*/
@@ -165,7 +165,7 @@
}
public:
- /** \brief fires when a Notification is received
+ /** \brief Fires when a Notification is received.
* \note Removing all handlers will cause the subscriber to stop.
*/
signal::Signal<NotificationSubscriber, Notification> onNotification;
diff --git a/ndn-cxx/util/regex/regex-matcher.hpp b/ndn-cxx/util/regex/regex-matcher.hpp
index 9008cd3..cb7ae05 100644
--- a/ndn-cxx/util/regex/regex-matcher.hpp
+++ b/ndn-cxx/util/regex/regex-matcher.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -61,8 +61,7 @@
}
/**
- * @brief get the matched name components
- * @returns the matched name components
+ * @brief Return the matched name components.
*/
const std::vector<name::Component>&
getMatchResult() const
diff --git a/ndn-cxx/util/signal/connection.hpp b/ndn-cxx/util/signal/connection.hpp
index 5eba960..0952261 100644
--- a/ndn-cxx/util/signal/connection.hpp
+++ b/ndn-cxx/util/signal/connection.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -30,7 +30,7 @@
using DisconnectFunction = std::function<void()>;
-/** \brief represents a connection to a signal
+/** \brief Represents a connection to a signal.
* \note This type is copyable. Any copy can be used to disconnect.
*/
class Connection
@@ -39,7 +39,7 @@
constexpr
Connection() noexcept = default;
- /** \brief disconnects from the signal
+ /** \brief Disconnects from the signal.
* \note If the connection is already disconnected, or if the Signal has been destructed,
* this operation has no effect.
* \warning During signal emission, attempting to disconnect a connection other than
@@ -48,7 +48,7 @@
void
disconnect();
- /** \brief check if connected to the signal
+ /** \brief Check if connected to the signal.
*/
bool
isConnected() const noexcept
@@ -69,7 +69,7 @@
// NOTE: the following "hidden friend" operators are available via
// argument-dependent lookup only and must be defined inline.
- /** \brief compare for equality
+ /** \brief Compare for equality.
*
* Two connections are equal if they both refer to the same connection that isn't disconnected,
* or they are both disconnected.
diff --git a/ndn-cxx/util/signal/signal.hpp b/ndn-cxx/util/signal/signal.hpp
index 4b0f8dc..b60ef83 100644
--- a/ndn-cxx/util/signal/signal.hpp
+++ b/ndn-cxx/util/signal/signal.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -33,7 +33,7 @@
class DummyExtraArg;
-/** \brief provides a lightweight signal / event system
+/** \brief Provides a lightweight signal / event system.
*
* To declare a signal:
* public:
@@ -52,7 +52,7 @@
class Signal : noncopyable
{
public: // API for anyone
- /** \brief represents a function that can connect to the signal
+ /** \brief Represents a function that can connect to the signal.
*/
typedef function<void(const TArgs&...)> Handler;
@@ -60,14 +60,14 @@
~Signal();
- /** \brief connects a handler to the signal
+ /** \brief Connects a handler to the signal.
* \note If invoked from a handler, the new handler won't receive the current emitted signal.
* \warning The handler is permitted to disconnect itself, but it must ensure its validity.
*/
Connection
connect(Handler handler);
- /** \brief connects a single-shot handler to the signal
+ /** \brief Connects a single-shot handler to the signal.
*
* After the handler is executed once, it is automatically disconnected.
*/
@@ -80,7 +80,7 @@
bool
isEmpty() const;
- /** \brief emits a signal
+ /** \brief Emits a signal.
* \param args arguments passed to all handlers
* \warning Emitting the signal from a handler is undefined behavior.
* \warning Destructing the Signal object during signal emission is undefined behavior.
@@ -90,7 +90,7 @@
void
operator()(const TArgs&... args);
- /** \brief (implementation detail) emits a signal
+ /** \brief (implementation detail) Emits a signal.
* \note This overload is used by signal-emit.hpp.
*/
void
@@ -102,15 +102,15 @@
private: // internal implementation
typedef Signal<Owner, TArgs...> Self;
- /** \brief stores a handler function, and a function to disconnect this handler
+ /** \brief Stores a handler function, and a function to disconnect this handler.
*/
struct Slot
{
- /** \brief the handler function who will receive emitted signals
+ /** \brief The handler function who will receive emitted signals.
*/
Handler handler;
- /** \brief the disconnect function which will disconnect this handler
+ /** \brief The disconnect function which will disconnect this handler.
*
* In practice this is the Signal::disconnect method bound to an iterator
* pointing at this slot.
@@ -123,23 +123,23 @@
shared_ptr<DisconnectFunction> disconnect;
};
- /** \brief stores slots
+ /** \brief Stores slots.
* \note std::list is used because iterators must not be invalidated
* when other slots are added or removed
*/
typedef std::list<Slot> SlotList;
SlotList m_slots;
- /** \brief is a signal handler executing?
+ /** \brief Is a signal handler executing?
*/
bool m_isExecuting;
- /** \brief iterator to current executing slot
+ /** \brief Iterator to current executing slot.
* \note This field is meaningful when isExecuting==true
*/
typename SlotList::iterator m_currentSlot;
- /** \brief disconnects the handler in a slot
+ /** \brief Disconnects the handler in a slot.
*/
void
disconnect(typename SlotList::iterator it);
diff --git a/ndn-cxx/util/sqlite3-statement.hpp b/ndn-cxx/util/sqlite3-statement.hpp
index b773c10..4e7427a 100644
--- a/ndn-cxx/util/sqlite3-statement.hpp
+++ b/ndn-cxx/util/sqlite3-statement.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -31,14 +31,14 @@
namespace util {
/**
- * @brief wrap an SQLite3 prepared statement
+ * @brief Wrap an SQLite3 prepared statement.
* @warning This class is implementation detail of ndn-cxx library.
*/
class Sqlite3Statement : noncopyable
{
public:
/**
- * @brief initialize and prepare Sqlite3 statement
+ * @brief Initialize and prepare Sqlite3 statement.
* @param database handler to open sqlite3 database
* @param statement SQL statement
* @throw std::domain_error SQL statement is bad
@@ -46,12 +46,12 @@
Sqlite3Statement(sqlite3* database, const std::string& statement);
/**
- * @brief finalize the statement
+ * @brief Finalize the statement.
*/
~Sqlite3Statement();
/**
- * @brief bind a string to the statement
+ * @brief Bind a string to the statement.
*
* @param index The binding position
* @param value The pointer of the binding string
@@ -63,7 +63,7 @@
bind(int index, const char* value, size_t size, void(*destructor)(void*));
/**
- * @brief bind a string to the statement
+ * @brief Bind a string to the statement.
*
* @param index The binding position
* @param value The binding string
@@ -74,7 +74,7 @@
bind(int index, const std::string& value, void(*destructor)(void*));
/**
- * @brief bind a byte blob to the statement
+ * @brief Bind a byte blob to the statement.
*
* @param index The binding position
* @param value The pointer of the blob
@@ -86,7 +86,7 @@
bind(int index, const void* value, size_t size, void(*destructor)(void*));
/**
- * @brief bind a byte blob to the statement
+ * @brief Bind a byte blob to the statement.
*
* @param index The binding position
* @param block The binding block
@@ -97,7 +97,7 @@
bind(int index, const Block& block, void(*destructor)(void*));
/**
- * @brief bind an integer to the statement
+ * @brief Bind an integer to the statement.
*
* @param index The binding position
* @param number The binding integer
@@ -107,43 +107,43 @@
bind(int index, int number);
/**
- * @brief get a string from @p column.
+ * @brief Get a string from @p column.
*/
std::string
getString(int column);
/**
- * @brief get a block from @p column.
+ * @brief Get a block from @p column.
*/
Block
getBlock(int column);
/**
- * @brief get an integer from @p column.
+ * @brief Get an integer from @p column.
*/
int
getInt(int column);
/**
- * @brief get a pointer of byte blob from @p column.
+ * @brief Get a pointer of byte blob from @p column.
*/
const uint8_t*
getBlob(int column);
/**
- * @brief get the size of @p column.
+ * @brief Get the size of @p column.
*/
int
getSize(int column);
/**
- * @brief wrapper of sqlite3_step
+ * @brief Wrapper of `sqlite3_step`.
*/
int
step();
/**
- * @brief implicitly converts to sqlite3_stmt* to be used in SQLite C API
+ * @brief Implicitly converts to `sqlite3_stmt*` to be used in SQLite C API.
*/
operator sqlite3_stmt*();
diff --git a/ndn-cxx/util/time.hpp b/ndn-cxx/util/time.hpp
index 0d55431..7792faa 100644
--- a/ndn-cxx/util/time.hpp
+++ b/ndn-cxx/util/time.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -49,7 +49,7 @@
using microseconds = boost::chrono::microseconds;
using nanoseconds = boost::chrono::nanoseconds;
-/** \return the absolute value of the duration d
+/** \return The absolute value of the duration \p d.
* \note The function does not participate in the overload resolution
* unless std::numeric_limits<Rep>::is_signed is true.
*/
diff --git a/tests/unit/dummy-validator.hpp b/tests/unit/dummy-validator.hpp
index be0adb3..63b7556 100644
--- a/tests/unit/dummy-validator.hpp
+++ b/tests/unit/dummy-validator.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2020 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,12 +29,13 @@
namespace ndn {
namespace tests {
-/** \brief A validation policy for unit testing
+/**
+ * \brief A dummy validation policy for unit testing.
*/
class DummyValidationPolicy : public security::ValidationPolicy
{
public:
- /** \brief constructor
+ /** \brief Constructor.
* \param shouldAccept whether to accept or reject all validation requests
*/
explicit
@@ -43,7 +44,7 @@
this->setResult(shouldAccept);
}
- /** \brief change the validation result
+ /** \brief Change the validation result.
* \param shouldAccept whether to accept or reject all validation requests
*/
void
@@ -52,7 +53,7 @@
m_decide = [shouldAccept] (const Name&) { return shouldAccept; };
}
- /** \brief set a callback for validation
+ /** \brief Set a callback for validation.
* \param cb a callback which receives the Interest/Data name for each validation request;
* its return value determines the validation result
*/
diff --git a/tests/unit/mgmt/nfd/controller-fixture.hpp b/tests/unit/mgmt/nfd/controller-fixture.hpp
index 764ff41..ae4ab3c 100644
--- a/tests/unit/mgmt/nfd/controller-fixture.hpp
+++ b/tests/unit/mgmt/nfd/controller-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -48,7 +48,7 @@
m_keyChain.setDefaultIdentity(m_keyChain.createIdentity("/localhost/ControllerFixture"));
}
- /** \brief controls whether Controller's validator should accept or reject validation requests
+ /** \brief Controls whether Controller's validator should accept or reject validation requests.
*
* Initially, the validator accepts all requests.
* Setting \p false causes validator to reject all requests.
diff --git a/tests/unit/mgmt/nfd/status-dataset.t.cpp b/tests/unit/mgmt/nfd/status-dataset.t.cpp
index b9cc84d..633a45d 100644
--- a/tests/unit/mgmt/nfd/status-dataset.t.cpp
+++ b/tests/unit/mgmt/nfd/status-dataset.t.cpp
@@ -37,7 +37,7 @@
class ControllerStatusDatasetFixture : public ControllerFixture
{
protected:
- /** \brief send one WireEncodable as Data reply
+ /** \brief Send one WireEncodable as Data reply.
* \param prefix dataset prefix without version and segment
* \param payload payload block
* \note payload must fit in one Data
@@ -53,7 +53,7 @@
face.receive(*signData(data));
}
- /** \brief send two WireEncodables as Data reply
+ /** \brief Send two WireEncodables as Data reply.
* \param prefix dataset prefix without version and segment
* \param payload1 first vector item
* \param payload2 second vector item
diff --git a/tests/unit/util/io.t.cpp b/tests/unit/util/io.t.cpp
index 270270c..9fcafd7 100644
--- a/tests/unit/util/io.t.cpp
+++ b/tests/unit/util/io.t.cpp
@@ -114,7 +114,7 @@
}
/**
- * \brief create a directory at `filepath`, so that it's neither readable nor writable as a file
+ * \brief Create a directory at `filepath`, so that it's neither readable nor writable as a file.
*/
void
mkdir() const
diff --git a/tests/unit/util/notification-subscriber.t.cpp b/tests/unit/util/notification-subscriber.t.cpp
index 3936e9e..896f632 100644
--- a/tests/unit/util/notification-subscriber.t.cpp
+++ b/tests/unit/util/notification-subscriber.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021 Regents of the University of California,
+ * Copyright (c) 2014-2022 Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -49,7 +49,7 @@
{
}
- /** \brief deliver one notification to subscriber
+ /** \brief Deliver one notification to subscriber.
*/
void
deliverNotification(const std::string& msg)
@@ -69,7 +69,7 @@
subscriberFace.receive(data);
}
- /** \brief deliver a Nack to subscriber
+ /** \brief Deliver a Nack to subscriber.
*/
void
deliverNack(const Interest& interest, const lp::NackReason& reason)