Jeff Thompson | e37aa21 | 2013-10-17 17:53:23 -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_PRINT_VISITOR_HPP |
| 10 | #define NDN_PRINT_VISITOR_HPP |
| 11 | |
| 12 | #include <vector> |
| 13 | #include <string> |
| 14 | #include "void-visitor.hpp" |
| 15 | |
| 16 | namespace ndn { |
| 17 | |
| 18 | namespace der { |
| 19 | |
| 20 | class PrintVisitor : public VoidVisitor { |
| 21 | public: |
| 22 | virtual void visit(DerBool&, ndnboost::any); |
| 23 | virtual void visit(DerInteger&, ndnboost::any); |
| 24 | virtual void visit(DerPrintableString&, ndnboost::any); |
| 25 | virtual void visit(DerBitString&, ndnboost::any); |
| 26 | virtual void visit(DerNull&, ndnboost::any); |
| 27 | virtual void visit(DerOctetString&, ndnboost::any); |
| 28 | virtual void visit(DerOid&, ndnboost::any); |
| 29 | virtual void visit(DerSequence&, ndnboost::any); |
| 30 | virtual void visit(DerGtime&, ndnboost::any); |
| 31 | |
| 32 | private: |
| 33 | static void printData(const std::vector<uint8_t>& blob, const std::string& indent, int offset = 0); |
| 34 | }; |
| 35 | |
| 36 | } // der |
| 37 | |
| 38 | } |
| 39 | |
| 40 | #endif |