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 | |
| 12 | namespace ndn { |
| 13 | |
| 14 | namespace der { |
| 15 | |
Jeff Thompson | 736a182 | 2013-10-14 18:22:53 -0700 | [diff] [blame^] | 16 | // TODO: This is a stub. We want to implement an any type, but avoid boost::any which is not in the C++ standard library. |
| 17 | class Any { |
| 18 | public: |
| 19 | Any() {} |
| 20 | |
| 21 | template<class T> Any(const T& value) {} |
| 22 | }; |
| 23 | |
Jeff Thompson | 958bf9b | 2013-10-12 17:20:51 -0700 | [diff] [blame] | 24 | class DerBool; |
| 25 | class DerInteger; |
| 26 | class DerPrintableString; |
| 27 | class DerBitString; |
| 28 | class DerNull; |
| 29 | class DerOctetString; |
| 30 | class DerOid; |
| 31 | class DerSequence; |
| 32 | class DerGtime; |
| 33 | |
| 34 | class Visitor |
| 35 | { |
| 36 | public: |
| 37 | virtual Any visit(DerBool&, Any) = 0; |
| 38 | virtual Any visit(DerInteger&, Any) = 0; |
| 39 | virtual Any visit(DerPrintableString&, Any) = 0; |
| 40 | virtual Any visit(DerBitString&, Any) = 0; |
| 41 | virtual Any visit(DerNull&, Any) = 0; |
| 42 | virtual Any visit(DerOctetString&, Any) = 0; |
| 43 | virtual Any visit(DerOid&, Any) = 0; |
| 44 | virtual Any visit(DerSequence&, Any) = 0; |
| 45 | virtual Any visit(DerGtime&, Any) = 0; |
| 46 | }; |
| 47 | |
| 48 | } // der |
| 49 | |
| 50 | } |
| 51 | |
| 52 | #endif |