Lightstreamer C++ Client SDK
Loading...
Searching...
No Matches
ItemUpdate.h
1#ifndef INCLUDED_Lightstreamer_ItemUpdate
2#define INCLUDED_Lightstreamer_ItemUpdate
3
4#include "../Lightstreamer.h"
5
6namespace Lightstreamer {
7
33 HaxeObject _delegate;
34public:
35 ItemUpdate() = delete;
36 ItemUpdate(const ItemUpdate&) = delete;
37 ItemUpdate& operator=(const ItemUpdate&) = delete;
38
40 explicit ItemUpdate(HaxeObject hxObj) : _delegate(hxObj) {}
41
42 ~ItemUpdate() {
43 Lightstreamer_releaseHaxeObject(_delegate);
44 }
52 std::string getItemName() {
53 return ItemUpdate_getItemName(_delegate);
54 }
62 int getItemPos() {
63 return ItemUpdate_getItemPos(_delegate);
64 }
81 std::string getValue(const std::string& fieldName) {
82 return ItemUpdate_getValueByName(_delegate, &fieldName);
83 }
101 std::string getValue(int fieldPos) {
102 return ItemUpdate_getValueByPos(_delegate, fieldPos);
103 }
117 bool isNull(const std::string& fieldName) {
118 return ItemUpdate_isNullByName(_delegate, &fieldName);
119 }
133 bool isNull(int fieldPos) {
134 return ItemUpdate_isNullByPos(_delegate, fieldPos);
135 }
158 bool isSnapshot() {
159 return ItemUpdate_isSnapshot(_delegate);
160 }
184 bool isValueChanged(const std::string& fieldName) {
185 return ItemUpdate_isValueChangedByName(_delegate, &fieldName);
186 }
211 bool isValueChanged(int fieldPos) {
212 return ItemUpdate_isValueChangedByPos(_delegate, fieldPos);
213 }
230 std::map<std::string, std::string> getChangedFields() {
231 return ItemUpdate_getChangedFields(_delegate);
232 }
247 std::map<int, std::string> getChangedFieldsByPosition() {
248 return ItemUpdate_getChangedFieldsByPosition(_delegate);
249 }
261 std::map<std::string, std::string> getFields() {
262 return ItemUpdate_getFields(_delegate);
263 }
273 std::map<int, std::string> getFieldsByPosition() {
274 return ItemUpdate_getFieldsByPosition(_delegate);
275 }
276};
277
278} // namespace Lightstreamer
279
280
281#endif // INCLUDED_Lightstreamer_ItemUpdate
Contains all the information related to an update of the field values for an item.
Definition ItemUpdate.h:32
bool isNull(const std::string &fieldName)
Returns whether the current value received from the Server for the specified field is null.
Definition ItemUpdate.h:117
std::string getValue(int fieldPos)
Returns the current value for the specified field.
Definition ItemUpdate.h:101
std::string getValue(const std::string &fieldName)
Returns the current value for the specified field.
Definition ItemUpdate.h:81
std::string getItemName()
Inquiry method that retrieves the name of the item to which this update pertains.
Definition ItemUpdate.h:52
bool isValueChanged(int fieldPos)
Inquiry method that asks whether the value for a field has changed after the reception of the last up...
Definition ItemUpdate.h:211
bool isValueChanged(const std::string &fieldName)
Inquiry method that asks whether the value for a field has changed after the reception of the last up...
Definition ItemUpdate.h:184
int getItemPos()
Inquiry method that retrieves the position in the "Item List" or "Item Group" of the item to which th...
Definition ItemUpdate.h:62
std::map< int, std::string > getChangedFieldsByPosition()
Returns a map containing the values for each field changed with the last server update.
Definition ItemUpdate.h:247
bool isNull(int fieldPos)
Returns whether the current value received from the Server for the specified field is null.
Definition ItemUpdate.h:133
std::map< std::string, std::string > getChangedFields()
Returns a map containing the values for each field changed with the last server update.
Definition ItemUpdate.h:230
std::map< std::string, std::string > getFields()
Returns a map containing the values for each field in the Subscription.
Definition ItemUpdate.h:261
std::map< int, std::string > getFieldsByPosition()
Returns a map containing the values for each field in the Subscription.
Definition ItemUpdate.h:273
bool isSnapshot()
Inquiry method that asks whether the current update belongs to the item snapshot (which carries the c...
Definition ItemUpdate.h:158