blob: 4401fe1c91181eb96882db454a5291d16f96b460 (
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
37
38
39
40
41
42
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "ihopdirective.h"
namespace mbus {
/**
* This class represents a verbatim match within a {@link Hop}'s selector. This is nothing more than a string that will
* be used as-is when performing service name lookups.
*
* @author Simon Thoresen Hult
* @version $Id$
*/
class VerbatimDirective : public IHopDirective {
private:
string _image;
public:
/**
* Constructs a new verbatim selector item for a given image.
*
* @param image The image to assign to this.
*/
VerbatimDirective(vespalib::stringref image);
~VerbatimDirective() override;
/**
* Returns the image to which this is a verbatim match.
*
* @return The image.
*/
const string &getImage() const { return _image; }
Type getType() const override { return TYPE_VERBATIM; }
bool matches(const IHopDirective &dir) const override;
string toString() const override;
string toDebugString() const override;
};
} // mbus
|