parameters: (s, class_name, cpp_msg, value)
docstring: Writes a class trait for traits which have static value() members that return const char*
      
      e.g. write_trait_char_class(s, "MD5Sum", "std_srvs::Empty", "hello") yields:
      template<>
      struct MD5Sum<std_srvs::Empty> 
      {
          static const char* value() { return "hello"; }
          static const char* value(const std_srvs::Empty&) { return value(); }
      };
      
      @param s: The stream to write to
      @type s: stream
      @param class_name: The name of the trait class
      @type class_name: str
      @param cpp_msg: The C++ message declaration, e.g. "std_srvs::Empty"
      @type cpp_msg: str
      @param value: The string value to return from the value() function
      @type value: str
docstring_summary: Writes a class trait for traits which have static value() members that return const char*
      
      e.g. write_trait_char_class(s, "MD5Sum", "std_srvs::Empty", "hello") yields:
      template<>
      struct MD5Sum<std_srvs::Empty> 
      {
          static const char* value() { return "hello"; }
          static const char* value(const std_srvs::Empty&) { return value(); }
      };
docstring_tokens: Writes a class trait for traits which have static value () members that return const char * e . g . write_trait_char_class ( s MD5Sum std_srvs :: Empty hello ) yields : template< > struct MD5Sum<std_srvs :: Empty > { static const char * value () { return hello ; } static const char * value ( const std_srvs :: Empty& ) { return value () ; } } ;
function: def write_trait_char_class(s, class_name, cpp_msg, value):
      """
      Writes a class trait for traits which have static value() members that return const char*
      
      e.g. write_trait_char_class(s, "MD5Sum", "std_srvs::Empty", "hello") yields:
      template<>
      struct MD5Sum<std_srvs::Empty> 
      {
          static const char* value() { return "hello"; }
          static const char* value(const std_srvs::Empty&) { return value(); }
      };
      
      @param s: The stream to write to
      @type s: stream
      @param class_name: The name of the trait class
      @type class_name: str
      @param cpp_msg: The C++ message declaration, e.g. "std_srvs::Empty"
      @type cpp_msg: str
      @param value: The string value to return from the value() function
      @type value: str
      """
      s.write('template<>\nstruct %s<%s> {\n'%(class_name, cpp_msg))
      s.write('  static const char* value() \n  {\n    return "%s";\n  }\n\n'%(value))
      s.write('  static const char* value(const %s&) { return value(); } \n'%(cpp_msg))
      s.write('};\n\n')
function_tokens: def write_trait_char_class ( s , class_name , cpp_msg , value ) : s . write ( 'template<>\nstruct %s<%s> {\n' % ( class_name , cpp_msg ) ) s . write ( '  static const char* value() \n  {\n    return "%s";\n  }\n\n' % ( value ) ) s . write ( '  static const char* value(const %s&) { return value(); } \n' % ( cpp_msg ) ) s . write ( '};\n\n' )