In common.h, remove Ptr. In interest.h, etc. typedef InterestPtr and ConstInterestPtr, etc.
We will centralize and allow these to be typedef as boost::shared_ptr
or std::shared_ptr.
diff --git a/ndn-cpp/fields/blob.h b/ndn-cpp/fields/blob.h
index 85fd71b..ce0d667 100644
--- a/ndn-cpp/fields/blob.h
+++ b/ndn-cpp/fields/blob.h
@@ -15,9 +15,14 @@
#include <vector>
#include <cstddef>
+#include <boost/shared_ptr.hpp>
namespace ndn {
+class Blob;
+typedef boost::shared_ptr<Blob> BlobPtr;
+typedef boost::shared_ptr<const Blob> ConstBlobPtr;
+
/**
* @brief Class representing a general-use binary blob
*/
diff --git a/ndn-cpp/fields/name.h b/ndn-cpp/fields/name.h
index 18e2412..a356f8f 100644
--- a/ndn-cpp/fields/name.h
+++ b/ndn-cpp/fields/name.h
@@ -18,6 +18,10 @@
namespace ndn {
+class Name;
+typedef boost::shared_ptr<Name> NamePtr;
+typedef boost::shared_ptr<const Name> ConstNamePtr;
+
/**
* @brief Class for NDN Name
*/
@@ -393,8 +397,6 @@
std::vector<name::Component> m_comps;
};
-typedef boost::shared_ptr<Name> NamePtr;
-
inline std::ostream &
operator << (std::ostream &os, const Name &name)
{
diff --git a/ndn-cpp/fields/signature.h b/ndn-cpp/fields/signature.h
index a9fb39a..1368663 100644
--- a/ndn-cpp/fields/signature.h
+++ b/ndn-cpp/fields/signature.h
@@ -12,11 +12,16 @@
#define NDN_SIGNATURE_H
#include <iostream>
+#include <boost/shared_ptr.hpp>
namespace ndn {
namespace wire { class Base; }
+class Signature;
+typedef boost::shared_ptr<Signature> SignaturePtr;
+typedef boost::shared_ptr<const Signature> ConstSignaturePtr;
+
/**
* @brief Pure virtual class providing an interface to work with signatures for NDN data packets
*/
diff --git a/ndn-cpp/fields/signed-blob.h b/ndn-cpp/fields/signed-blob.h
index 2686977..fd5bf90 100644
--- a/ndn-cpp/fields/signed-blob.h
+++ b/ndn-cpp/fields/signed-blob.h
@@ -17,6 +17,10 @@
namespace ndn {
+class SignedBlob;
+typedef boost::shared_ptr<SignedBlob> SignedBlobPtr;
+typedef boost::shared_ptr<const SignedBlob> ConstSignedBlobPtr;
+
/**
* @brief Class representing a blob, which has a signed portion (e.g., bytes of DATA packet)
*/
@@ -92,7 +96,6 @@
return m_signedEnd - m_signedBegin;
}
-
} // ndn
#endif // NDN_SIGNED_BLOB_H