Robot Raconteur Core C++ Library
Classes | Typedefs | Functions
ServiceDefinition.h File Reference

Go to the source code of this file.

Classes

struct  RobotRaconteur::ServiceDefinitionParseInfo
 Service definition parse information. More...
 
class  RobotRaconteur::RobotRaconteurVersion
 Robot Raconteur Version storage class. More...
 
class  RobotRaconteur::ServiceDefinitionParseException
 Exception thrown when a parsing error occurs. More...
 
class  RobotRaconteur::ServiceDefinitionVerifyException
 Exception thrown when a service definition verification failure occurs. More...
 
class  RobotRaconteur::ServiceDefinition
 Class representing a service definition. More...
 
class  RobotRaconteur::NamedTypeDefinition
 Base class for user-defined named types. More...
 
class  RobotRaconteur::ServiceEntryDefinition
 Class representing a service entry definition. More...
 
class  RobotRaconteur::MemberDefinition
 Base class for member definitions. More...
 
class  RobotRaconteur::PropertyDefinition
 Class for property and field member definitions. More...
 
class  RobotRaconteur::FunctionDefinition
 Class for function member definitions. More...
 
class  RobotRaconteur::EventDefinition
 Class for event member definitions. More...
 
class  RobotRaconteur::ObjRefDefinition
 Class for objref member definitions. More...
 
class  RobotRaconteur::PipeDefinition
 Class for pipe member definitions. More...
 
class  RobotRaconteur::CallbackDefinition
 Class for callback member definitions. More...
 
class  RobotRaconteur::WireDefinition
 Class for wire member definitions. More...
 
class  RobotRaconteur::MemoryDefinition
 Class for memory member definitions. More...
 
class  RobotRaconteur::TypeDefinition
 Class for type definitions. More...
 
class  RobotRaconteur::ExceptionDefinition
 Class for exception definitions. More...
 
class  RobotRaconteur::UsingDefinition
 Class for using definitions. More...
 
struct  RobotRaconteur::ConstantDefinition_StructField
 Class for constant structure field definitions. More...
 
class  RobotRaconteur::ConstantDefinition
 Class for constant definitions. More...
 
class  RobotRaconteur::EnumDefinition
 Class for enum definitions. More...
 
class  RobotRaconteur::EnumDefinitionValue
 Class representing an enum definition value. More...
 

Typedefs

using RobotRaconteur::ServiceDefinitionPtr = boost::shared_ptr< ServiceDefinition >
 Convenience alias for ServiceDefinition shared_ptr.
 
using RobotRaconteur::NamedTypeDefinitionPtr = boost::shared_ptr< NamedTypeDefinition >
 Convenience alias for NamedTypeDefinition shared_ptr.
 
using RobotRaconteur::ServiceEntryDefinitionPtr = boost::shared_ptr< ServiceEntryDefinition >
 Convenience alias for ServiceEntryDefinition shared_ptr.
 
using RobotRaconteur::MemberDefinitionPtr = boost::shared_ptr< MemberDefinition >
 Convenience alias for memberDefinition shared_ptr.
 
using RobotRaconteur::FunctionDefinitionPtr = boost::shared_ptr< FunctionDefinition >
 Convenience alias for FunctionDefinition shared_ptr.
 
using RobotRaconteur::PropertyDefinitionPtr = boost::shared_ptr< PropertyDefinition >
 Convenience alias for PropertyDefinition shared_ptr.
 
using RobotRaconteur::EventDefinitionPtr = boost::shared_ptr< EventDefinition >
 Convenience alias for EventDefinition shared_ptr.
 
using RobotRaconteur::ObjRefDefinitionPtr = boost::shared_ptr< ObjRefDefinition >
 Convenience alias for ObjRefDefinition shared_ptr.
 
using RobotRaconteur::PipeDefinitionPtr = boost::shared_ptr< PipeDefinition >
 Convenience alias for PipeDefinition shared_ptr.
 
using RobotRaconteur::CallbackDefinitionPtr = boost::shared_ptr< CallbackDefinition >
 Convenience alias for CallbackDefinition shared_ptr.
 
using RobotRaconteur::WireDefinitionPtr = boost::shared_ptr< WireDefinition >
 Convenience alias for WireDefinition shared_ptr.
 
using RobotRaconteur::MemoryDefinitionPtr = boost::shared_ptr< MemoryDefinition >
 Convenience alias for MemoryDefinition shared_ptr.
 
