|
Robot Raconteur Core C++ Library
|
Class for enum definitions. More...
#include <ServiceDefinition.h>
Public Member Functions | |
| EnumDefinition (const boost::shared_ptr< ServiceDefinition > &service) | |
| Construct a new empty EnumDefinition with a parent ServiceDefinition. | |
| std::string | ToString () |
| Convert enum definition to string. | |
| void | FromString (boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL) |
| Parse an enum definition from string. | |
| bool | VerifyValues () const |
| Verify that enum values are valid. | |
| 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< EnumDefinitionValue > | Values |
| The values in the enum. | |
| RR_WEAK_PTR< ServiceDefinition > | service |
| The parent service definition. | |
| ServiceDefinitionParseInfo | ParseInfo |
| Parsing diagnostic information. | |
| std::string | DocString |
| Documentation string for the enum. | |
| std::string | Name |
| The unqualified name of the type. | |
Class for enum definitions.
See service_definitions.md for more information.
| RobotRaconteur::EnumDefinition::EnumDefinition | ( | const boost::shared_ptr< ServiceDefinition > & | service | ) |
Construct a new empty EnumDefinition with a parent ServiceDefinition.
Must be constructed with boost::make_shared<EnumDefinition>()
| service | The parent service definition |
| void RobotRaconteur::EnumDefinition::FromString | ( | boost::string_ref | s, |
| const ServiceDefinitionParseInfo * | parse_info = NULL ) |
Parse an enum definition from string.
| s | The enum definition string |
| 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.
| std::string RobotRaconteur::EnumDefinition::ToString | ( | ) |
Convert enum definition to string.
| bool RobotRaconteur::EnumDefinition::VerifyValues | ( | ) | const |
Verify that enum values are valid.
| ServiceDefinitionParseInfo RobotRaconteur::EnumDefinition::ParseInfo |
Parsing diagnostic information.
The ParseInfo field is populated by FromString()