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

Subscription filter attribute for use with ServiceSubscriptionFilter. More...

#include <Subscription.h>

Public Member Functions

 ServiceSubscriptionFilterAttribute ()
 Construct a new Service Subscription Filter Attribute object.
 ServiceSubscriptionFilterAttribute (boost::string_ref value)
 Construct a new Service Subscription Filter Attribute object.
 ServiceSubscriptionFilterAttribute (const boost::regex &value_regex)
 Construct a new Service Subscription Filter Attribute object.
 ServiceSubscriptionFilterAttribute (boost::string_ref name, boost::string_ref value)
 Construct a new Service Subscription Filter Attribute object.
 ServiceSubscriptionFilterAttribute (boost::string_ref name, const boost::regex &value_regex)
 Construct a new Service Subscription Filter Attribute object.
bool IsMatch (boost::string_ref value) const
 Compare the attribute to a value.
bool IsMatch (boost::string_ref name, boost::string_ref value) const
 Compare the attribute to a named value.
bool IsMatch (const std::vector< std::string > &values) const
 Compare the attribute to a value list using OR logic.
bool IsMatch (const boost::intrusive_ptr< RRList< RRValue > > &values) const
 Compare the attribute to a value list using OR logic.
bool IsMatch (const boost::intrusive_ptr< RRMap< std::string, RRValue > > &values) const
 Compare the attribute to a value map using OR logic.
bool IsMatch (const std::map< std::string, std::string > &values) const
 Compare the attribute to a value map using OR logic.

Public Attributes

std::string Name
 The attribute name. Empty for no name.
std::string Value
 The string value of the attribute.
boost::regex ValueRegex
 The regex value of the attribute.
bool UseRegex
 True if ValueRegex is used, otherwise Value is matched.

Detailed Description

Subscription filter attribute for use with ServiceSubscriptionFilter.

Constructor & Destructor Documentation

◆ ServiceSubscriptionFilterAttribute() [1/4]

RobotRaconteur::ServiceSubscriptionFilterAttribute::ServiceSubscriptionFilterAttribute ( boost::string_ref value)

Construct a new Service Subscription Filter Attribute object.

This is a nameless attribute for use with attribute lists

Parameters
valueThe attribute value

◆ ServiceSubscriptionFilterAttribute() [2/4]

RobotRaconteur::ServiceSubscriptionFilterAttribute::ServiceSubscriptionFilterAttribute ( const boost::regex & value_regex)

Construct a new Service Subscription Filter Attribute object.

This is a nameless attribute for use with attribute lists. The value is compared using a regex

Parameters
value_regexThe attribute value regex

◆ ServiceSubscriptionFilterAttribute() [3/4]

RobotRaconteur::ServiceSubscriptionFilterAttribute::ServiceSubscriptionFilterAttribute ( boost::string_ref name,
boost::string_ref value )

Construct a new Service Subscription Filter Attribute object.

This is a named attribute for use with attribute maps

Parameters
nameThe attribute name
valueThe attribute value

◆ ServiceSubscriptionFilterAttribute() [4/4]

RobotRaconteur::ServiceSubscriptionFilterAttribute::ServiceSubscriptionFilterAttribute ( boost::string_ref name,
const boost::regex & value_regex )

Construct a new Service Subscription Filter Attribute object.

This is a named attribute for use with attribute maps. The value is compared using a regex

Parameters
nameThe attribute name
value_regexThe attribute value regex

Member Function Documentation

◆ IsMatch() [1/6]

bool RobotRaconteur::ServiceSubscriptionFilterAttribute::IsMatch ( boost::string_ref name,
boost::string_ref value ) const

Compare the attribute to a named value.

Parameters
nameThe name to compare
valueThe value to compare
Returns
true
false

◆ IsMatch() [2/6]

bool RobotRaconteur::ServiceSubscriptionFilterAttribute::IsMatch ( boost::string_ref value) const

Compare the attribute to a value.

Parameters
valueThe value to compare
Returns
true
false

◆ IsMatch() [3/6]

bool RobotRaconteur::ServiceSubscriptionFilterAttribute::IsMatch ( const boost::intrusive_ptr< RRList< RRValue > > & values) const

Compare the attribute to a value list using OR logic.

Parameters
valuesThe values to compare
Returns
true
false

◆ IsMatch() [4/6]

bool RobotRaconteur::ServiceSubscriptionFilterAttribute::IsMatch ( const boost::intrusive_ptr< RRMap< std::string, RRValue > > & values) const

Compare the attribute to a value map using OR logic.

Parameters
valuesThe value map to compare
Returns
true
false

◆ IsMatch() [5/6]

bool RobotRaconteur::ServiceSubscriptionFilterAttribute::IsMatch ( const std::map< std::string, std::string > & values) const

Compare the attribute to a value map using OR logic.

Parameters
valuesThe value map to compare
Returns
true
false

◆ IsMatch() [6/6]

bool RobotRaconteur::ServiceSubscriptionFilterAttribute::IsMatch ( const std::vector< std::string > & values) const

Compare the attribute to a value list using OR logic.

Parameters
valuesThe values to compare
Returns
true
false

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