NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
NemJsonMacros.H File Reference

Go to the source code of this file.

Macros

#define NEM_JSON_UNPACK(...)   __VA_ARGS__
 
#define NEM_JSON_RDONLY_OVERRIDE(X)
 
#define NEM_JSON_RDWR_OVERRIDE(X)   X
 
#define JSONCONS_RDONLY_TO_JSON_MODE(X)   X
 
#define JSONCONS_RDWR_TO_JSON_MODE(X)   X
 
#define NEM_JSON_RDONLY_OVERRIDE_TO_JSON_MODE(X)
 
#define NEM_JSON_RDWR_OVERRIDE_TO_JSON_MODE(X)
 
#define NEM_JSON_MEMBER_NAME_IS(P1, P2, P3, Seq, Count)   NEM_JSON_MEMBER_NAME_IS_LAST(P1, P2, P3, Seq, Count)
 
#define NEM_JSON_MEMBER_NAME_IS_LAST(P1, P2, P3, Seq, Count)   if ((num_params-Count) < num_mandatory_params1 && JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_MEMBER_NAME_IS_,JSONCONS_NARGS Seq) Seq)
 
#define NEM_JSON_MEMBER_NAME_IS_2(Member, Name)   !ajson.contains(Name)) return false;
 
#define NEM_JSON_MEMBER_NAME_IS_3(Member, Name, Mode)
 
#define NEM_JSON_MEMBER_NAME_IS_4(Member, Name, Mode, Match)   NEM_JSON_MEMBER_NAME_IS_6(Member, Name, Mode, Match, , )
 
#define NEM_JSON_MEMBER_NAME_IS_5(Member, Name, Mode, Match, Into)   NEM_JSON_MEMBER_NAME_IS_6(Member, Name, Mode, Match, Into, )
 
#define NEM_JSON_MEMBER_NAME_IS_6(Member, Name, Mode, Match, Into, From)
 
#define NEM_JSON_N_MEMBER_NAME_AS(P1, P2, P3, Seq, Count)   NEM_JSON_N_MEMBER_NAME_AS_LAST(P1, P2, P3, Seq, Count)
 
#define NEM_JSON_N_MEMBER_NAME_AS_LAST(P1, P2, P3, Seq, Count)   JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_MEMBER_NAME_AS_,JSONCONS_NARGS Seq) Seq)
 
#define NEM_JSON_N_MEMBER_NAME_AS_2(Member, Name)   if (ajson.contains(Name)) {json_traits_helper<Json>::set_udt_member(ajson,Name,aval->Member);}
 
#define NEM_JSON_N_MEMBER_NAME_AS_3(Member, Name, Mode)   Mode(NEM_JSON_N_MEMBER_NAME_AS_2(Member, Name))
 
#define NEM_JSON_N_MEMBER_NAME_AS_4(Member, Name, Mode, Match)   Mode(if (ajson.contains(Name)) {json_traits_helper<Json>::set_udt_member(ajson,Name,aval->Member);})
 
#define NEM_JSON_N_MEMBER_NAME_AS_5(Member, Name, Mode, Match, Into)   Mode(if (ajson.contains(Name)) {json_traits_helper<Json>::template set_udt_member<typename std::decay<decltype(Into(((value_type*)nullptr)->Member))>::type>(ajson,Name,aval->Member);})
 
#define NEM_JSON_N_MEMBER_NAME_AS_6(Member, Name, Mode, Match, Into, From)   Mode(if (ajson.contains(Name)) {json_traits_helper<Json>::template set_udt_member<typename std::decay<decltype(Into(((value_type*)nullptr)->Member))>::type>(ajson,Name,From,aval->Member);})
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON(P1, P2, P3, Seq, Count)   NEM_JSON_N_MEMBER_NAME_TO_JSON_LAST(P1, P2, P3, Seq, Count)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_LAST(P1, P2, P3, Seq, Count)   if ((num_params-Count) < num_mandatory_params2) JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_MEMBER_NAME_TO_JSON_,JSONCONS_NARGS Seq) Seq)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_2(Member, Name)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_3(Member, Name, Mode)   NEM_JSON_N_MEMBER_NAME_TO_JSON_2(Member, Name)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_4(Member, Name, Mode, Match)   NEM_JSON_N_MEMBER_NAME_TO_JSON_6(Member, Name, Mode, Match,,)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_5(Member, Name, Mode, Match, Into)   NEM_JSON_N_MEMBER_NAME_TO_JSON_6(Member, Name, Mode, Match, Into, )
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_6(Member, Name, Mode, Match, Into, From)
 
