diff --git a/docs/md/checkpoint_learn_example_traversal.md b/docs/md/checkpoint_learn_example_traversal.md index 4e967a56..ed689b05 100644 --- a/docs/md/checkpoint_learn_example_traversal.md +++ b/docs/md/checkpoint_learn_example_traversal.md @@ -5,4 +5,3 @@ The full code for this *magistrate* example can be found here: \subsubsection ex7 Example source code: \snippet examples/checkpoint_example_traversal.cc Serialization with custom traverser - diff --git a/docs/md/checkpoint_learn_example_user_traits.md b/docs/md/checkpoint_learn_example_user_traits.md new file mode 100644 index 00000000..0a43f309 --- /dev/null +++ b/docs/md/checkpoint_learn_example_user_traits.md @@ -0,0 +1,9 @@ +\page cpkt_learn_user_traits Program Example User Traits + +The full code for this *magistrate* example can be found here: +`examples/checkpoint_example_user_traits.cc` + +\subsubsection user_traits Example source code: +\snippet examples/checkpoint_example_user_traits.h Serialization with user traits (header) +\snippet examples/checkpoint_example_user_traits.cc Serialization with user traits + diff --git a/docs/md/checkpoint_learn_examples.md b/docs/md/checkpoint_learn_examples.md index 27551159..781edae7 100644 --- a/docs/md/checkpoint_learn_examples.md +++ b/docs/md/checkpoint_learn_examples.md @@ -9,6 +9,7 @@ | checkpoint_example_5_polymorphic | Serialization of polymorphic class hierarchy | \subpage ckpt_learn_ex5_polymorphic | | checkpoint_example_6_polymorphic_macro | Serialization of polymorphic class hierarchy with macros | \subpage ckpt_learn_ex6_polymorphic_macro | | checkpoint_example_7_traversal | Serialization with custom traverser | \subpage ckpt_learn_ex7_traversal | +| checkpoint_example_user_traits | Serialization with user traits | \subpage cpkt_learn_user_traits |     diff --git a/examples/checkpoint_example_user_traits.cc b/examples/checkpoint_example_user_traits.cc index ba4bbb9a..782e2a0d 100644 --- a/examples/checkpoint_example_user_traits.cc +++ b/examples/checkpoint_example_user_traits.cc @@ -40,6 +40,9 @@ // ***************************************************************************** //@HEADER */ + +/// [Serialization with user traits] + #include "checkpoint/checkpoint.h" #include "checkpoint_example_user_traits.h" @@ -59,3 +62,5 @@ int main(int, char**){ auto s_info_h = checkpoint::serialize(obj); auto s_info_i = checkpoint::serialize(obj); } + +/// [Serialization with user traits] diff --git a/examples/checkpoint_example_user_traits.h b/examples/checkpoint_example_user_traits.h index dd264f61..0c55b3fe 100644 --- a/examples/checkpoint_example_user_traits.h +++ b/examples/checkpoint_example_user_traits.h @@ -44,6 +44,8 @@ #if !defined INCLUDED_EXAMPLES_CHECKPOINT_EXAMPLE_USER_TRAITS_H #define INCLUDED_EXAMPLES_CHECKPOINT_EXAMPLE_USER_TRAITS_H +/// [Serialization with user traits (header)] + #include struct checkpoint_trait {} CheckpointTrait; @@ -154,4 +156,6 @@ namespace misc { } } +/// [Serialization with user traits (header)] + #endif /*INCLUDED_EXAMPLES_CHECKPOINT_EXAMPLE_USER_TRAITS_H*/