![]() |
Diffusion Apple API 6.11.5
Unified Client Library for iOS, tvOS and OS X / macOS
|
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.
Class Methods | |
(instancetype) | + topicSelectorWithExpression: |
(instancetype) | + topicSelectorWithAnyOf: |
(instancetype) | + topicSelectorWithAnyExpression: |
Properties | |
NSString * | expression |
NSString * | pathPrefix |
Instance Methods | |
(BOOL) | - selectsTopicPath: |
(BOOL) | - isEqualToTopicSelector: |
- (BOOL) isEqualToTopicSelector: | (nullable PTDiffusionTopicSelector *) | topicSelector |
Compares the receiver to the given topic selector.
topicSelector | The topic selector object with which to compare the receiver. |
YES
if the topic selector is equal to the receiver, otherwise NO
.- (BOOL) selectsTopicPath: | (nullable NSString *) | topicPath |
Evaluate this receiver against a topic path.
topicPath | The topic path to evaluate against. May be nil or an empty string, in which case this method returns NO . |
YES
if the receiver selects the topicPath.+ (instancetype) topicSelectorWithAnyExpression: | (NSArray< NSString * > *) | expressions |
A convenience wrapper around topicSelectorWithAnyOf:
.
expressions | The selector expressions. |
expressions
do+ (instancetype) topicSelectorWithAnyOf: | (NSArray< PTDiffusionTopicSelector * > *) | selectors |
Create a selector that matches if any of the provided selectors match.
selectors | The selectors |
+ (instancetype) topicSelectorWithExpression: | (NSString *) | expression |
Return a topic selector object initialized with the given expression.
expression | The expression to be used for evalutating topic paths. |
|
readnonatomicassign |
The expression association with the receiver.
|
readnonatomicassign |
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.