rapidyaml 0.15.2
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches

example user container type with nested user types. More...

Public Member Functions

void check_eq (my_type const &that) const

Public Attributes

vec2< int > v2
vec3< int > v3
vec4< int > v4
my_seq_type< int > seq
my_map_type< int, int > map

Detailed Description

example user container type with nested user types.

notice all the members have user-defined serialization methods.

Definition at line 4129 of file quickstart.cpp.

Member Function Documentation

◆ check_eq()

void my_type::check_eq ( my_type const & that) const
inline

Definition at line 4138 of file quickstart.cpp.

4139 {
4140 CHECK(v2.x == that.v2.x);
4141 CHECK(v2.y == that.v2.y);
4142 CHECK(v3.x == that.v3.x);
4143 CHECK(v3.y == that.v3.y);
4144 CHECK(v3.z == that.v3.z);
4145 CHECK(v4.x == that.v4.x);
4146 CHECK(v4.y == that.v4.y);
4147 CHECK(v4.z == that.v4.z);
4148 CHECK(v4.w == that.v4.w);
4149 seq.check_eq(that.seq);
4150 map.check_eq(that.map);
4151 }
#define CHECK(predicate)
a testing assertion, used only in this quickstart
vec2< int > v2
my_map_type< int, int > map
vec3< int > v3
vec4< int > v4
my_seq_type< int > seq

Referenced by sample_user_container_types().

Member Data Documentation

◆ v2

vec2<int> my_type::v2

Definition at line 4132 of file quickstart.cpp.

Referenced by check_eq(), read(), read(), and write().

◆ v3

vec3<int> my_type::v3

Definition at line 4133 of file quickstart.cpp.

Referenced by check_eq(), read(), read(), and write().

◆ v4

vec4<int> my_type::v4

Definition at line 4134 of file quickstart.cpp.

Referenced by check_eq(), read(), read(), and write().

◆ seq

my_seq_type<int> my_type::seq

Definition at line 4136 of file quickstart.cpp.

Referenced by check_eq(), read(), read(), and write().

◆ map

my_map_type<int, int> my_type::map

Definition at line 4137 of file quickstart.cpp.

Referenced by check_eq(), read(), read(), and write().


The documentation for this struct was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/rapidyaml/checkouts/latest/samples/quickstart.cpp