rapidyaml  0.16.0
parseandemitYAML,anddoitfast
my_map_type< K, V > Struct Template Reference

example user container type: map-like More...

Public Member Functions

void check_eq (my_map_type const &that) const
 

Public Attributes

std::map< K, V > map_member
 

Detailed Description

template<class K, class V>
struct my_map_type< K, V >

example user container type: map-like

Definition at line 4190 of file quickstart.cpp.

Member Function Documentation

template<class K, class V>
void my_map_type< K, V >::check_eq ( my_map_type< K, V > const &  that) const
inline

Definition at line 4193 of file quickstart.cpp.

Referenced by my_type::check_eq().

4194  {
4195  CHECK(map_member.size() == that.map_member.size());
4196  if(map_member.size() == that.map_member.size())
4197  {
4198  for(auto const& itthat : that.map_member)
4199  {
4200  auto it = map_member.find(itthat.first);
4201  CHECK(it != map_member.end());
4202  if(it != map_member.end())
4203  CHECK(it->second == itthat.second);
4204  }
4205  }
4206  }
std::map< K, V > map_member
#define CHECK(predicate)
a testing assertion, used only in this quickstart
Definition: quickstart.cpp:310

Member Data Documentation

template<class K, class V>
std::map<K, V> my_map_type< K, V >::map_member

Definition at line 4192 of file quickstart.cpp.

Referenced by my_map_type< int, int >::check_eq(), read(), and write().


The documentation for this struct was generated from the following file: