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 | |
| 16 | // TODO: We want to implement an any type, but avoid boost::any which is not in the C++ standard library. |
| 17 | typedef void *Any; |
| 18 | |
| 19 | class DerBool; |
| 20 | class DerInteger; |
| 21 | class DerPrintableString; |
| 22 | class DerBitString; |
| 23 | class DerNull; |
| 24 | class DerOctetString; |
| 25 | class DerOid; |
| 26 | class DerSequence; |
| 27 | class DerGtime; |
| 28 | |
| 29 | class Visitor |
| 30 | { |
| 31 | public: |
| 32 | virtual Any visit(DerBool&, Any) = 0; |
| 33 | virtual Any visit(DerInteger&, Any) = 0; |
| 34 | virtual Any visit(DerPrintableString&, Any) = 0; |
| 35 | virtual Any visit(DerBitString&, Any) = 0; |
| 36 | virtual Any visit(DerNull&, Any) = 0; |
| 37 | virtual Any visit(DerOctetString&, Any) = 0; |
| 38 | virtual Any visit(DerOid&, Any) = 0; |
| 39 | virtual Any visit(DerSequence&, Any) = 0; |
| 40 | virtual Any visit(DerGtime&, Any) = 0; |
| 41 | }; |
| 42 | |
| 43 | } // der |
| 44 | |
| 45 | } |
| 46 | |
| 47 | #endif |