Moving helper components to the plugins/ folder. Disabling compilation of these components
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
index fe098ad..9538a1f 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
@@ -65,6 +65,16 @@
virtual boost::any accept( Visitor &v, boost::any param ) = 0;
};
+// Necessary until Buffer::Iterator gets PeekU8 call
+inline
+uint8_t
+BufferIteratorPeekU8 (Buffer::Iterator &i)
+{
+ uint8_t ret = i.ReadU8 ();
+ i.Prev ();
+ return ret;
+}
+
}
}
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc
index 0fdea06..68fc794 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc
@@ -41,7 +41,7 @@
return; // hack #1. Do not process nesting block for <Content>
// parse attributes until first nested block reached
- while (!start.IsEnd () && start.PeekU8 ()!=CCN_CLOSE)
+ while (!start.IsEnd () && BufferIteratorPeekU8 (start)!=CCN_CLOSE)
{
Ptr<Block> block = Block::ParseBlock (start);
if (DynamicCast<BaseAttr> (block)!=0)
@@ -54,7 +54,7 @@
}
// parse the rest of nested blocks
- while (!start.IsEnd () && start.PeekU8 ()!=CCN_CLOSE)
+ while (!start.IsEnd () && BufferIteratorPeekU8 (start)!=CCN_CLOSE)
{
// hack #2. Stop processing nested blocks if last block was <Content>
if (m_dtag == CCN_DTAG_ContentObject && // we are in <ContentObject>
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc
index 5862ad4..723c57e 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc
@@ -37,7 +37,7 @@
throw CcnbDecodingException ();
// parse attributes until first nested block reached
- while (!start.IsEnd () && start.PeekU8 ()!=CCN_CLOSE)
+ while (!start.IsEnd () && BufferIteratorPeekU8 (start)!=CCN_CLOSE)
{
Ptr<Block> block = Block::ParseBlock (start);
if (DynamicCast<BaseAttr> (block)!=0)
@@ -50,7 +50,7 @@
}
// parse the rest of nested blocks
- while (!start.IsEnd () && start.PeekU8 ()!=CCN_CLOSE)
+ while (!start.IsEnd () && BufferIteratorPeekU8 (start)!=CCN_CLOSE)
{
Ptr<Block> block = Block::ParseBlock (start);
m_nestedTags.push_back (block);