#define NEM_JSON_N_MEMBER_NAME_TRAITS_FINAL(ValueType, ParentType, NumMandatoryParams, ...)
 
#define NEM_JSON_POLYMORPHIC_AS_RAW_PTR(BaseClass, P2, P3, DerivedClass, Count)   NEM_JSON_POLYMORPHIC_AS_RAW_PTR_LAST(BaseClass, P2, P3, DerivedClass, Count)
 
#define NEM_JSON_POLYMORPHIC_AS_RAW_PTR_LAST(BaseClass, P2, P3, DerivedClass, Count)   if (ajson.template is<DerivedClass *>()) return static_cast<BaseClass *>(ajson.template as<DerivedClass *>());
 
#define NEM_JSON_POLYMORPHIC_TO_JSON(BaseClass, P2, P3, DerivedClass, Count)   NEM_JSON_POLYMORPHIC_TO_JSON_LAST(BaseClass, P2, P3, DerivedClass, Count)
 
#define NEM_JSON_POLYMORPHIC_TO_JSON_LAST(BaseClass, P2, P3, DerivedClass, Count)   { auto p = dynamic_cast<const DerivedClass *>(ptr); if (p) { return Json(const_cast<DerivedClass *>(p)); } }
 
#define NEM_JSON_N_MEMBER_NAME_TRAITS_BASE(BaseClass, ChildClasses, NumMandatoryParams, ...)
 
#define NEM_JSON_N_MEMBER_NAME_TRAITS_INTERMEDIATE(BaseClass, ChildClasses, ParentClass, NumMandatoryParams, ...)
 
#define NEM_JSON_WRAP_SMART_PTR(BaseClass, PointerTempl)
 
#define NEM_JSON_SMART_PTR_VAL(BaseClass, PointerTempl)
 
#define NEM_JSON_GETTER_SETTER_NAME_IS(P1, P2, P3, Seq, Count)   NEM_JSON_GETTER_SETTER_NAME_IS_LAST(P1, P2, P3, Seq, Count)
 
#define NEM_JSON_GETTER_SETTER_NAME_IS_LAST(P1, P2, P3, Seq, Count)   if ((num_params-Count) < num_mandatory_params1 && JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_GETTER_SETTER_NAME_IS_,JSONCONS_NARGS Seq) Seq)
 
#define NEM_JSON_GETTER_SETTER_NAME_IS_3(Getter, Setter, Name)   !ajson.contains(Name)) return false;
 
#define NEM_JSON_GETTER_SETTER_NAME_IS_4(Getter, Setter, Name, Mode)
 
#define NEM_JSON_GETTER_SETTER_NAME_IS_5(Getter, Setter, Name, Mode, Match)   NEM_JSON_GETTER_SETTER_NAME_IS_7(Getter, Setter, Name, Mode, Match,, )
 
#define NEM_JSON_GETTER_SETTER_NAME_IS_6(Getter, Setter, Name, Mode, Match, Into)   NEM_JSON_GETTER_SETTER_NAME_IS_7(Getter, Setter, Name, Mode, Match, Into, )
 
#define NEM_JSON_GETTER_SETTER_NAME_IS_7(Getter, Setter, Name, Mode, Match, Into, From)
 
#define NEM_JSON_N_GETTER_SETTER_NAME_AS(P1, P2, P3, Seq, Count)   NEM_JSON_N_GETTER_SETTER_NAME_AS_LAST(P1, P2, P3, Seq, Count)
 
#define NEM_JSON_N_GETTER_SETTER_NAME_AS_LAST(P1, P2, P3, Seq, Count)   JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_GETTER_SETTER_NAME_AS_,JSONCONS_NARGS Seq) Seq)
 
#define NEM_JSON_N_GETTER_SETTER_NAME_AS_3(Getter, Setter, Name)   if (ajson.contains(Name)) aval->Setter(ajson.at(Name).template as<typename std::decay<decltype(aval->Getter())>::type>());
 