using RobotRaconteur::TypeDefinitionPtr = boost::shared_ptr< TypeDefinition >
 Convenience alias for TypeDefinition shared_ptr.
 
using RobotRaconteur::UsingDefinitionPtr = boost::shared_ptr< UsingDefinition >
 Convenience alias for UsingDefinition shared_ptr.
 
using RobotRaconteur::EnumDefinitionPtr = boost::shared_ptr< EnumDefinition >
 Convenience alias for EnumDefinition shared_ptr.
 
using RobotRaconteur::ConstantDefinitionPtr = boost::shared_ptr< ConstantDefinition >
 Convenience alias for ConstantDefinition shared_ptr.
 

Functions

void RobotRaconteur::VerifyServiceDefinitions (const std::vector< boost::shared_ptr< ServiceDefinition > > &def, std::vector< ServiceDefinitionParseException > &warnings)
 Verify that service definitions are valid. More...
 
void RobotRaconteur::VerifyServiceDefinitions (const std::vector< boost::shared_ptr< ServiceDefinition > > &def)
 Verify that service definitions are valid. More...
 
bool RobotRaconteur::CompareServiceDefinitions (const boost::shared_ptr< ServiceDefinition > &def1, const boost::shared_ptr< ServiceDefinition > &def2)
 Compare two service definitions to see if they are identical. More...
 
boost::tuple< boost::string_ref, boost::string_ref > RobotRaconteur::SplitQualifiedName (boost::string_ref name)
 Split a qualified name into its service definition name and unqualified name parts. More...
 
template<typename T >
boost::shared_ptr< T > RobotRaconteur::TryFindByName (const std::vector< boost::shared_ptr< T > > &v, boost::string_ref name)
 Try finding a vector element by the Name field. More...
 

Detailed Description

Author
John Wason, PhD
License
Software License Agreement (Apache License)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ CompareServiceDefinitions()

bool RobotRaconteur::CompareServiceDefinitions ( const boost::shared_ptr< ServiceDefinition > &  def1,
const boost::shared_ptr< ServiceDefinition > &  def2 
)

Compare two service definitions to see if they are identical.

Parameters
def1Test service definition 1
def2Test service definition 2
Returns
true Service definitions are identical
false Service definitions are different

◆ SplitQualifiedName()

boost::tuple<boost::string_ref, boost::string_ref> RobotRaconteur::SplitQualifiedName ( boost::string_ref  name)

Split a qualified name into its service definition name and unqualified name parts.

Note that this function returns a reference to the name parameter. If the memory backing name is destroyed, the returned boost::string_ref tuple will be invalid.

Parameters
name
Returns
boost::tuple<boost::string_ref, boost::string_ref> The service type name and unqualified name in a tuple

◆ TryFindByName()

template<typename T >
boost::shared_ptr<T> RobotRaconteur::TryFindByName ( const std::vector< boost::shared_ptr< T > > &  v,
boost::string_ref  name 
)

Try finding a vector element by the Name field.

Template Parameters
TThe type of the vector field (contained in a boost::shared_ptr)
Parameters
vThe vector of elements
nameThe name of the element to search for
Returns
RR_SHARED_PTR<T> The found element, or null if not found

◆ VerifyServiceDefinitions() [1/2]

void RobotRaconteur::VerifyServiceDefinitions ( const std::vector< boost::shared_ptr< ServiceDefinition > > &  def)

Verify that service definitions are valid.

Verify that service definition follows all the rules for service definitions as specified by the standard. See service_definitions.md for more information. Throws exceptions on verification failure.

ServiceDefinition::FromString() or ServiceDefinition::FromStream() does not validate service definitions. VerifyServiceDefinition() must be called after parsing.

This overload does not return warnings.

Parameters
defThe collection of service definitions to verify

◆ VerifyServiceDefinitions() [2/2]

void RobotRaconteur::VerifyServiceDefinitions ( const std::vector< boost::shared_ptr< ServiceDefinition > > &  def,
std::vector< ServiceDefinitionParseException > &  warnings 
)

Verify that service definitions are valid.

Verify that service definition follows all the rules for service definitions as specified by the standard. See service_definitions.md for more information. Throws exceptions on verification failure.

ServiceDefinition::FromString() or ServiceDefinition::FromStream() does not validate service definitions. VerifyServiceDefinition() must be called after parsing.

Parameters
defThe collection of service definitions to verify
warningsA vector to receive non-fatal verification warnings