|
Robot Raconteur Core C++ Library
|
Class for property and field member definitions. More...
#include <ServiceDefinition.h>
Public Member Functions | |
| PropertyDefinition (const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry) | |
| Construct a new empty PropertyDefinition object. | |
| RR_OVIRTUAL std::string | ToString () RR_OVERRIDE |
| Convert to a property definition string. | |
| std::string | ToString (bool isstruct) const |
| Convert to a property or field definition string. | |
| void | FromString (boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL) |
| Parse a property or field definition from string. | |
| RR_OVIRTUAL void | Reset () RR_OVERRIDE |
| Clear all fields. | |
| MemberDefinition_Direction | Direction () |
| The direction of the property. | |
| virtual MemberDefinition_NoLock | NoLock () const |
| Get member locking behavior. | |
Public Attributes | |
| boost::shared_ptr< TypeDefinition > | Type |
| The value type of the property or field. | |
| std::string | Name |
| The name of the member. | |
| RR_WEAK_PTR< ServiceEntryDefinition > | ServiceEntry |
| 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. | |
Class for property and field member definitions.
PropertyDefinition is used to store Property member definitions when used with an Object parent, or used to store a Field member definition when stored in a Structure, Pod, or Named Array.
See service_definitions.md for more information.
| RobotRaconteur::PropertyDefinition::PropertyDefinition | ( | const boost::shared_ptr< ServiceEntryDefinition > & | ServiceEntry | ) |
Construct a new empty PropertyDefinition object.
Must be constructed with boost::make_shared<PropertyDefinition>()
| ServiceEntry | The parent service entry definition |
| MemberDefinition_Direction RobotRaconteur::PropertyDefinition::Direction | ( | ) |
The direction of the property.
Only valid for properties. Not valid for fields.
Properties may be declared readonly or writeonly using member modifiers. If no modifier is present, the property is read/write.
| void RobotRaconteur::PropertyDefinition::FromString | ( | boost::string_ref | s, |
| const ServiceDefinitionParseInfo * | parse_info = NULL ) |
Parse a property or field definition from string.
| s | The property or field as a string |
| parse_info | Parsing diagnostic information |
|
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.
|
virtual |
Convert to a property definition string.
Use ToString(true) to convert to a field definition
Reimplemented from RobotRaconteur::MemberDefinition.
| std::string RobotRaconteur::PropertyDefinition::ToString | ( | bool | isstruct | ) | const |
Convert to a property or field definition string.
If isstruct is true, the returned string is a field definition. If false, the returned string is a property definition.
| isstruct | true for field, false for property |
|
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.
|
inherited |
Parsing diagnostic information.
The ParseInfo field is populated by the FromString() function of the member
|
inherited |
The parent service entry definition.
Stored as a weak_ptr to prevent circular reference counts