#define NEM_JSON_N_GETTER_SETTER_NAME_AS_4(Getter, Setter, Name, Mode)   Mode(NEM_JSON_N_GETTER_SETTER_NAME_AS_3(Getter, Setter, Name))
 
#define NEM_JSON_N_GETTER_SETTER_NAME_AS_5(Getter, Setter, Name, Mode, Match)   NEM_JSON_N_GETTER_SETTER_NAME_AS_7(Getter, Setter, Name, Mode, Match, , )
 
#define NEM_JSON_N_GETTER_SETTER_NAME_AS_6(Getter, Setter, Name, Mode, Match, Into)   NEM_JSON_N_GETTER_SETTER_NAME_AS_7(Getter, Setter, Name, Mode, Match, Into, )
 
#define NEM_JSON_N_GETTER_SETTER_NAME_AS_7(Getter, Setter, Name, Mode, Match, Into, From)   Mode(if (ajson.contains(Name)) aval->Setter(From(ajson.at(Name).template as<typename std::decay<decltype(Into(aval->Getter()))>::type>()));)
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON(P1, P2, P3, Seq, Count)   NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_LAST(P1, P2, P3, Seq, Count)
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_LAST(P1, P2, P3, Seq, Count)   JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_,JSONCONS_NARGS Seq) Seq)
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_3(Getter, Setter, Name)   ajson.try_emplace(Name, aval->Getter() );
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_4(Getter, Setter, Name, Mode)   NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_7(Getter, Setter, Name, Mode, , , )
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_5(Getter, Setter, Name, Mode, Match)   NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_7(Getter, Setter, Name, Mode, Match, , )
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_6(Getter, Setter, Name, Mode, Match, Into)   NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_7(Getter, Setter, Name, Mode, Match, Into, )
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_7(Getter, Setter, Name, Mode, Match, Into, From)   Mode ## _TO_JSON_MODE(ajson.try_emplace(Name, Into(aval->Getter()) );)
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_BASE(BaseClass, ChildClasses, NumMandatoryParams, ...)
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_INTERMEDIATE(BaseClass, ChildClasses, ParentClass, NumMandatoryParams, ...)
 
#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_FINAL(ValueType, ParentType, NumMandatoryParams, ...)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL(P1, P2, P3, Seq, Count)   NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_LAST(P1, P2, P3, Seq, Count)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_LAST(P1, P2, P3, Seq, Count)   if ((num_params-Count) < num_mandatory_params2) JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_,JSONCONS_NARGS Seq) Seq)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_2(Member, Name)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_3(Member, Name, Mode)   NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_2(Member, Name)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_4(Member, Name, Mode, Match)   NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_6(Member, Name, Mode, Match,,)
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_5(Member, Name, Mode, Match, Into)   NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_6(Member, Name, Mode, Match, Into, )
 
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_6(Member, Name, Mode, Match, Into, From)
 
#define NEM_JSON_N_MEMBER_NAME_TRAITS_VAL(ValueType, NumMandatoryParams, ...)
 
#define NEM_JSON_CHECK_KEY_ONLY(x)   true
 

Macro Definition Documentation

◆ JSONCONS_RDONLY_TO_JSON_MODE

#define JSONCONS_RDONLY_TO_JSON_MODE (   X)    X

Definition at line 41 of file NemJsonMacros.H.

◆ JSONCONS_RDWR_TO_JSON_MODE

#define JSONCONS_RDWR_TO_JSON_MODE (   X)    X

Definition at line 42 of file NemJsonMacros.H.

◆ NEM_JSON_CHECK_KEY_ONLY

#define NEM_JSON_CHECK_KEY_ONLY (   x)    true

◆ NEM_JSON_GETTER_SETTER_NAME_IS

#define NEM_JSON_GETTER_SETTER_NAME_IS (   P1,
  P2,
  P3,
  Seq,
  Count 
)    NEM_JSON_GETTER_SETTER_NAME_IS_LAST(P1, P2, P3, Seq, Count)

Definition at line 260 of file NemJsonMacros.H.

◆ NEM_JSON_GETTER_SETTER_NAME_IS_3

#define NEM_JSON_GETTER_SETTER_NAME_IS_3 (   Getter,
  Setter,
  Name 
)    !ajson.contains(Name)) return false;

Definition at line 262 of file NemJsonMacros.H.

