Robot Raconteur Core C++ Library
Loading...
Searching...
No Matches
RobotRaconteur::WireDefinition Class Reference

Class for wire member definitions. More...

#include <ServiceDefinition.h>

Inheritance diagram for RobotRaconteur::WireDefinition:
RobotRaconteur::MemberDefinition

Public Member Functions

 WireDefinition (const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry)
 Construct a new empty WireDefinition object.
RR_OVIRTUAL std::string ToString () RR_OVERRIDE
 Convert member to a string.
void FromString (boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL)
 Parse a wire definition from string.
RR_OVIRTUAL void Reset () RR_OVERRIDE
 Clear all fields.
MemberDefinition_Direction Direction ()
 The direction of the wire.
virtual MemberDefinition_NoLock NoLock () const
 Get member locking behavior.

Public Attributes

boost::shared_ptr< TypeDefinitionType
 The wire value type.
std::string Name
 The name of the member.
RR_WEAK_PTR< ServiceEntryDefinitionServiceEntry
 The parent service entry definition.
std::vector< std::string > Modifiers
 Modifiers for this member.
ServiceDefinitionParseInfo ParseInfo
 Parsing diagnostic information.
std::string DocString
 Documentation string for the member.

Detailed Description

Class for wire member definitions.

WireDefinition is used to store Wire member definitions used with an Object parent.

See service_definitions.md for more information.

Constructor & Destructor Documentation

◆ WireDefinition()

RobotRaconteur::WireDefinition::WireDefinition ( const boost::shared_ptr< ServiceEntryDefinition > & ServiceEntry)

Construct a new empty WireDefinition object.

Must be constructed with boost::make_shared<WireDefinition>()

Parameters
ServiceEntryThe parent service entry definition

Member Function Documentation

◆ Direction()

MemberDefinition_Direction RobotRaconteur::WireDefinition::Direction ( )

The direction of the wire.

Wires may be declared readonly or writeonly using member modifiers. If no modifier is present, the wire is read/write.

Returns
MemberDefinition_Direction The direction of the wire

◆ FromString()

void RobotRaconteur::WireDefinition::FromString ( boost::string_ref s,
const ServiceDefinitionParseInfo * parse_info = NULL )

Parse a wire definition from string.

Parameters
sThe wire definition as a string
parse_infoParsing diagnostic information

◆ NoLock()

virtual MemberDefinition_NoLock RobotRaconteur::MemberDefinition::NoLock ( ) const
virtualinherited

Get member locking behavior.

Members may use modifiers to change behavior when an object is locked using RobotRaconteurNode::RequestObjectLock() or ServerContext::RequestObjectLock() By default, access to the object is protected against other users/sessions. Members can be declared nolock or nolockread to allow objects to be unlocked, or unlocked for read operations. See object_locks.md for more information.

Returns
MemberDefinition_NoLock The locking behavior

◆ ToString()

RR_OVIRTUAL std::string RobotRaconteur::WireDefinition::ToString ( )
virtual

Convert member to a string.

Returned member string is in Service Definition IDL format

Returns
std::string The member as a string

Reimplemented from RobotRaconteur::MemberDefinition.

Member Data Documentation

◆ Modifiers

std::vector<std::string> RobotRaconteur::MemberDefinition::Modifiers
inherited

Modifiers for this member.

Modifiers are used to modify the behavior of the member. See service_definitions.md for more information on valid modifiers.

◆ ParseInfo

ServiceDefinitionParseInfo RobotRaconteur::MemberDefinition::ParseInfo
inherited

Parsing diagnostic information.

The ParseInfo field is populated by the FromString() function of the member

◆ ServiceEntry

RR_WEAK_PTR<ServiceEntryDefinition> RobotRaconteur::MemberDefinition::ServiceEntry
inherited

The parent service entry definition.

Stored as a weak_ptr to prevent circular reference counts


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