Cryptolens Client API for C++
DataObject.hpp
1 #pragma once
2 
3 #include <string>
4 
5 namespace cryptolens_io {
6 
7 namespace v20190401 {
8 
9 // An immutable class representing an Cryptolens Data Object
10 class DataObject {
11 private:
12  int id_;
13  std::string name_;
14  std::string string_value_;
15  int int_value_;
16 public:
18  ( int id
19  , std::string name
20  , std::string string_value
21  , int int_value
22  )
23  : id_(id)
24  , name_(std::move(name))
25  , string_value_(std::move(string_value))
26  , int_value_(int_value)
27  {
28  // TODO: Check requirements on max length of name and string_value
29  // (Not really neccessary when we are just parsing requests from
30  // the server, though)
31  }
32 
33  // Returns the Id of the data object
34  int get_id() const;
35 
36  // Returns the name of the data object
37  std::string const& get_name() const;
38 
39  // Returns the string value of the data object
40  std::string const& get_string_value() const;
41 
42  // Returns the integer value of the data object
43  int get_int_value() const;
44 };
45 
46 } // namespace v20190401
47 
48 namespace v20180502 {
49 
51 
52 } // namespace v20180502
53 
54 namespace latest {
55 
57 
58 } // namespace latest
59 
60 } // namespace cryptolens_io
Definition: ActivateError.hpp:5
Definition: DataObject.hpp:10