◆ NEM_JSON_GETTER_SETTER_NAME_IS_4

#define NEM_JSON_GETTER_SETTER_NAME_IS_4 (   Getter,
  Setter,
  Name,
  Mode 
)
Value:
!ajson.contains(Name)) return false; \
if (ajson.contains(Name) && !ajson.at(Name).template is<typename std::decay<decltype(((value_type*)nullptr)->Getter())>::type>()) return false;

Definition at line 263 of file NemJsonMacros.H.

◆ NEM_JSON_GETTER_SETTER_NAME_IS_5

#define NEM_JSON_GETTER_SETTER_NAME_IS_5 (   Getter,
  Setter,
  Name,
  Mode,
  Match 
)    NEM_JSON_GETTER_SETTER_NAME_IS_7(Getter, Setter, Name, Mode, Match,, )

Definition at line 265 of file NemJsonMacros.H.

◆ NEM_JSON_GETTER_SETTER_NAME_IS_6

#define NEM_JSON_GETTER_SETTER_NAME_IS_6 (   Getter,
  Setter,
  Name,
  Mode,
  Match,
  Into 
)    NEM_JSON_GETTER_SETTER_NAME_IS_7(Getter, Setter, Name, Mode, Match, Into, )

Definition at line 266 of file NemJsonMacros.H.

◆ NEM_JSON_GETTER_SETTER_NAME_IS_7

#define NEM_JSON_GETTER_SETTER_NAME_IS_7 (   Getter,
  Setter,
  Name,
  Mode,
  Match,
  Into,
  From 
)
Value:
!ajson.contains(Name)) return false; \
JSONCONS_TRY{if (ajson.contains(Name) && !Match(ajson.at(Name).template as<typename std::decay<decltype(Into(((value_type*)nullptr)->Getter()))>::type>())) return false;} \
JSONCONS_CATCH(...) {return false;}

Definition at line 267 of file NemJsonMacros.H.

◆ NEM_JSON_GETTER_SETTER_NAME_IS_LAST

#define NEM_JSON_GETTER_SETTER_NAME_IS_LAST (   P1,
  P2,
  P3,
  Seq,
  Count 
)    if ((num_params-Count) < num_mandatory_params1 && JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_GETTER_SETTER_NAME_IS_,JSONCONS_NARGS Seq) Seq)

Definition at line 261 of file NemJsonMacros.H.

◆ NEM_JSON_MEMBER_NAME_IS

#define NEM_JSON_MEMBER_NAME_IS (   P1,
  P2,
  P3,
  Seq,
  Count 
)    NEM_JSON_MEMBER_NAME_IS_LAST(P1, P2, P3, Seq, Count)

Definition at line 46 of file NemJsonMacros.H.

◆ NEM_JSON_MEMBER_NAME_IS_2

#define NEM_JSON_MEMBER_NAME_IS_2 (   Member,
  Name 
)    !ajson.contains(Name)) return false;

Definition at line 48 of file NemJsonMacros.H.

◆ NEM_JSON_MEMBER_NAME_IS_3

#define NEM_JSON_MEMBER_NAME_IS_3 (   Member,
  Name,
  Mode 
)
Value:
!ajson.contains(Name)) return false; \
if (ajson.contains(Name) && !ajson.at(Name).template is<typename std::decay<decltype(((value_type*)nullptr)->Member)>::type>()) return false;

Definition at line 49 of file NemJsonMacros.H.

◆ NEM_JSON_MEMBER_NAME_IS_4

#define NEM_JSON_MEMBER_NAME_IS_4 (   Member,
  Name,
  Mode,
  Match 
)    NEM_JSON_MEMBER_NAME_IS_6(Member, Name, Mode, Match, , )

Definition at line 51 of file NemJsonMacros.H.

◆ NEM_JSON_MEMBER_NAME_IS_5

#define NEM_JSON_MEMBER_NAME_IS_5 (   Member,
  Name,
  Mode,
  Match,
  Into 
)    NEM_JSON_MEMBER_NAME_IS_6(Member, Name, Mode, Match, Into, )

Definition at line 52 of file NemJsonMacros.H.

◆ NEM_JSON_MEMBER_NAME_IS_6

