;; Auto-generated. Do not edit!


(when (boundp 'detect_targets::component_center)
  (if (not (find-package "DETECT_TARGETS"))
    (make-package "DETECT_TARGETS"))
  (shadow 'component_center (find-package "DETECT_TARGETS")))
(unless (find-package "DETECT_TARGETS::COMPONENT_CENTER")
  (make-package "DETECT_TARGETS::COMPONENT_CENTER"))

(in-package "ROS")
;;//! \htmlinclude component_center.msg.html


(defclass detect_targets::component_center
  :super ros::object
  :slots (_label _nb_vertex _x _y ))

(defmethod detect_targets::component_center
  (:init
   (&key
    ((:label __label) 0)
    ((:nb_vertex __nb_vertex) 0)
    ((:x __x) 0.0)
    ((:y __y) 0.0)
    )
   (send-super :init)
   (setq _label (round __label))
   (setq _nb_vertex (round __nb_vertex))
   (setq _x (float __x))
   (setq _y (float __y))
   self)
  (:label
   (&optional __label)
   (if __label (setq _label __label)) _label)
  (:nb_vertex
   (&optional __nb_vertex)
   (if __nb_vertex (setq _nb_vertex __nb_vertex)) _nb_vertex)
  (:x
   (&optional __x)
   (if __x (setq _x __x)) _x)
  (:y
   (&optional __y)
   (if __y (setq _y __y)) _y)
  (:serialization-length
   ()
   (+
    ;; int64 _label
    8
    ;; int64 _nb_vertex
    8
    ;; float64 _x
    8
    ;; float64 _y
    8
    ))
  (:serialize
   (&optional strm)
   (let ((s (if strm strm
              (make-string-output-stream (send self :serialization-length)))))
     ;; int64 _label
#+(or :alpha :irix6 :x86_64)
       (progn (sys::poke _label (send s :buffer) (send s :count) :long) (incf (stream-count s) 8))
#-(or :alpha :irix6 :x86_64)
       (cond ((and (class _label) (= (length (_label . bv)) 2)) ;; bignum
              (write-long (ash (elt (_label . bv) 0) 0) s)
              (write-long (ash (elt (_label . bv) 1) -1) s))
             ((and (class _label) (= (length (_label . bv)) 1)) ;; big1
              (write-long (elt (_label . bv) 0) s)
              (write-long (if (>= _label 0) 0 #xffffffff) s))
             (t                                         ;; integer
              (write-long _label s)(write-long (if (>= _label 0) 0 #xffffffff) s)))
     ;; int64 _nb_vertex
#+(or :alpha :irix6 :x86_64)
       (progn (sys::poke _nb_vertex (send s :buffer) (send s :count) :long) (incf (stream-count s) 8))
#-(or :alpha :irix6 :x86_64)
       (cond ((and (class _nb_vertex) (= (length (_nb_vertex . bv)) 2)) ;; bignum
              (write-long (ash (elt (_nb_vertex . bv) 0) 0) s)
              (write-long (ash (elt (_nb_vertex . bv) 1) -1) s))
             ((and (class _nb_vertex) (= (length (_nb_vertex . bv)) 1)) ;; big1
              (write-long (elt (_nb_vertex . bv) 0) s)
              (write-long (if (>= _nb_vertex 0) 0 #xffffffff) s))
             (t                                         ;; integer
              (write-long _nb_vertex s)(write-long (if (>= _nb_vertex 0) 0 #xffffffff) s)))
     ;; float64 _x
       (sys::poke _x (send s :buffer) (send s :count) :double) (incf (stream-count s) 8)
     ;; float64 _y
       (sys::poke _y (send s :buffer) (send s :count) :double) (incf (stream-count s) 8)
     ;;
     (if (null strm) (get-output-stream-string s))))
  (:deserialize
   (buf &optional (ptr- 0))
   ;; int64 _label
#+(or :alpha :irix6 :x86_64)
      (setf _label (prog1 (sys::peek buf ptr- :long) (incf ptr- 8)))
#-(or :alpha :irix6 :x86_64)
      (setf _label (let ((b0 (prog1 (sys::peek buf ptr- :integer) (incf ptr- 4)))
                  (b1 (prog1 (sys::peek buf ptr- :integer) (incf ptr- 4))))
              (cond ((= b1 -1) b0)
                     ((and (= b1  0)
                           (<= lisp::most-negative-fixnum b0 lisp::most-positive-fixnum))
                      b0)
                    ((= b1  0) (make-instance bignum :size 1 :bv (integer-vector b0)))
                    (t (make-instance bignum :size 2 :bv (integer-vector b0 (ash b1 1)))))))
   ;; int64 _nb_vertex
#+(or :alpha :irix6 :x86_64)
      (setf _nb_vertex (prog1 (sys::peek buf ptr- :long) (incf ptr- 8)))
#-(or :alpha :irix6 :x86_64)
      (setf _nb_vertex (let ((b0 (prog1 (sys::peek buf ptr- :integer) (incf ptr- 4)))
                  (b1 (prog1 (sys::peek buf ptr- :integer) (incf ptr- 4))))
              (cond ((= b1 -1) b0)
                     ((and (= b1  0)
                           (<= lisp::most-negative-fixnum b0 lisp::most-positive-fixnum))
                      b0)
                    ((= b1  0) (make-instance bignum :size 1 :bv (integer-vector b0)))
                    (t (make-instance bignum :size 2 :bv (integer-vector b0 (ash b1 1)))))))
   ;; float64 _x
     (setq _x (sys::peek buf ptr- :double)) (incf ptr- 8)
   ;; float64 _y
     (setq _y (sys::peek buf ptr- :double)) (incf ptr- 8)
   ;;
   self)
  )

(setf (get detect_targets::component_center :md5sum-) "da1879b15a6566f498d1395c2d529084")
(setf (get detect_targets::component_center :datatype-) "detect_targets/component_center")
(setf (get detect_targets::component_center :definition-)
      "int64   label
int64   nb_vertex
float64 x
float64 y

")



(provide :detect_targets/component_center "da1879b15a6566f498d1395c2d529084")


