blob: 06c469f3e8846892ce6d5788e11fa15a74881d73 [file] [log] [blame]
Jeff Thompson958bf9b2013-10-12 17:20:51 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (C) 2013 Regents of the University of California.
4 * @author: Yingdi Yu <yingdi@cs.ucla.edu>
5 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
6 * See COPYING for copyright and distribution information.
7 */
8
9#ifndef NDN_DER_VISITOR_HPP
10#define NDN_DER_VISITOR_HPP
11
Alexander Afanasyev8e96e582013-11-19 12:07:04 -080012#include <ndn-cpp/common.hpp>
13
14#if NDN_CPP_USE_SYSTEM_BOOST
15#include <boost/any.hpp>
16namespace ndnboost = boost;
17#else
Jeff Thompsond0a7d6d2013-10-15 12:34:26 -070018// We can use ndnboost::any because this is an internal header and will not conflict with the application if it uses boost::any.
19#include <ndnboost/any.hpp>
Alexander Afanasyev8e96e582013-11-19 12:07:04 -080020#endif
Jeff Thompsond0a7d6d2013-10-15 12:34:26 -070021
Jeff Thompson958bf9b2013-10-12 17:20:51 -070022namespace ndn {
23
24namespace der {
25
Jeff Thompson958bf9b2013-10-12 17:20:51 -070026class DerBool;
27class DerInteger;
28class DerPrintableString;
29class DerBitString;
30class DerNull;
31class DerOctetString;
32class DerOid;
33class DerSequence;
34class DerGtime;
35
36class Visitor
37{
38public:
Jeff Thompsond0a7d6d2013-10-15 12:34:26 -070039 virtual ndnboost::any visit(DerBool&, ndnboost::any) = 0;
40 virtual ndnboost::any visit(DerInteger&, ndnboost::any) = 0;
41 virtual ndnboost::any visit(DerPrintableString&, ndnboost::any) = 0;
42 virtual ndnboost::any visit(DerBitString&, ndnboost::any) = 0;
43 virtual ndnboost::any visit(DerNull&, ndnboost::any) = 0;
44 virtual ndnboost::any visit(DerOctetString&, ndnboost::any) = 0;
45 virtual ndnboost::any visit(DerOid&, ndnboost::any) = 0;
46 virtual ndnboost::any visit(DerSequence&, ndnboost::any) = 0;
47 virtual ndnboost::any visit(DerGtime&, ndnboost::any) = 0;
Jeff Thompson958bf9b2013-10-12 17:20:51 -070048};
49
50} // der
51
52}
53
54#endif