blob: 65afc04066c218c73b55de97fcb58e2916cdd6d7 [file] [log] [blame]
Jeff Thompsonfa306642013-06-17 15:06:57 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2013, Regents of the University of California
4 * Alexander Afanasyev
5 *
6 * BSD license, See the LICENSE file for more information
7 *
8 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
9 */
10
11#ifndef NDN_SIGNATURE_H
12#define NDN_SIGNATURE_H
13
14#include <iostream>
Jeff Thompson4454bf72013-06-18 13:33:12 -070015#include <boost/shared_ptr.hpp>
Jeff Thompsonfa306642013-06-17 15:06:57 -070016
17namespace ndn {
18
19namespace wire { class Base; }
20
Jeff Thompsonfa306642013-06-17 15:06:57 -070021/**
22 * @brief Pure virtual class providing an interface to work with signatures for NDN data packets
23 */
24class Signature
25{
26public:
27 /**
28 * @brief Virtual destructor
29 */
30 virtual
31 ~Signature () { }
32
33 /**
34 * @brief A double dispatch pattern to call the right wireFormatter method to format signature
35 * @param os reference to output stream
36 * @param wireFormatter a reference to a wireFormatter object
37 * @param userData any user-specific data
38 */
39 virtual void
40 doubleDispatch (std::ostream &os, wire::Base &wireFormatter, void *userData) const = 0;
41};
42
43} // ndn
44
45#endif // NDN_SIGNATURE_H