#define NEM_JSON_MEMBER_NAME_IS_6 (   Member,
  Name,
  Mode,
  Match,
  Into,
  From 
)
Value:
!ajson.contains(Name)) return false; \
JSONCONS_TRY{if (ajson.contains(Name) && !Match(ajson.at(Name).template as<typename std::decay<decltype(Into(((value_type*)nullptr)->Member))>::type>())) return false;} \
JSONCONS_CATCH(...) {return false;}

Definition at line 53 of file NemJsonMacros.H.

◆ NEM_JSON_MEMBER_NAME_IS_LAST

#define NEM_JSON_MEMBER_NAME_IS_LAST (   P1,
  P2,
  P3,
  Seq,
  Count 
)    if ((num_params-Count) < num_mandatory_params1 && JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_MEMBER_NAME_IS_,JSONCONS_NARGS Seq) Seq)

Definition at line 47 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_AS

#define NEM_JSON_N_GETTER_SETTER_NAME_AS (   P1,
  P2,
  P3,
  Seq,
  Count 
)    NEM_JSON_N_GETTER_SETTER_NAME_AS_LAST(P1, P2, P3, Seq, Count)

Definition at line 271 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_AS_3

#define NEM_JSON_N_GETTER_SETTER_NAME_AS_3 (   Getter,
  Setter,
  Name 
)    if (ajson.contains(Name)) aval->Setter(ajson.at(Name).template as<typename std::decay<decltype(aval->Getter())>::type>());

Definition at line 273 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_AS_4

#define NEM_JSON_N_GETTER_SETTER_NAME_AS_4 (   Getter,
  Setter,
  Name,
  Mode 
)    Mode(NEM_JSON_N_GETTER_SETTER_NAME_AS_3(Getter, Setter, Name))

Definition at line 274 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_AS_5

#define NEM_JSON_N_GETTER_SETTER_NAME_AS_5 (   Getter,
  Setter,
  Name,
  Mode,
  Match 
)    NEM_JSON_N_GETTER_SETTER_NAME_AS_7(Getter, Setter, Name, Mode, Match, , )

Definition at line 275 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_AS_6

#define NEM_JSON_N_GETTER_SETTER_NAME_AS_6 (   Getter,
  Setter,
  Name,
  Mode,
  Match,
  Into 
)    NEM_JSON_N_GETTER_SETTER_NAME_AS_7(Getter, Setter, Name, Mode, Match, Into, )

Definition at line 276 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_AS_7

#define NEM_JSON_N_GETTER_SETTER_NAME_AS_7 (   Getter,
  Setter,
  Name,
  Mode,
  Match,
  Into,
  From 
)    Mode(if (ajson.contains(Name)) aval->Setter(From(ajson.at(Name).template as<typename std::decay<decltype(Into(aval->Getter()))>::type>()));)

Definition at line 277 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_AS_LAST

#define NEM_JSON_N_GETTER_SETTER_NAME_AS_LAST (   P1,
  P2,
  P3,
  Seq,
  Count 
)    JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_GETTER_SETTER_NAME_AS_,JSONCONS_NARGS Seq) Seq)

Definition at line 272 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON

#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON (   P1,
  P2,
  P3,
  Seq,
  Count 
)    NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_LAST(P1, P2, P3, Seq, Count)

Definition at line 279 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_3

#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_3 (   Getter,
  Setter,
  Name 
)    ajson.try_emplace(Name, aval->Getter() );

Definition at line 281 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_4

#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_4 (   Getter,
  Setter,
  Name,
  Mode 
)    NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_7(Getter, Setter, Name, Mode, , , )

Definition at line 282 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_5

#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_5 (   Getter,
  Setter,
  Name,
  Mode,
  Match 
)    NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_7(Getter, Setter, Name, Mode, Match, , )

Definition at line 283 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_6

#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_6 (   Getter,
  Setter,
  Name,
  Mode,
  Match,
  Into 
)    NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_7(Getter, Setter, Name, Mode, Match, Into, )

Definition at line 284 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_7

#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_7 (   Getter,
  Setter,
  Name,
  Mode,
  Match,
  Into,
  From 
)    Mode ## _TO_JSON_MODE(ajson.try_emplace(Name, Into(aval->Getter()) );)

Definition at line 285 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_LAST

