DDS  ver. 2.0
DeleteKeyCmd.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 
6 #ifndef __DDS__DeleteKeyCmd__
7 #define __DDS__DeleteKeyCmd__
8 
9 // DDS
10 #include "BasicCmd.h"
11 
12 namespace dds
13 {
14  namespace protocol_api
15  {
16  struct SDeleteKeyCmd : public SBasicCmd<SDeleteKeyCmd>
17  {
18  SDeleteKeyCmd();
19  size_t size() const;
20  void _convertFromData(const MiscCommon::BYTEVector_t& _data);
21  void _convertToData(MiscCommon::BYTEVector_t* _data) const;
22  bool operator==(const SDeleteKeyCmd& val) const;
23 
25  void setKey(const std::string& _propID, uint64_t _taskID);
27  std::string getPropertyID() const;
29  uint64_t getTaskID() const;
30 
31  std::string m_sKey;
32  };
33  std::ostream& operator<<(std::ostream& _stream, const SDeleteKeyCmd& val);
34  bool operator!=(const SDeleteKeyCmd& lhs, const SDeleteKeyCmd& rhs);
35  }
36 }
37 
38 #endif /* defined(__DDS__DeleteKeyCmd__) */
Definition: BasicCmd.h:481
void _convertToData(MiscCommon::BYTEVector_t *_data) const
Definition: DeleteKeyCmd.cpp:34
void _convertFromData(const MiscCommon::BYTEVector_t &_data)
Definition: DeleteKeyCmd.cpp:29
void setKey(const std::string &_propID, uint64_t _taskID)
Helper function to set a key string in a form "propetrtyID.47598590403".
Definition: DeleteKeyCmd.cpp:49
uint64_t getTaskID() const
Helper function to extract task ID from key.
Definition: DeleteKeyCmd.cpp:62
std::string getPropertyID() const
Helper function to extract property ID from key.
Definition: DeleteKeyCmd.cpp:56
Definition: dds-agent/src/AgentConnectionManager.h:18
std::ostream & operator<<(std::ostream &_stream, const SAgentsInfoCmd &_val)
Definition: AgentsInfoCmd.cpp:38
SDeleteKeyCmd()
Definition: DeleteKeyCmd.cpp:14
std::string m_sKey
Definition: DeleteKeyCmd.h:31
bool operator!=(const SAgentsInfoCmd &_lhs, const SAgentsInfoCmd &_rhs)
Definition: AgentsInfoCmd.cpp:43
size_t size() const
Definition: DeleteKeyCmd.cpp:19
bool operator==(const SDeleteKeyCmd &val) const
Definition: DeleteKeyCmd.cpp:24
std::vector< unsigned char > BYTEVector_t
An STL vector of bytes.
Definition: def.h:127
Definition: DeleteKeyCmd.h:16