Alexander Afanasyev | 8b37905 | 2011-08-21 16:58:20 -0700 | [diff] [blame] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2011 University of California, Los Angeles |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation; |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | * |
| 18 | * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 19 | */ |
| 20 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 21 | #include "void-no-argu-depth-first-visitor.h" |
Alexander Afanasyev | 8b37905 | 2011-08-21 16:58:20 -0700 | [diff] [blame] | 22 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 23 | #include "../syntax-tree/blob.h" |
| 24 | #include "../syntax-tree/udata.h" |
| 25 | #include "../syntax-tree/tag.h" |
| 26 | #include "../syntax-tree/dtag.h" |
| 27 | #include "../syntax-tree/attr.h" |
| 28 | #include "../syntax-tree/dattr.h" |
| 29 | #include "../syntax-tree/ext.h" |
Alexander Afanasyev | 8b37905 | 2011-08-21 16:58:20 -0700 | [diff] [blame] | 30 | |
| 31 | #include <boost/foreach.hpp> |
| 32 | |
| 33 | namespace ns3 { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 34 | namespace ndn { |
Alexander Afanasyev | 8b37905 | 2011-08-21 16:58:20 -0700 | [diff] [blame] | 35 | namespace CcnbParser { |
| 36 | |
| 37 | void |
| 38 | VoidNoArguDepthFirstVisitor::visit (Blob &n) |
| 39 | { |
| 40 | // Buffer n.m_blob; |
| 41 | } |
| 42 | |
| 43 | void |
| 44 | VoidNoArguDepthFirstVisitor::visit (Udata &n) |
| 45 | { |
| 46 | // std::string n.m_udata; |
| 47 | } |
| 48 | |
| 49 | void |
| 50 | VoidNoArguDepthFirstVisitor::visit (Tag &n) |
| 51 | { |
| 52 | // std::string n.m_tag; |
| 53 | // std::list<Ptr<Block> > n.m_attrs; |
| 54 | // std::list<Ptr<Block> > n.m_nestedBlocks; |
| 55 | BOOST_FOREACH (Ptr<Block> block, n.m_attrs) |
| 56 | { |
| 57 | block->accept (*this); |
| 58 | } |
Alexander Afanasyev | e709f3d | 2011-08-21 17:55:45 -0700 | [diff] [blame] | 59 | BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags) |
Alexander Afanasyev | 8b37905 | 2011-08-21 16:58:20 -0700 | [diff] [blame] | 60 | { |
| 61 | block->accept (*this); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | void |
| 66 | VoidNoArguDepthFirstVisitor::visit (Dtag &n) |
| 67 | { |
| 68 | // uint32_t n.m_dtag; |
| 69 | // std::list<Ptr<Block> > n.m_attrs; |
| 70 | // std::list<Ptr<Block> > n.m_nestedBlocks; |
| 71 | BOOST_FOREACH (Ptr<Block> block, n.m_attrs) |
| 72 | { |
| 73 | block->accept (*this); |
| 74 | } |
Alexander Afanasyev | e709f3d | 2011-08-21 17:55:45 -0700 | [diff] [blame] | 75 | BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags) |
Alexander Afanasyev | 8b37905 | 2011-08-21 16:58:20 -0700 | [diff] [blame] | 76 | { |
| 77 | block->accept (*this); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | void |
| 82 | VoidNoArguDepthFirstVisitor::visit (Attr &n) |
| 83 | { |
| 84 | // std::string n.m_attr; |
| 85 | // Ptr<Udata> n.m_value; |
| 86 | } |
| 87 | |
| 88 | void |
| 89 | VoidNoArguDepthFirstVisitor::visit (Dattr &n) |
| 90 | { |
| 91 | // uint32_t n.m_dattr; |
| 92 | // Ptr<Udata> n.m_value; |
| 93 | } |
| 94 | |
| 95 | void |
| 96 | VoidNoArguDepthFirstVisitor::visit (Ext &n) |
| 97 | { |
| 98 | // uint64_t n.m_extSubtype; |
| 99 | } |
| 100 | |
| 101 | } |
| 102 | } |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 103 | } |