#define NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_LAST (   P1,
  P2,
  P3,
  Seq,
  Count 
)    JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_GETTER_SETTER_NAME_TO_JSON_,JSONCONS_NARGS Seq) Seq)

Definition at line 280 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_BASE

#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_BASE (   BaseClass,
  ChildClasses,
  NumMandatoryParams,
  ... 
)

Definition at line 287 of file NemJsonMacros.H.

◆ NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_FINAL

#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_FINAL (   ValueType,
  ParentType,
  NumMandatoryParams,
  ... 
)

◆ NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_INTERMEDIATE

#define NEM_JSON_N_GETTER_SETTER_NAME_TRAITS_INTERMEDIATE (   BaseClass,
  ChildClasses,
  ParentClass,
  NumMandatoryParams,
  ... 
)

◆ NEM_JSON_N_MEMBER_NAME_AS

#define NEM_JSON_N_MEMBER_NAME_AS (   P1,
  P2,
  P3,
  Seq,
  Count 
)    NEM_JSON_N_MEMBER_NAME_AS_LAST(P1, P2, P3, Seq, Count)

Definition at line 57 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_AS_2

#define NEM_JSON_N_MEMBER_NAME_AS_2 (   Member,
  Name 
)    if (ajson.contains(Name)) {json_traits_helper<Json>::set_udt_member(ajson,Name,aval->Member);}

Definition at line 59 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_AS_3

#define NEM_JSON_N_MEMBER_NAME_AS_3 (   Member,
  Name,
  Mode 
)    Mode(NEM_JSON_N_MEMBER_NAME_AS_2(Member, Name))

Definition at line 61 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_AS_4

#define NEM_JSON_N_MEMBER_NAME_AS_4 (   Member,
  Name,
  Mode,
  Match 
)    Mode(if (ajson.contains(Name)) {json_traits_helper<Json>::set_udt_member(ajson,Name,aval->Member);})

Definition at line 62 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_AS_5

#define NEM_JSON_N_MEMBER_NAME_AS_5 (   Member,
  Name,
  Mode,
  Match,
  Into 
)    Mode(if (ajson.contains(Name)) {json_traits_helper<Json>::template set_udt_member<typename std::decay<decltype(Into(((value_type*)nullptr)->Member))>::type>(ajson,Name,aval->Member);})

Definition at line 64 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_AS_6

#define NEM_JSON_N_MEMBER_NAME_AS_6 (   Member,
  Name,
  Mode,
  Match,
  Into,
  From 
)    Mode(if (ajson.contains(Name)) {json_traits_helper<Json>::template set_udt_member<typename std::decay<decltype(Into(((value_type*)nullptr)->Member))>::type>(ajson,Name,From,aval->Member);})

Definition at line 66 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_AS_LAST

#define NEM_JSON_N_MEMBER_NAME_AS_LAST (   P1,
  P2,
  P3,
  Seq,
  Count 
)    JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_MEMBER_NAME_AS_,JSONCONS_NARGS Seq) Seq)

Definition at line 58 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON

#define NEM_JSON_N_MEMBER_NAME_TO_JSON (   P1,
  P2,
  P3,
  Seq,
  Count 
)    NEM_JSON_N_MEMBER_NAME_TO_JSON_LAST(P1, P2, P3, Seq, Count)

Definition at line 69 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_2

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_2 (   Member,
  Name 
)
Value:
{ajson.try_emplace(Name, aval->Member);} \
else \
{json_traits_helper<Json>::set_optional_json_member(Name, aval->Member, ajson);}

Definition at line 71 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_3

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_3 (   Member,
  Name,
  Mode 
)    NEM_JSON_N_MEMBER_NAME_TO_JSON_2(Member, Name)

Definition at line 75 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_4

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_4 (   Member,
  Name,
  Mode,
  Match 
)    NEM_JSON_N_MEMBER_NAME_TO_JSON_6(Member, Name, Mode, Match,,)

Definition at line 76 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_5

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_5 (   Member,
  Name,
  Mode,
  Match,
  Into 
)    NEM_JSON_N_MEMBER_NAME_TO_JSON_6(Member, Name, Mode, Match, Into, )

