libzeep

PrevUpHomeNext

Struct template value_serializer<, >

zeep::value_serializer<T, std::enable_if_t< std::is_enum_v< T > >> — value_serializer for enum values

Synopsis

// In header: <zeep/value-serializer.hpp>

template<typename T> 
struct value_serializer<, > {
  // types
  typedef           ;      
  typedef  ;

  // public static functions
   (, 
                   );
   ();
  value_serializer & ( = );
   ();
   ();
   ();
   ();

  // public member functions
  value_serializer & (, );
  value_serializer & (, );

  // public data members
   m_type_name;
   m_value_map;
};

Description

This class is used to (de-)serialize enum values. To map enum values to a string you should use the singleton instance accessible through instance() and then call the operator() members assinging each of the enum values with their respective string.

A recent addition is the init() call to initialize the instance

value_serializer public static functions

  1.  ( name, 
                      values);
    Initialize a new instance of value_serializer for this enum, with name and a set of name/value pairs.
  2.  ( values);
    Initialize a new anonymous instance of value_serializer for this enum with a set of name/value pairs.
  3. value_serializer & ( name = );
  4.  ();
  5.  ( value);
  6.  ( value);
  7.  ();

value_serializer public member functions

  1. value_serializer & ( v,  name);
  2. value_serializer & ( name,  v);

PrevUpHomeNext