#include <parser.hpp>
Public Member Functions | |
const ROSField * | field (const SString &name) const |
Get field by name. it uses linear search, so you should use it for debug only. | |
const ROSField & | field (size_t index) const |
Get field by index. | |
const std::vector< ROSField > & | fields () const |
Vector of fields. | |
void | mutateType (const ROSType &new_type) |
ROSMessage (const std::string &msg_def) | |
const ROSType & | type () const |
void | updateTypes (const std::vector< ROSType > &all_types) |
Private Attributes | |
std::vector< ROSField > | _fields |
ROSType | _type |
Definition at line 169 of file parser.hpp.
RosIntrospection::ROSMessage::ROSMessage | ( | const std::string & | msg_def | ) |
This constructor does most of the work in terms of parsing. It uses the message definition to extract fields and types.
Definition at line 323 of file parser.cpp.
const ROSField * RosIntrospection::ROSMessage::field | ( | const SString & | name | ) | const [inline] |
Get field by name. it uses linear search, so you should use it for debug only.
Definition at line 211 of file parser.hpp.
const ROSField& RosIntrospection::ROSMessage::field | ( | size_t | index | ) | const [inline] |
Get field by index.
Definition at line 193 of file parser.hpp.
const std::vector<ROSField>& RosIntrospection::ROSMessage::fields | ( | ) | const [inline] |
void RosIntrospection::ROSMessage::mutateType | ( | const ROSType & | new_type | ) | [inline] |
Definition at line 203 of file parser.hpp.
const ROSType& RosIntrospection::ROSMessage::type | ( | ) | const [inline] |
Definition at line 201 of file parser.hpp.
void RosIntrospection::ROSMessage::updateTypes | ( | const std::vector< ROSType > & | all_types | ) |
Sometimes the whole type information is incomplete, in particular ROSTYPE::pkgName(). This method helps the application to "fill the blancks". Used internally by buildROSTypeMapFromDefinition, the user should probably ignore it.
Definition at line 351 of file parser.cpp.
std::vector<ROSField> RosIntrospection::ROSMessage::_fields [private] |
Definition at line 207 of file parser.hpp.
ROSType RosIntrospection::ROSMessage::_type [private] |
Definition at line 206 of file parser.hpp.