oldmessagerenderer.h 1.36 KB
Newer Older
1
// Copyright (C) 2009-2015 Internet Systems Consortium, Inc. ("ISC")
2
//
3 4 5
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6

7 8
#ifndef OLDMESSAGERENDERER_H
#define OLDMESSAGERENDERER_H 1
9

10 11 12 13 14
//
// This is a copy of an older version of MessageRenderer class.  It is kept
// here to provide a benchmark target.
//

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#include <dns/messagerenderer.h>

namespace isc {
namespace dns {

class OldMessageRenderer : public AbstractMessageRenderer {
public:
    using AbstractMessageRenderer::CASE_INSENSITIVE;
    using AbstractMessageRenderer::CASE_SENSITIVE;

    /// \brief Constructor from an output buffer.
    OldMessageRenderer();

    virtual ~OldMessageRenderer();
    virtual bool isTruncated() const;
    virtual size_t getLengthLimit() const;
    virtual CompressMode getCompressMode() const;
    virtual void setTruncated();
    virtual void setLengthLimit(size_t len);
    virtual void setCompressMode(CompressMode mode);
    virtual void clear();
    virtual void writeName(const Name& name, bool compress = true);
37
    virtual void writeName(const LabelSequence& labels, bool compress);
38 39 40 41 42 43
private:
    struct MessageRendererImpl;
    MessageRendererImpl* impl_;
};
}
}
44
#endif // OLDMESSAGERENDERER_H
45

46
// Local Variables:
47
// mode: c++
48
// End: