Electroneum
demo Namespace Reference

Classes

struct  COMMAND_EXAMPLE_1
 
struct  COMMAND_EXAMPLE_2
 
struct  some_test_data
 
struct  some_test_subdata
 

Typedefs

typedef epee::misc_utils::struct_init< response_t > response
 

Functions

bool operator!= (const some_test_subdata &a, const some_test_subdata &b)
 
bool operator== (const some_test_data &a, const some_test_data &b)
 
some_test_data get_test_data ()
 

Typedef Documentation

◆ response

Definition at line 108 of file transport_defs.h.

Function Documentation

◆ get_test_data()

some_test_data demo::get_test_data ( )
inline

Definition at line 180 of file transport_defs.h.

181  {
182  some_test_data s;
183  s.m_str = "zuzuzuzuzuz";
184  s.m_uint64 = 111111111111111;
185  s.m_uint32 = 2222222;
186  s.m_uint16 = 2222;
187  s.m_uint8 = 22;
188  s.m_int64 = -111111111111111;
189  s.m_int32 = -2222222;
190  s.m_int16 = -2222;
191  s.m_int8 = -24;
192  s.m_double = 0.11111;
193  s.m_bool = true;
194  s.m_list_of_str.push_back("1112121");
195  s.m_list_of_uint64_t.push_back(1111111111);
196  s.m_list_of_uint64_t.push_back(2222222222);
197  s.m_list_of_uint32_t.push_back(1111111);
198  s.m_list_of_uint32_t.push_back(2222222);
199  s.m_list_of_uint16_t.push_back(1111);
200  s.m_list_of_uint16_t.push_back(2222);
201  s.m_list_of_uint8_t.push_back(11);
202  s.m_list_of_uint8_t.push_back(22);
203 
204 
205  s.m_list_of_int64_t.push_back(-1111111111);
206  s.m_list_of_int64_t.push_back(-222222222);
207  s.m_list_of_int32_t.push_back(-1111111);
208  s.m_list_of_int32_t.push_back(-2222222);
209  s.m_list_of_int16_t.push_back(-1111);
210  s.m_list_of_int16_t.push_back(-2222);
211  s.m_list_of_int8_t.push_back(-11);
212  s.m_list_of_int8_t.push_back(-22);
213 
214  s.m_list_of_double.push_back(0.11111);
215  s.m_list_of_double.push_back(0.22222);
216  s.m_list_of_bool.push_back(true);
217  s.m_list_of_bool.push_back(false);
218 
219  s.m_subobj.m_str = "subszzzzzzzz";
220  s.m_list_of_self.push_back(s);
221  s.m_storage_entry_int = epee::serialization::storage_entry(uint64_t(22222));;
222  s.m_storage_entry_string = epee::serialization::storage_entry(std::string("sdsvsdvs"));
223  return s;
224  }
::std::string string
Definition: gtest-port.h:1097
boost::variant< uint64_t, uint32_t, uint16_t, uint8_t, int64_t, int32_t, int16_t, int8_t, double, bool, std::string, section, array_entry > storage_entry
unsigned __int64 uint64_t
Definition: stdint.h:136

◆ operator!=()

bool demo::operator!= ( const some_test_subdata a,
const some_test_subdata b 
)

Definition at line 142 of file transport_defs.h.

143  {
144  return b.m_str != a.m_str;
145  }
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124

◆ operator==()

bool demo::operator== ( const some_test_data a,
const some_test_data b 
)

Definition at line 147 of file transport_defs.h.

148  {
149  if( b.m_str != a.m_str
150  || b.m_uint64 != a.m_uint64
151  || b.m_uint32 != a.m_uint32
152  || b.m_uint16 != a.m_uint16
153  || b.m_uint8 != a.m_uint8
154  || b.m_int64 != a.m_int64
155  || b.m_int32 != a.m_int32
156  || b.m_int16 != a.m_int16
157  || b.m_int8 != a.m_int8
158  || b.m_double != a.m_double
159  || b.m_bool != a.m_bool
160  || b.m_list_of_str != a.m_list_of_str
161  || b.m_list_of_uint64_t != a.m_list_of_uint64_t
162  || b.m_list_of_uint32_t != a.m_list_of_uint32_t
163  || b.m_list_of_uint16_t != a.m_list_of_uint16_t
164  || b.m_list_of_uint8_t != a.m_list_of_uint8_t
165  || b.m_list_of_int64_t != a.m_list_of_int64_t
166  || b.m_list_of_int32_t != a.m_list_of_int32_t
167  || b.m_list_of_int16_t != a.m_list_of_int16_t
168  || b.m_list_of_int8_t != a.m_list_of_int8_t
169  || b.m_list_of_double != a.m_list_of_double
170  || b.m_list_of_bool != a.m_list_of_bool
171  || b.m_subobj != a.m_subobj
172  || b.m_list_of_self != a.m_list_of_self
173  || b.m_storage_entry_int.which() != a.m_storage_entry_int.which()
174  || b.m_storage_entry_string.which() != a.m_storage_entry_string.which()
175  )
176  return false;
177  return true;
178  }
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
Here is the caller graph for this function: