blob: a9fb39ab28048533c73aab5db5acde4d53b2cf33 [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>
15
16namespace ndn {
17
18namespace wire { class Base; }
19
20/**
21 * @brief Pure virtual class providing an interface to work with signatures for NDN data packets
22 */
23class Signature
24{
25public:
26 /**
27 * @brief Virtual destructor
28 */
29 virtual
30 ~Signature () { }
31
32 /**
33 * @brief A double dispatch pattern to call the right wireFormatter method to format signature
34 * @param os reference to output stream
35 * @param wireFormatter a reference to a wireFormatter object
36 * @param userData any user-specific data
37 */
38 virtual void
39 doubleDispatch (std::ostream &os, wire::Base &wireFormatter, void *userData) const = 0;
40};
41
42} // ndn
43
44#endif // NDN_SIGNATURE_H