Definition at line 77 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_6

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_6 (   Member,
  Name,
  Mode,
  Match,
  Into,
  From 
)
Value:
{Mode ## _TO_JSON_MODE(ajson.try_emplace(Name, Into(aval->Member));)} \
else \
{Mode ## _TO_JSON_MODE(json_traits_helper<Json>::set_optional_json_member(Name, Into(aval->Member), ajson);)}

Definition at line 78 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_LAST

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_LAST (   P1,
  P2,
  P3,
  Seq,
  Count 
)    if ((num_params-Count) < num_mandatory_params2) JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_MEMBER_NAME_TO_JSON_,JSONCONS_NARGS Seq) Seq)

Definition at line 70 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL (   P1,
  P2,
  P3,
  Seq,
  Count 
)    NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_LAST(P1, P2, P3, Seq, Count)

Definition at line 410 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_2

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_2 (   Member,
  Name 
)
Value:
{ajson.try_emplace(Name, aval.Member);} \
else \
{json_traits_helper<Json>::set_optional_json_member(Name, aval.Member, ajson);}

Definition at line 412 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_3

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_3 (   Member,
  Name,
  Mode 
)    NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_2(Member, Name)

Definition at line 416 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_4

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_4 (   Member,
  Name,
  Mode,
  Match 
)    NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_6(Member, Name, Mode, Match,,)

Definition at line 417 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_5

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_5 (   Member,
  Name,
  Mode,
  Match,
  Into 
)    NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_6(Member, Name, Mode, Match, Into, )

Definition at line 418 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_6

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_6 (   Member,
  Name,
  Mode,
  Match,
  Into,
  From 
)
Value:
{Mode ## _TO_JSON_MODE(ajson.try_emplace(Name, Into(aval.Member));)} \
else \
{Mode ## _TO_JSON_MODE(json_traits_helper<Json>::set_optional_json_member(Name, Into(aval.Member), ajson);)}

Definition at line 419 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_LAST

#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_LAST (   P1,
  P2,
  P3,
  Seq,
  Count 
)    if ((num_params-Count) < num_mandatory_params2) JSONCONS_EXPAND(JSONCONS_CONCAT(NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL_,JSONCONS_NARGS Seq) Seq)

Definition at line 411 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TRAITS_BASE

#define NEM_JSON_N_MEMBER_NAME_TRAITS_BASE (   BaseClass,
  ChildClasses,
  NumMandatoryParams,
  ... 
)

◆ NEM_JSON_N_MEMBER_NAME_TRAITS_FINAL

#define NEM_JSON_N_MEMBER_NAME_TRAITS_FINAL (   ValueType,
  ParentType,
  NumMandatoryParams,
  ... 
)

◆ NEM_JSON_N_MEMBER_NAME_TRAITS_INTERMEDIATE

#define NEM_JSON_N_MEMBER_NAME_TRAITS_INTERMEDIATE (   BaseClass,
  ChildClasses,
  ParentClass,
  NumMandatoryParams,
  ... 
)

Definition at line 170 of file NemJsonMacros.H.

◆ NEM_JSON_N_MEMBER_NAME_TRAITS_VAL

#define NEM_JSON_N_MEMBER_NAME_TRAITS_VAL (   ValueType,
  NumMandatoryParams,
  ... 
)
Value:
JSONCONS_MEMBER_NAME_TRAITS_BASE(JSONCONS_N_MEMBER_NAME_AS, NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL, 0, ValueType,NumMandatoryParams,NumMandatoryParams, __VA_ARGS__) \
namespace jsoncons { template <> struct is_json_type_traits_declared<ValueType> : public std::true_type {}; } \
#define NEM_JSON_N_MEMBER_NAME_TO_JSON_VAL(P1, P2, P3, Seq, Count)

Definition at line 424 of file NemJsonMacros.H.

Referenced by NEM::DRV::JSON::rangeToVec().

◆ NEM_JSON_POLYMORPHIC_AS_RAW_PTR

#define NEM_JSON_POLYMORPHIC_AS_RAW_PTR (   BaseClass,
  P2,
  P3,
  DerivedClass,
  Count 
)    NEM_JSON_POLYMORPHIC_AS_RAW_PTR_LAST(BaseClass, P2, P3, DerivedClass, Count)

Definition at line 123 of file NemJsonMacros.H.

◆ NEM_JSON_POLYMORPHIC_AS_RAW_PTR_LAST

