blob: ab95b84fac92a35aaf9befdb8c320708071cc074 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "documentmessage.h"
namespace documentapi {
class FeedMessage : public DocumentMessage {
private:
string _name;
int _generation;
int _increment;
public:
/**
* Convenience typedef.
*/
using UP = std::unique_ptr<FeedMessage>;
using SP = std::shared_ptr<FeedMessage>;
public:
/**
* Constructs a new document message for deserialization.
*/
FeedMessage();
/**
* Constructs a new feed message.
*
* @param name The feed label.
* @param generation The feed generation.
* @param increment The feed increment.
*/
FeedMessage(const string& name, int generation, int increment);
/**
* Returns the name of this feed.
*
* @return The name.
*/
const string& getName() const { return _name; }
/**
* Sets the name of this feed.
*
* @param name The name to set.
*/
void setName(const string& name) { _name = name; }
/**
* Returns the generation of this feed.
*
* @return The generation.
*/
int getGeneration() const { return _generation; }
/**
* Sets the generation of this feed.
*
* @param generation The generation to set.
*/
void setGeneration(int generation) { _generation = generation; }
/**
* Returns the increment of this feed.
*
* @return The increment.
*/
int getIncrement() const { return _increment; };
/**
* Sets the increment of this feed.
*
* @param increment The increment to set.
*/
void setIncrement(int increment) { _increment = increment; };
};
}
|