Handle.h
Go to the documentation of this file.
1
9/*====================================================================================================================*/
10/*== Guards, Includes ==============================================================================================*/
11/*====================================================================================================================*/
12
13// INCLUDE GUARDS
14//
15#ifndef LIBPF_USER_HANDLE_H
16#define LIBPF_USER_HANDLE_H
17
18/* SYSTEM INCLUDES */
19//
20#include <string>
21#include <memory>
22
23/* PROJECT INCLUDES */
24//
25
26/* LOCAL INCLUDES */
27//
28
29/* FORWARD REFERENCES */
30//
31
32namespace Libpf {
33namespace User {
34
35/*====================================================================================================================*/
36/*== class Handle declaration =======================================================================================*/
37/*====================================================================================================================*/
38
43class Handle {
44private:
45 struct Private;
46 std::unique_ptr<Private> d;
47public:
48#ifndef SWIG
50 Handle(int id, std::string uuid, std::string type, std::string tag, std::string description, double created_at, double modified_at);
52 Handle(int id);
53#endif
55 Handle(std::string uuid);
57 Handle(const Handle &source);
59 Handle& operator=(const Handle &source);
61 Handle(void);
63 ~Handle(void);
64
66 int id() const;
68 std::string toString() const;
70 std::string type() const;
72 std::string tag() const;
74 std::string description() const;
76 double created_at() const;
78 double modified_at() const;
79
81 bool operator<(const Handle &rhs) const;
83 bool isValid(void) const;
84}; // class Handle
85
86} // namespace User
87} // namespace Libpf
88
89#endif // LIBPF_USER_HANDLE_H
Opaque pointer to a server-side resource i.e. a Case object.
Definition: Handle.h:43
Handle(std::string uuid)
construct from internal representation
std::string toString() const
bool operator<(const Handle &rhs) const
required to have Handles as keys in std::maps
Handle & operator=(const Handle &source)
assignment
double created_at() const
double modified_at() const
std::string type() const
~Handle(void)
destructor
Handle(int id, std::string uuid, std::string type, std::string tag, std::string description, double created_at, double modified_at)
construct from std::string
Handle(void)
default constructor, constructs an invalid object
bool isValid(void) const
client-side validation
Handle(int id)
construct from internal database id
std::string tag() const
Handle(const Handle &source)
copy constructor
std::string description() const
const std::string & uuid(void)
Definition: Case.h:35