base: ensure Element::Error inherits from tlv::Error
Adding static asserts to ensure (Name|name::Component|Interest|
Selectors|Exclude|KeyLocator|Data|MetaInfo|Signature|SignatureInfo)
::Error are subclasses of tlv::Error.
This commit also adds WireEncodable and WireDecodable concept checks
to Name,name::Component,Interest,Selectors,Exclude,KeyLocator,Data,
MetaInfo,SignatureInfo types.
This commit also moves definition of Selectors method into .cpp.
refs #1983
Change-Id: I15220b93437d4a624ae09df66defc91ceac2386c
diff --git a/src/interest.hpp b/src/interest.hpp
index e075ca7..02e7ba9 100644
--- a/src/interest.hpp
+++ b/src/interest.hpp
@@ -38,12 +38,21 @@
const time::seconds DEFAULT_INTEREST_LIFETIME = time::seconds(4);
-/**
- * An Interest holds a Name and other fields for an Interest
+/** @brief represents an Interest packet
*/
class Interest : public enable_shared_from_this<Interest>
{
public:
+ class Error : public tlv::Error
+ {
+ public:
+ explicit
+ Error(const std::string& what)
+ : tlv::Error(what)
+ {
+ }
+ };
+
/**
* @brief Create a new Interest with an empty name (`ndn:/`)
*