Public Member Functions | Protected Attributes | Friends | List of all members
RosMsgParser::ROSField Class Reference

A ROSMessage will contain one or more ROSField(s). Each field is little more than a name / type pair. More...

#include <ros_field.hpp>

Public Member Functions

int arraySize () const
 
void changeType (const ROSType &type)
 
std::shared_ptr< ROSMessagegetMessagePtr (const RosMessageLibrary &library) const
 
bool isArray () const
 True if the type is an array. More...
 
bool isConstant () const
 True if field is a constant in message definition. More...
 
const std::string & name () const
 
 ROSField (const ROSType &type, const std::string &name)
 
 ROSField (const std::string &definition)
 
const ROSTypetype () const
 
const std::string & value () const
 If constant, value of field, else undefined. More...
 

Protected Attributes

int _array_size
 
const RosMessageLibrary_cache_library = nullptr
 
std::shared_ptr< ROSMessage_cache_message
 
std::string _fieldname
 
bool _is_array
 
bool _is_constant = false
 
ROSType _type
 
std::string _value
 

Friends

class ROSMessage
 

Detailed Description

A ROSMessage will contain one or more ROSField(s). Each field is little more than a name / type pair.

Definition at line 46 of file ros_field.hpp.

Constructor & Destructor Documentation

◆ ROSField() [1/2]

RosMsgParser::ROSField::ROSField ( const ROSType type,
const std::string &  name 
)

Definition at line 32 of file ros_field.cpp.

◆ ROSField() [2/2]

RosMsgParser::ROSField::ROSField ( const std::string &  definition)

Definition at line 37 of file ros_field.cpp.

Member Function Documentation

◆ arraySize()

int RosMsgParser::ROSField::arraySize ( ) const
inline

1 if !is_array, -1 if is_array and array is variable length, otherwise length in name

Definition at line 88 of file ros_field.hpp.

◆ changeType()

void RosMsgParser::ROSField::changeType ( const ROSType type)
inline

Definition at line 63 of file ros_field.hpp.

◆ getMessagePtr()

std::shared_ptr<ROSMessage> RosMsgParser::ROSField::getMessagePtr ( const RosMessageLibrary library) const

◆ isArray()

bool RosMsgParser::ROSField::isArray ( ) const
inline

True if the type is an array.

Definition at line 81 of file ros_field.hpp.

◆ isConstant()

bool RosMsgParser::ROSField::isConstant ( ) const
inline

True if field is a constant in message definition.

Definition at line 69 of file ros_field.hpp.

◆ name()

const std::string& RosMsgParser::ROSField::name ( ) const
inline

Definition at line 53 of file ros_field.hpp.

◆ type()

const ROSType& RosMsgParser::ROSField::type ( ) const
inline

Definition at line 58 of file ros_field.hpp.

◆ value()

const std::string& RosMsgParser::ROSField::value ( ) const
inline

If constant, value of field, else undefined.

Definition at line 75 of file ros_field.hpp.

Friends And Related Function Documentation

◆ ROSMessage

friend class ROSMessage
friend

Definition at line 93 of file ros_field.hpp.

Member Data Documentation

◆ _array_size

int RosMsgParser::ROSField::_array_size
protected

Definition at line 103 of file ros_field.hpp.

◆ _cache_library

const RosMessageLibrary* RosMsgParser::ROSField::_cache_library = nullptr
mutableprotected

Definition at line 105 of file ros_field.hpp.

◆ _cache_message

std::shared_ptr<ROSMessage> RosMsgParser::ROSField::_cache_message
mutableprotected

Definition at line 106 of file ros_field.hpp.

◆ _fieldname

std::string RosMsgParser::ROSField::_fieldname
protected

Definition at line 98 of file ros_field.hpp.

◆ _is_array

bool RosMsgParser::ROSField::_is_array
protected

Definition at line 101 of file ros_field.hpp.

◆ _is_constant

bool RosMsgParser::ROSField::_is_constant = false
protected

Definition at line 102 of file ros_field.hpp.

◆ _type

ROSType RosMsgParser::ROSField::_type
protected

Definition at line 99 of file ros_field.hpp.

◆ _value

std::string RosMsgParser::ROSField::_value
protected

Definition at line 100 of file ros_field.hpp.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:31