Jeff Thompson | 958bf9b | 2013-10-12 17:20:51 -0700 | [diff] [blame] | 1 | /* -*- 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 Afanasyev | 8e96e58 | 2013-11-19 12:07:04 -0800 | [diff] [blame] | 12 | #include <ndn-cpp/common.hpp> |
| 13 | |
| 14 | #if NDN_CPP_USE_SYSTEM_BOOST |
| 15 | #include <boost/any.hpp> |
| 16 | namespace ndnboost = boost; |
| 17 | #else |
Jeff Thompson | d0a7d6d | 2013-10-15 12:34:26 -0700 | [diff] [blame] | 18 | // 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 Afanasyev | 8e96e58 | 2013-11-19 12:07:04 -0800 | [diff] [blame] | 20 | #endif |
Jeff Thompson | d0a7d6d | 2013-10-15 12:34:26 -0700 | [diff] [blame] | 21 | |
Jeff Thompson | 958bf9b | 2013-10-12 17:20:51 -0700 | [diff] [blame] | 22 | namespace ndn { |
| 23 | |
| 24 | namespace der { |
| 25 | |
Jeff Thompson | 958bf9b | 2013-10-12 17:20:51 -0700 | [diff] [blame] | 26 | class DerBool; |
| 27 | class DerInteger; |
| 28 | class DerPrintableString; |
| 29 | class DerBitString; |
| 30 | class DerNull; |
| 31 | class DerOctetString; |
| 32 | class DerOid; |
| 33 | class DerSequence; |
| 34 | class DerGtime; |
| 35 | |
| 36 | class Visitor |
| 37 | { |
| 38 | public: |
Jeff Thompson | d0a7d6d | 2013-10-15 12:34:26 -0700 | [diff] [blame] | 39 | 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 Thompson | 958bf9b | 2013-10-12 17:20:51 -0700 | [diff] [blame] | 48 | }; |
| 49 | |
| 50 | } // der |
| 51 | |
| 52 | } |
| 53 | |
| 54 | #endif |