Make everything compile
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-content-object-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-content-object-visitor.cc
index 64f7d0b..d694f11 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-content-object-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-content-object-visitor.cc
@@ -26,6 +26,10 @@
#include "ns3/name-components.h"
#include "ns3/assert.h"
+#include "ns3/ccnx-content-object-header.h"
+
+#include <boost/foreach.hpp>
+
namespace ns3 {
namespace CcnbParser {
@@ -35,7 +39,7 @@
{
// uint32_t n.m_dtag;
// std::list<Ptr<Block> > n.m_nestedBlocks;
- static NameComponentsVisitor m_nameComponentsVisitor;
+ static NameComponentsVisitor nameComponentsVisitor;
CcnxContentObjectHeader &contentObject = boost::any_cast<CcnxContentObjectHeader&> (param);
@@ -43,7 +47,7 @@
{
case CCN_DTAG_ContentObject:
// process nested blocks
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this, param);
}
@@ -53,7 +57,7 @@
// process name components
Ptr<Name::Components> name = Create<Name::Components> ();
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (nameComponentsVisitor, *name);
}
@@ -66,7 +70,7 @@
break;
case CCN_DTAG_Content: // !!! HACK
// This hack was necessary for memory optimizations (i.e., content is virtual payload)
- NS_ASSERT_MSG (n.m_nestedBlocks.size() == 0, "Parser should have stopped just after processing <Content> tag");
+ NS_ASSERT_MSG (n.m_nestedTags.size() == 0, "Parser should have stopped just after processing <Content> tag");
break;
}
}
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-depth-first-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-depth-first-visitor.cc
index aa78e85..514f444 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-depth-first-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-depth-first-visitor.cc
@@ -34,21 +34,21 @@
namespace CcnbParser {
boost::any
-GJDepthFirstVisitor::visit (Blob &n, boost::any param)
+DepthFirstVisitor::visit (Blob &n, boost::any param)
{
// Buffer n.m_blob;
return n.m_blob;
}
boost::any
-GJDepthFirstVisitor::visit (Udata &n, boost::any param)
+DepthFirstVisitor::visit (Udata &n, boost::any param)
{
// std::string n.m_udata;
return n.m_udata;
}
boost::any
-GJDepthFirstVisitor::visit (Tag &n, boost::any param)
+DepthFirstVisitor::visit (Tag &n, boost::any param)
{
// std::string n.m_tag;
// std::list<Ptr<Block> > n.m_attrs;
@@ -57,7 +57,7 @@
{
block->accept (*this, param);
}
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this, param);
}
@@ -65,7 +65,7 @@
}
boost::any
-GJDepthFirstVisitor::visit (Dtag &n, boost::any param)
+DepthFirstVisitor::visit (Dtag &n, boost::any param)
{
// std::string n.m_tag;
// std::list<Ptr<Block> > n.m_attrs;
@@ -74,7 +74,7 @@
{
block->accept (*this, param);
}
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this, param);
}
@@ -82,7 +82,7 @@
}
boost::any
-GJDepthFirstVisitor::visit (Attr &n, boost::any param)
+DepthFirstVisitor::visit (Attr &n, boost::any param)
{
// std::string n.m_attr;
// Ptr<Udata> n.m_value;
@@ -90,7 +90,7 @@
}
boost::any
-GJDepthFirstVisitor::visit (Dattr &n, boost::any param)
+DepthFirstVisitor::visit (Dattr &n, boost::any param)
{
// uint32_t n.m_dattr;
// Ptr<Udata> n.m_value;
@@ -98,7 +98,7 @@
}
boost::any
-GJDepthFirstVisitor::visit (Ext &n, boost::any param)
+DepthFirstVisitor::visit (Ext &n, boost::any param)
{
// uint64_t n.m_extSubtype;
return n.m_extSubtype;
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc
index d33b2b0..ccb40b2 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc
@@ -20,6 +20,15 @@
#include "ccnb-parser-interest-visitor.h"
+#include "ns3/ccnb-parser-block.h"
+#include "ns3/ccnb-parser-dtag.h"
+#include "ns3/name-components.h"
+#include "ns3/assert.h"
+
+#include "ns3/ccnx-interest-header.h"
+
+#include <boost/foreach.hpp>
+
namespace ns3 {
namespace CcnbParser {
@@ -31,7 +40,7 @@
// std::list<Ptr<Block> > n.m_nestedBlocks;
static NonNegativeIntegerVisitor nonNegativeIntegerVisitor;
- static NameComponentsVisitor m_nameComponentsVisitor;
+ static NameComponentsVisitor nameComponentsVisitor;
CcnxInterestHeader &interest = boost::any_cast<CcnxInterestHeader&> (param);
@@ -39,7 +48,7 @@
{
case CCN_DTAG_Interest:
// process nested blocks
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this, param);
}
@@ -49,7 +58,7 @@
// process name components
Ptr<Name::Components> name = Create<Name::Components> ();
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (nameComponentsVisitor, *name);
}
@@ -57,20 +66,20 @@
break;
}
case CCN_DTAG_MinSuffixComponents:
- if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
- throw CcnxDecodingException ();
+ if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+ throw CcnbDecodingException ();
interest.SetMinSuffixComponents (
boost::any_cast<uint32_t> (
- (*n.m_nestedBlocks.begin())->accept(
+ (*n.m_nestedTags.begin())->accept(
nonNegativeIntegerVisitor
)));
break;
case CCN_DTAG_MaxSuffixComponents:
- if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
- throw CcnxDecodingException ();
+ if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+ throw CcnbDecodingException ();
interest.SetMaxSuffixComponents (
boost::any_cast<uint32_t> (
- (*n.m_nestedBlocks.begin())->accept(
+ (*n.m_nestedTags.begin())->accept(
nonNegativeIntegerVisitor
)));
break;
@@ -79,7 +88,7 @@
// process exclude components
Ptr<Name::Components> exclude = Create<Name::Components> ();
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (nameComponentsVisitor, *exclude);
}
@@ -87,42 +96,42 @@
break;
}
case CCN_DTAG_ChildSelector:
- if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
- throw CcnxDecodingException ();
+ if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+ throw CcnbDecodingException ();
interest.SetChildSelector (
1 == boost::any_cast<uint32_t> (
- (*n.m_nestedBlocks.begin())->accept(
+ (*n.m_nestedTags.begin())->accept(
nonNegativeIntegerVisitor
)));
break;
case CCN_DTAG_AnswerOriginKind:
- if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
- throw CcnxDecodingException ();
+ if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+ throw CcnbDecodingException ();
interest.SetAnswerOriginKind (
1 == boost::any_cast<uint32_t> (
- (*n.m_nestedBlocks.begin())->accept(
+ (*n.m_nestedTags.begin())->accept(
nonNegativeIntegerVisitor
)));
break;
case CCN_DTAG_Scope:
- if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
- throw CcnxDecodingException ();
+ if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+ throw CcnbDecodingException ();
interest.SetScope (
boost::any_cast<uint32_t> (
- (*n.m_nestedBlocks.begin())->accept(
+ (*n.m_nestedTags.begin())->accept(
nonNegativeIntegerVisitor
)));
break;
case CCN_DTAG_InterestLifetime:
- if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
- throw CcnxDecodingException ();
+ if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+ throw CcnbDecodingException ();
/// \todo Decode InterestLifetime
break;
case CCN_DTAG_Nonce:
- if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
- throw CcnxDecodingException ();
+ if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+ throw CcnbDecodingException ();
/// \todo Decode Nonce
break;
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-name-components-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-name-components-visitor.cc
index 5ffd71f..3138be1 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-name-components-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-name-components-visitor.cc
@@ -39,10 +39,10 @@
switch (n.m_dtag)
{
case CCN_DTAG_Component:
- if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
- throw CcnxDecodingException ();
+ if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+ throw CcnbDecodingException ();
components.Add (
- boost::any_cast<std::string> ((*n.m_nestedBlocks.begin())->accept(
+ boost::any_cast<std::string> ((*n.m_nestedTags.begin())->accept(
stringVisitor
)));
break;
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-no-argu-depth-first-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-no-argu-depth-first-visitor.cc
index 6cd9aac..f81a350 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-no-argu-depth-first-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-no-argu-depth-first-visitor.cc
@@ -57,7 +57,7 @@
{
block->accept (*this);
}
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this);
}
@@ -74,7 +74,7 @@
{
block->accept (*this);
}
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this);
}
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-no-argu-visitor.h b/helper/ccnb-parser/visitors/ccnb-parser-no-argu-visitor.h
index ea3b56b..3e1750f 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-no-argu-visitor.h
+++ b/helper/ccnb-parser/visitors/ccnb-parser-no-argu-visitor.h
@@ -21,7 +21,7 @@
#ifndef _CCNB_PARSER_NO_ARGU_VISITOR_H_
#define _CCNB_PARSER_NO_ARGU_VISITOR_H_
-#include "ccnb-parser-commoh.h"
+#include "ns3/ccnb-parser-commoh.h"
#include <boost/any.hpp>
namespace ns3 {
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-non-negative-integer-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-non-negative-integer-visitor.cc
index 319eefa..e393770 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-non-negative-integer-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-non-negative-integer-visitor.cc
@@ -31,7 +31,7 @@
NonNegativeIntegerVisitor::visit (Blob &n) //to throw parsing error
{
// Buffer n.m_blob;
- throw CcnxDecodingException ();
+ throw CcnbDecodingException ();
}
boost::any
@@ -42,7 +42,7 @@
int32_t value;
is >> value;
if (value<0) // value should be non-negative
- throw CcnxDecodingException ();
+ throw CcnbDecodingException ();
return static_cast<uint32_t> (value);
}
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-string-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-string-visitor.cc
index 078b326..33c9465 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-string-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-string-visitor.cc
@@ -19,6 +19,7 @@
*/
#include "ccnb-parser-string-visitor.h"
+#include "ns3/ccnb-parser-udata.h"
namespace ns3 {
namespace CcnbParser {
@@ -27,7 +28,7 @@
StringVisitor::visit (Blob &n)
{
// Buffer n.m_blob;
- throw CcnxDecodingException ();
+ throw CcnbDecodingException ();
}
boost::any
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-visitor.h b/helper/ccnb-parser/visitors/ccnb-parser-visitor.h
index d098c3e..aa6911b 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-visitor.h
+++ b/helper/ccnb-parser/visitors/ccnb-parser-visitor.h
@@ -21,7 +21,7 @@
#ifndef _CCNB_PARSER_VISITOR_H_
#define _CCNB_PARSER_VISITOR_H_
-#include "ccnb-parser-commoh.h"
+#include "ns3/ccnb-parser-commoh.h"
#include <boost/any.hpp>
namespace ns3 {
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-void-depth-first-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-void-depth-first-visitor.cc
index c2b8401..1c9a28a 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-void-depth-first-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-void-depth-first-visitor.cc
@@ -55,7 +55,7 @@
{
block->accept (*this, param);
}
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this, param);
}
@@ -71,7 +71,7 @@
{
block->accept (*this, param);
}
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this, param);
}
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-depth-first-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-depth-first-visitor.cc
index 7f8e6de..1944b2a 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-depth-first-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-depth-first-visitor.cc
@@ -55,7 +55,7 @@
{
block->accept (*this);
}
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this);
}
@@ -71,7 +71,7 @@
{
block->accept (*this);
}
- BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+ BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
block->accept (*this);
}
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-visitor.h b/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-visitor.h
index ef45c98..5941350 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-visitor.h
+++ b/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-visitor.h
@@ -21,7 +21,7 @@
#ifndef _CCNB_PARSER_VOID_NO_ARGU_VISITOR_H_
#define _CCNB_PARSER_VOID_NO_ARGU_VISITOR_H_
-#include "ccnb-parser-commoh.h"
+#include "ns3/ccnb-parser-commoh.h"
namespace ns3 {
namespace CcnbParser {
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-void-visitor.h b/helper/ccnb-parser/visitors/ccnb-parser-void-visitor.h
index 7f412c2..9ef1e3c 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-void-visitor.h
+++ b/helper/ccnb-parser/visitors/ccnb-parser-void-visitor.h
@@ -21,7 +21,7 @@
#ifndef _CCNB_PARSER_VOID_VISITOR_H_
#define _CCNB_PARSER_VOID_VISITOR_H_
-#include "ccnb-parser-commoh.h"
+#include "ns3/ccnb-parser-commoh.h"
#include <boost/any.hpp>
namespace ns3 {