Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PointField.h
Go to the documentation of this file.
1 #ifndef PCL_SENSOR_MSGS_MESSAGE_POINTFIELD_H
2 #define PCL_SENSOR_MSGS_MESSAGE_POINTFIELD_H
3 #include <string>
4 #include <vector>
5 #include <ostream>
6 #include <boost/shared_ptr.hpp>
7 #include <pcl/pcl_macros.h>
8 
9 namespace sensor_msgs
10 {
11  struct PointField
12  {
13  PointField () : name (), offset (0), datatype (0), count (0)
14  {}
15 
16  std::string name;
17 
18  pcl::uint32_t offset;
19  pcl::uint8_t datatype;
20  pcl::uint32_t count;
21 
22  enum { INT8 = 1 };
23  enum { UINT8 = 2 };
24  enum { INT16 = 3 };
25  enum { UINT16 = 4 };
26  enum { INT32 = 5 };
27  enum { UINT32 = 6 };
28  enum { FLOAT32 = 7 };
29  enum { FLOAT64 = 8 };
30 
31  public:
32  typedef boost::shared_ptr< ::sensor_msgs::PointField> Ptr;
33  typedef boost::shared_ptr< ::sensor_msgs::PointField const> ConstPtr;
34  }; // struct PointField
35 
36  typedef boost::shared_ptr< ::sensor_msgs::PointField> PointFieldPtr;
37  typedef boost::shared_ptr< ::sensor_msgs::PointField const> PointFieldConstPtr;
38 
39  inline std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::PointField & v)
40  {
41  s << "name: ";
42  s << " " << v.name << std::endl;
43  s << "offset: ";
44  s << " " << v.offset << std::endl;
45  s << "datatype: ";
46  s << " " << v.datatype << std::endl;
47  s << "count: ";
48  s << " " << v.count << std::endl;
49  return (s);
50  }
51 } // namespace sensor_msgs
52 
53 #endif // PCL_SENSOR_MSGS_MESSAGE_POINTFIELD_H
54