parameters: (s, spec)
docstring: Writes the defclass that defines the message type
docstring_summary: Writes the defclass that defines the message type
docstring_tokens: Writes the defclass that defines the message type
function: def write_defclass(s, spec):
      "Writes the defclass that defines the message type"
      cl = message_class(spec)
      new_cl = new_message_class(spec)
      suffix = 'srv' if spec.component_type == 'service' else 'msg'
      s.write('(cl:defclass %s (roslisp-msg-protocol:ros-message)'%cl)
      with Indent(s):
          s.write('(')
          with Indent(s, inc=1, indent_first=False):
              for field in spec.parsed_fields():
                  write_slot_definition(s, field)
          s.write(')', indent=False)
      s.write(')')
      s.newline()
      s.write('(cl:defclass %s (%s)'%(new_cl, cl))
      with Indent(s):
          s.write('())')
      s.newline()
      s.write('(cl:defmethod cl:initialize-instance :after ((m %s) cl:&rest args)'%cl)
      with Indent(s):
          s.write('(cl:declare (cl:ignorable args))')
          s.write('(cl:unless (cl:typep m \'%s)'%new_cl)
          with Indent(s):
              s.write('(roslisp-msg-protocol:msg-deprecation-warning "using old message class name %s-%s:%s is deprecated: use %s-%s:%s instead.")))'%(spec.package, suffix, cl, spec.package, suffix, new_cl))
function_tokens: def write_defclass ( s , spec ) : cl = message_class ( spec ) new_cl = new_message_class ( spec ) suffix = 'srv' if spec . component_type == 'service' else 'msg' s . write ( '(cl:defclass %s (roslisp-msg-protocol:ros-message)' % cl ) with Indent ( s ) : s . write ( '(' ) with Indent ( s , inc = 1 , indent_first = False ) : for field in spec . parsed_fields ( ) : write_slot_definition ( s , field ) s . write ( ')' , indent = False ) s . write ( ')' ) s . newline ( ) s . write ( '(cl:defclass %s (%s)' % ( new_cl , cl ) ) with Indent ( s ) : s . write ( '())' ) s . newline ( ) s . write ( '(cl:defmethod cl:initialize-instance :after ((m %s) cl:&rest args)' % cl ) with Indent ( s ) : s . write ( '(cl:declare (cl:ignorable args))' ) s . write ( '(cl:unless (cl:typep m \'%s)' % new_cl ) with Indent ( s ) : s . write ( '(roslisp-msg-protocol:msg-deprecation-warning "using old message class name %s-%s:%s is deprecated: use %s-%s:%s instead.")))' % ( spec . package , suffix , cl , spec . package , suffix , new_cl ) )