blob: 634f814029fd4acfb2f3f145cd3cbf1aea932ea5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "verbatimdirective.h"
#include <vespa/vespalib/util/stringfmt.h>
namespace mbus {
VerbatimDirective::VerbatimDirective(vespalib::stringref image) :
_image(image)
{
// empty
}
VerbatimDirective::~VerbatimDirective() = default;
bool
VerbatimDirective::matches(const IHopDirective &dir) const
{
if (dir.getType() != TYPE_VERBATIM) {
return false;
}
return _image == static_cast<const VerbatimDirective&>(dir)._image;
}
string
VerbatimDirective::toString() const
{
return _image;
}
string
VerbatimDirective::toDebugString() const
{
return vespalib::make_string("VerbatimDirective(image = '%s')", _image.c_str());
}
} // mbus
|