#define NEM_JSON_POLYMORPHIC_AS_RAW_PTR_LAST (   BaseClass,
  P2,
  P3,
  DerivedClass,
  Count 
)    if (ajson.template is<DerivedClass *>()) return static_cast<BaseClass *>(ajson.template as<DerivedClass *>());

Definition at line 124 of file NemJsonMacros.H.

◆ NEM_JSON_POLYMORPHIC_TO_JSON

#define NEM_JSON_POLYMORPHIC_TO_JSON (   BaseClass,
  P2,
  P3,
  DerivedClass,
  Count 
)    NEM_JSON_POLYMORPHIC_TO_JSON_LAST(BaseClass, P2, P3, DerivedClass, Count)

Definition at line 126 of file NemJsonMacros.H.

◆ NEM_JSON_POLYMORPHIC_TO_JSON_LAST

#define NEM_JSON_POLYMORPHIC_TO_JSON_LAST (   BaseClass,
  P2,
  P3,
  DerivedClass,
  Count 
)    { auto p = dynamic_cast<const DerivedClass *>(ptr); if (p) { return Json(const_cast<DerivedClass *>(p)); } }

Definition at line 127 of file NemJsonMacros.H.

◆ NEM_JSON_RDONLY_OVERRIDE

#define NEM_JSON_RDONLY_OVERRIDE (   X)

◆ NEM_JSON_RDONLY_OVERRIDE_TO_JSON_MODE

#define NEM_JSON_RDONLY_OVERRIDE_TO_JSON_MODE (   X)

Definition at line 43 of file NemJsonMacros.H.

◆ NEM_JSON_RDWR_OVERRIDE

#define NEM_JSON_RDWR_OVERRIDE (   X)    X

Definition at line 40 of file NemJsonMacros.H.

Referenced by NEM::DRV::JSON::rangeToVec().

◆ NEM_JSON_RDWR_OVERRIDE_TO_JSON_MODE

#define NEM_JSON_RDWR_OVERRIDE_TO_JSON_MODE (   X)

Definition at line 44 of file NemJsonMacros.H.

◆ NEM_JSON_SMART_PTR_VAL

#define NEM_JSON_SMART_PTR_VAL (   BaseClass,
  PointerTempl 
)
Value:
namespace jsoncons { \
template<class Json> \
struct json_type_traits<Json, PointerTempl<BaseClass>> { \
using allocator_type = typename Json::allocator_type; \
\
static bool is(const Json &ajson) noexcept { return ajson.template is<BaseClass>(); }; \
\
static PointerTempl<BaseClass> as(const Json &ajson) { \
return PointerTempl<BaseClass>(new BaseClass(ajson.template as<BaseClass>())); \
}; \
\
static Json to_json(const PointerTempl<BaseClass> &aval) { \
return aval ? Json(*aval) : Json::null(); \
} \
}; \
\
template<> \
struct is_json_type_traits_declared<PointerTempl<BaseClass>> : public std::true_type { \
}; \
} \

Definition at line 237 of file NemJsonMacros.H.

Referenced by NEM::DRV::JSON::gmshColorMapFromJSON().

◆ NEM_JSON_UNPACK

#define NEM_JSON_UNPACK (   ...)    __VA_ARGS__

Definition at line 33 of file NemJsonMacros.H.

◆ NEM_JSON_WRAP_SMART_PTR

#define NEM_JSON_WRAP_SMART_PTR (   BaseClass,
  PointerTempl 
)
Value:
namespace jsoncons { \
template<class Json> \
struct json_type_traits<Json, PointerTempl<BaseClass>> { \
using allocator_type = typename Json::allocator_type; \
\
static bool is(const Json &ajson) noexcept { return ajson.template is<BaseClass *>(); }; \
\
static PointerTempl<BaseClass> as(const Json &ajson) { \
return PointerTempl<BaseClass>(ajson.template as<BaseClass *>()); \
}; \
\
static Json to_json(const PointerTempl<BaseClass> &aval) { \
return Json(aval.get()); \
} \
}; \
\
template<> \
struct is_json_type_traits_declared<PointerTempl<BaseClass>> : public std::true_type { \
}; \
} \

Definition at line 214 of file NemJsonMacros.H.

Referenced by NEM::DRV::JSON::gmshColorMapFromJSON(), and NEM::DRV::JSON::rangeToVec().