blob: 45d0bfda872cde2def9b346bc9283d72054ad7ff [file] [log] [blame]
Jeff Thompsone37aa212013-10-17 17:53:23 -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_PRINT_VISITOR_HPP
10#define NDN_PRINT_VISITOR_HPP
11
12#include <vector>
13#include <string>
14#include "void-visitor.hpp"
15
16namespace ndn {
17
18namespace der {
19
20class PrintVisitor : public VoidVisitor {
21public:
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
32private:
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