Go to the documentation of this file.00001
00002 #ifndef NAO_MSGS_MESSAGE_WORDRECOGNIZED_H
00003 #define NAO_MSGS_MESSAGE_WORDRECOGNIZED_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017
00018 namespace nao_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct WordRecognized_ {
00022 typedef WordRecognized_<ContainerAllocator> Type;
00023
00024 WordRecognized_()
00025 : words()
00026 , confidence_values()
00027 {
00028 }
00029
00030 WordRecognized_(const ContainerAllocator& _alloc)
00031 : words(_alloc)
00032 , confidence_values(_alloc)
00033 {
00034 }
00035
00036 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _words_type;
00037 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > words;
00038
00039 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _confidence_values_type;
00040 std::vector<float, typename ContainerAllocator::template rebind<float>::other > confidence_values;
00041
00042
00043 typedef boost::shared_ptr< ::nao_msgs::WordRecognized_<ContainerAllocator> > Ptr;
00044 typedef boost::shared_ptr< ::nao_msgs::WordRecognized_<ContainerAllocator> const> ConstPtr;
00045 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00046 };
00047 typedef ::nao_msgs::WordRecognized_<std::allocator<void> > WordRecognized;
00048
00049 typedef boost::shared_ptr< ::nao_msgs::WordRecognized> WordRecognizedPtr;
00050 typedef boost::shared_ptr< ::nao_msgs::WordRecognized const> WordRecognizedConstPtr;
00051
00052
00053 template<typename ContainerAllocator>
00054 std::ostream& operator<<(std::ostream& s, const ::nao_msgs::WordRecognized_<ContainerAllocator> & v)
00055 {
00056 ros::message_operations::Printer< ::nao_msgs::WordRecognized_<ContainerAllocator> >::stream(s, "", v);
00057 return s;}
00058
00059 }
00060
00061 namespace ros
00062 {
00063 namespace message_traits
00064 {
00065 template<class ContainerAllocator> struct IsMessage< ::nao_msgs::WordRecognized_<ContainerAllocator> > : public TrueType {};
00066 template<class ContainerAllocator> struct IsMessage< ::nao_msgs::WordRecognized_<ContainerAllocator> const> : public TrueType {};
00067 template<class ContainerAllocator>
00068 struct MD5Sum< ::nao_msgs::WordRecognized_<ContainerAllocator> > {
00069 static const char* value()
00070 {
00071 return "29134437cd61021f75f35f21b72b7eab";
00072 }
00073
00074 static const char* value(const ::nao_msgs::WordRecognized_<ContainerAllocator> &) { return value(); }
00075 static const uint64_t static_value1 = 0x29134437cd61021fULL;
00076 static const uint64_t static_value2 = 0x75f35f21b72b7eabULL;
00077 };
00078
00079 template<class ContainerAllocator>
00080 struct DataType< ::nao_msgs::WordRecognized_<ContainerAllocator> > {
00081 static const char* value()
00082 {
00083 return "nao_msgs/WordRecognized";
00084 }
00085
00086 static const char* value(const ::nao_msgs::WordRecognized_<ContainerAllocator> &) { return value(); }
00087 };
00088
00089 template<class ContainerAllocator>
00090 struct Definition< ::nao_msgs::WordRecognized_<ContainerAllocator> > {
00091 static const char* value()
00092 {
00093 return "# Message emitted by Nao speech recognition.\n\
00094 # It contains the list of words recognized and confidence values\n\
00095 # Both arrays are of the same length\n\
00096 string[] words\n\
00097 float32[] confidence_values\n\
00098 \n\
00099 ";
00100 }
00101
00102 static const char* value(const ::nao_msgs::WordRecognized_<ContainerAllocator> &) { return value(); }
00103 };
00104
00105 }
00106 }
00107
00108 namespace ros
00109 {
00110 namespace serialization
00111 {
00112
00113 template<class ContainerAllocator> struct Serializer< ::nao_msgs::WordRecognized_<ContainerAllocator> >
00114 {
00115 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00116 {
00117 stream.next(m.words);
00118 stream.next(m.confidence_values);
00119 }
00120
00121 ROS_DECLARE_ALLINONE_SERIALIZER;
00122 };
00123 }
00124 }
00125
00126 namespace ros
00127 {
00128 namespace message_operations
00129 {
00130
00131 template<class ContainerAllocator>
00132 struct Printer< ::nao_msgs::WordRecognized_<ContainerAllocator> >
00133 {
00134 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::nao_msgs::WordRecognized_<ContainerAllocator> & v)
00135 {
00136 s << indent << "words[]" << std::endl;
00137 for (size_t i = 0; i < v.words.size(); ++i)
00138 {
00139 s << indent << " words[" << i << "]: ";
00140 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.words[i]);
00141 }
00142 s << indent << "confidence_values[]" << std::endl;
00143 for (size_t i = 0; i < v.confidence_values.size(); ++i)
00144 {
00145 s << indent << " confidence_values[" << i << "]: ";
00146 Printer<float>::stream(s, indent + " ", v.confidence_values[i]);
00147 }
00148 }
00149 };
00150
00151
00152 }
00153 }
00154
00155 #endif // NAO_MSGS_MESSAGE_WORDRECOGNIZED_H
00156