blob: 439bf93b7c3c52b4138a4662b585d1bcfdeaedc5 [file] [log] [blame]
Alexander Afanasyev8b379052011-08-21 16:58:20 -07001/* -*- 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 Afanasyev2b4c9472012-08-09 15:00:38 -070021#include "void-no-argu-depth-first-visitor.h"
Alexander Afanasyev8b379052011-08-21 16:58:20 -070022
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070023#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 Afanasyev8b379052011-08-21 16:58:20 -070030
31#include <boost/foreach.hpp>
32
33namespace ns3 {
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070034namespace ndn {
Alexander Afanasyev8b379052011-08-21 16:58:20 -070035namespace CcnbParser {
36
37void
38VoidNoArguDepthFirstVisitor::visit (Blob &n)
39{
40 // Buffer n.m_blob;
41}
42
43void
44VoidNoArguDepthFirstVisitor::visit (Udata &n)
45{
46 // std::string n.m_udata;
47}
48
49void
50VoidNoArguDepthFirstVisitor::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 Afanasyeve709f3d2011-08-21 17:55:45 -070059 BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
Alexander Afanasyev8b379052011-08-21 16:58:20 -070060 {
61 block->accept (*this);
62 }
63}
64
65void
66VoidNoArguDepthFirstVisitor::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 Afanasyeve709f3d2011-08-21 17:55:45 -070075 BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
Alexander Afanasyev8b379052011-08-21 16:58:20 -070076 {
77 block->accept (*this);
78 }
79}
80
81void
82VoidNoArguDepthFirstVisitor::visit (Attr &n)
83{
84 // std::string n.m_attr;
85 // Ptr<Udata> n.m_value;
86}
87
88void
89VoidNoArguDepthFirstVisitor::visit (Dattr &n)
90{
91 // uint32_t n.m_dattr;
92 // Ptr<Udata> n.m_value;
93}
94
95void
96VoidNoArguDepthFirstVisitor::visit (Ext &n)
97{
98 // uint64_t n.m_extSubtype;
99}
100
101}
102}
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -0700103}