A topic selector identifies one or more topics.
Topic selector objects are only used by the local client library and are immutable.
For more information on topic selector evaluation see the Topic Selectors guide.
- See Also
- PTDiffusionMessagingFeature
-
PTDiffusionTopicsFeature
- Since
- 5.6
Compares the receiver to the given topic selector.
- Parameters
-
topicSelector | The topic selector object with which to compare the receiver. |
- Returns
YES
if the topic selector is equal to the receiver, otherwise NO
.
- Since
- 5.6
- (BOOL) selectsTopicPath: |
|
(nullable NSString *) |
topicPath |
|
Evaluate this receiver against a topic path.
- Parameters
-
topicPath | The topic path to evaluate against. May be nil or an empty string, in which case this method returns NO . |
- Returns
YES
if the receiver selects the topicPath.
- Since
- 5.6
+ (instancetype) topicSelectorWithAnyExpression: |
|
(NSArray< NSString * > *) |
expressions |
|
A convenience wrapper around topicSelectorWithAnyOf:
.
- Parameters
-
expressions | The selector expressions. |
- Returns
- A selector which matches if any of
expressions
do
- Since
- 5.9
Create a selector that matches if any of the provided selectors match.
- Parameters
-
- Returns
- A selector which matches if any of selectors do.
- Since
- 5.9
+ (instancetype) topicSelectorWithExpression: |
|
(NSString *) |
expression |
|
Return a topic selector object initialized with the given expression.
- Parameters
-
expression | The expression to be used for evalutating topic paths. |
- Returns
- Topic selector instance initialised with the given expression.
- Since
- 5.6
The expression association with the receiver.
- Since
- 5.6
The topic path prefix from this selector pattern.
Returns the largest fixed topic path that begins the selector expression. For path selectors, this is the entire path. For split pattern or full pattern selectors, this is a topic path up to, but not including, the first part of the path that contains a regular expression.
For selector sets, this method will return the largest prefix that is common to all included selectors.
If there is no common prefix, an empty string will be returned.
- Since
- 6.1