|
Robot Raconteur Core C++ Library
|
Class representing a service entry definition. More...
#include <ServiceDefinition.h>
Public Member Functions | |
| ServiceEntryDefinition (const boost::shared_ptr< ServiceDefinition > &def) | |
| Construct a new empty ServiceEntryDefinition. | |
| virtual std::string | ToString () |
| Convert service entry definition to a string. | |
| virtual void | ToStream (std::ostream &os) const |
| Convert service definition to a text stream. | |
| void | FromString (boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL) |
| Parse a service entry definition from a string. | |
| void | FromString (boost::string_ref s, std::vector< ServiceDefinitionParseException > &warnings, const ServiceDefinitionParseInfo *parse_info=NULL) |
| Parse a service entry definition from a string with warnings. | |
| void | FromStream (std::istream &is, const ServiceDefinitionParseInfo *parse_info=NULL) |
| Parse a service entry definition from a stream. | |
| void | FromStream (std::istream &is, std::vector< ServiceDefinitionParseException > &warnings, const ServiceDefinitionParseInfo *parse_info=NULL) |
| Parse a service entry definition from a stream with warnings. | |
| void | Reset () |
| Clear all fields. | |
| RR_OVIRTUAL DataTypes | RRDataType () const RR_OVERRIDE |
| The type code of the type. | |
| RR_OVIRTUAL std::string | ResolveQualifiedName () RR_OVERRIDE |
| Resolves and returns the qualified name. | |
Public Attributes | |
| std::vector< boost::shared_ptr< MemberDefinition > > | Members |
| The members of the entry definition. | |
| DataTypes | EntryType |
| The type code of the entry type. | |
| std::vector< std::string > | Implements |
| Object types implemented by this object. | |
| std::vector< std::string > | Options |
| The options declared in the service entry definition (deprecated). | |
| std::vector< boost::shared_ptr< ConstantDefinition > > | Constants |
| The constants declared in the service entry definition. | |
| ServiceDefinitionParseInfo | ParseInfo |
| Parsing diagnostic information. | |
| std::string | DocString |
| Documentation string for the service entry. | |
| RR_WEAK_PTR< ServiceDefinition > | ServiceDefinition_ |
| The parent service definition. | |
| std::string | Name |
| The unqualified name of the type. | |
Class representing a service entry definition.
Structures, Pods, NamedArrays, and Objects are service entries.
Service entries are contained within a parent ServiceDefinition.
See service_definitions.md for more information on service entry definitions and service definitions.
Use FromString() or FromStream() to parse a service entry definition. Use ToString() or ToStream() to convert the service entry definition to text.
| RobotRaconteur::ServiceEntryDefinition::ServiceEntryDefinition | ( | const boost::shared_ptr< ServiceDefinition > & | def | ) |
Construct a new empty ServiceEntryDefinition.
Must be constructed with boost::make_shared<ServiceEntryDefinition>()
| def | The parent service definition containing this service entry |
| void RobotRaconteur::ServiceEntryDefinition::FromStream | ( | std::istream & | is, |
| const ServiceDefinitionParseInfo * | parse_info = NULL ) |
Parse a service entry definition from a stream.
Parsing individual service entries is not recommended. Use ServiceDefinition::FromStream() to parse the entire service definition instead.
| is | The stream containing the service entry definition text |
| parse_info | Parsing diagnostic information |
| void RobotRaconteur::ServiceEntryDefinition::FromStream | ( | std::istream & | is, |
| std::vector< ServiceDefinitionParseException > & | warnings, | ||
| const ServiceDefinitionParseInfo * | parse_info = NULL ) |
Parse a service entry definition from a stream with warnings.
Parsing individual service entries is not recommended. Use ServiceDefinition::FromStream() to parse the entire service definition instead.
| is | The stream containing the service entry definition text |
| warnings | A vector to receive parse warnings |
| parse_info | Parsing diagnostic information |
| void RobotRaconteur::ServiceEntryDefinition::FromString | ( | boost::string_ref | s, |
| const ServiceDefinitionParseInfo * | parse_info = NULL ) |
Parse a service entry definition from a string.
Parsing individual service entries is not recommended. Use ServiceDefinition::FromString() to parse the entire service definition instead.
| s | The service entry definition as a string |
| parse_info | Parsing diagnostic information |
| void RobotRaconteur::ServiceEntryDefinition::FromString | ( | boost::string_ref | s, |
| std::vector< ServiceDefinitionParseException > & | warnings, | ||
| const ServiceDefinitionParseInfo * | parse_info = NULL ) |
Parse a service entry definition from a string with warnings.
Parsing individual service entries is not recommended. Use ServiceDefinition::FromString() to parse the entire service definition instead.
| s | The service entry definition as a string |
| warnings | A vector to receive parse warnings |
| parse_info | Parsing diagnostic information |
|
virtual |
Resolves and returns the qualified name.
The Name field contains the unqualified name, meaning that it does not contain the service definition name. A qualified name contains the service definition name, a dot, and the unqualified name. An example is the qualified name "example.named_example.struct1", where "example.named_example" is the service definition name, and "struct1" is the unqualified name of the struct.
ResolveQualifiedName() will attempt to determine the fully qualified name of the type, or throw an exception if it is unable.
Implements RobotRaconteur::NamedTypeDefinition.
|
virtual |
Convert service definition to a text stream.
Writes service entry definition to a stream
| os | The stream to write the service entry definition to |
|
virtual |
Convert service entry definition to a string.
Converts service entry definition to a string
| DataTypes RobotRaconteur::ServiceEntryDefinition::EntryType |
The type code of the entry type.
Valid type codes for service entries are DataTypes_structure_t, DataTypes_pod_t, DataTypes_namedarray_t, and DataTypes_object_t
| std::vector<std::string> RobotRaconteur::ServiceEntryDefinition::Implements |
Object types implemented by this object.
Only valid for objects
| std::vector<boost::shared_ptr<MemberDefinition> > RobotRaconteur::ServiceEntryDefinition::Members |
| ServiceDefinitionParseInfo RobotRaconteur::ServiceEntryDefinition::ParseInfo |
Parsing diagnostic information.
The ParseInfo field is populated by the FromString() or FromStream() functions
| RR_WEAK_PTR<ServiceDefinition> RobotRaconteur::ServiceEntryDefinition::ServiceDefinition_ |
The parent service definition.
Stored as a weak_ptr to prevent circular reference counts