36 #include <boost/algorithm/string.hpp> 37 #include <boost/utility/string_ref.hpp> 38 #include <boost/utility/string_ref.hpp> 40 #include <boost/regex.hpp> 41 #include <boost/algorithm/string/regex.hpp> 47 std::istringstream messageDescriptor(msg_def);
48 boost::match_results<std::string::const_iterator> what;
50 for (std::string line; std::getline(messageDescriptor, line,
'\n') ; )
52 std::string::const_iterator
begin = line.begin(),
end = line.end();
55 if (boost::regex_search( begin,
end, what,
56 boost::regex(
"(^\\s*$|^\\s*#)")))
61 if( line.compare(0, 5,
"MSG: ") == 0)
80 for (
const ROSType* known_type: all_types)
const absl::string_view & pkgName() const
ex.: geometry_msgs/Pose -> "geometry_msgs"
constexpr size_type size() const noexcept
ROSMessage(const std::string &msg_def)
const absl::string_view & msgName() const
ex.: geometry_msgs/Pose -> "Pose"
const ROSField & field(size_t index) const
Get field by index.
const ROSType & type() const
std::vector< ROSField > _fields
void setPkgName(absl::string_view new_pkg)
A ROSMessage will contain one or more ROSField(s). Each field is little more than a name / type pair...
void updateMissingPkgNames(const std::vector< const ROSType * > &all_types)
int compare(string_view x) const noexcept