@@ -14,19 +14,20 @@ import Foundation
1414/// Received OSC messages can have their address patterns passed to the ``methods(matching:)``
1515/// method which will return all OSC Methods that match.
1616///
17- /// An OSC Method is defined as being the last path component in the address. OSC Methods are the
18- /// potential destinations of OSC messages received by the OSC server and correspond to each of the
19- /// points of control that the application makes available.
20- ///
21- /// The `methodname` path component is the method name in the following address examples:
22- ///
23- /// /methodname
24- /// /container1/container2/methodname
25- ///
26- /// Any other path components besides the last are referred to as _containers_.
27- ///
28- /// A container may also be a method. Simply register it the same way as other methods.
29- ///
17+ /// > OSC Methods:
18+ /// >
19+ /// > An OSC Method is defined as being the last path component in the address. OSC Methods are the
20+ /// > potential destinations of OSC messages received by the OSC server and correspond to each of the
21+ /// > points of control that the application makes available.
22+ /// >
23+ /// > The `methodname` path component is the method name in the following address examples:
24+ /// >
25+ /// > /methodname
26+ /// > /container1/container2/methodname
27+ /// >
28+ /// > Any other path components besides the last are referred to as _containers_.
29+ /// >
30+ /// > A container may also be a method. Simply register it the same way as other methods.
3031public actor OSCAddressSpace {
3132 var root : Node = . rootNodeFactory( )
3233
@@ -42,17 +43,22 @@ extension OSCAddressSpace {
4243 /// Register an OSC address.
4344 /// Returns a unique identifier assigned to the address's method.
4445 /// Replaces existing reference if one exists for that method already.
45- /// Optionally supply a closure that will be invoked when calling ``methods(matching:)``.
46- ///
47- /// - Remark: An OSC _method_ is defined as being the last path component in the address.
48- ///
49- /// `methodname` is the method name in the following address examples:
50- ///
51- /// /methodname
52- /// /container1/container2/methodname
53- ///
54- /// Any other path components besides the last are referred to as _containers_.
55- ///
46+ /// Optionally supply a closure that will be invoked when calling ``dispatch(message:host:port:)``.
47+ ///
48+ /// > OSC Methods:
49+ /// >
50+ /// > An OSC Method is defined as being the last path component in the address. OSC Methods are the
51+ /// > potential destinations of OSC messages received by the OSC server and correspond to each of the
52+ /// > points of control that the application makes available.
53+ /// >
54+ /// > The `methodname` path component is the method name in the following address examples:
55+ /// >
56+ /// > /methodname
57+ /// > /container1/container2/methodname
58+ /// >
59+ /// > Any other path components besides the last are referred to as _containers_.
60+ /// >
61+ /// > A container may also be a method. Simply register it the same way as other methods.
5662 @discardableResult
5763 public func register(
5864 localAddress address: String ,
@@ -64,17 +70,22 @@ extension OSCAddressSpace {
6470 /// Register an OSC address.
6571 /// Returns a unique identifier assigned to the address's method.
6672 /// Replaces existing reference if one exists for that method already.
67- /// Optionally supply a closure that will be invoked when calling ``methods(matching:)``.
68- ///
69- /// - Remark: An OSC _method_ is defined as being the last path component in the address.
70- ///
71- /// `methodname` is the method name in the following address examples:
72- ///
73- /// /methodname
74- /// /container1/container2/methodname
75- ///
76- /// Any other path components besides the last are referred to as _containers_.
77- ///
73+ /// Optionally supply a closure that will be invoked when calling ``dispatch(message:host:port:)``.
74+ ///
75+ /// > OSC Methods:
76+ /// >
77+ /// > An OSC Method is defined as being the last path component in the address. OSC Methods are the
78+ /// > potential destinations of OSC messages received by the OSC server and correspond to each of the
79+ /// > points of control that the application makes available.
80+ /// >
81+ /// > The `methodname` path component is the method name in the following address examples:
82+ /// >
83+ /// > /methodname
84+ /// > /container1/container2/methodname
85+ /// >
86+ /// > Any other path components besides the last are referred to as _containers_.
87+ /// >
88+ /// > A container may also be a method. Simply register it the same way as other methods.
7889 @discardableResult
7990 public func register< S> (
8091 localAddress pathComponents: S ,
@@ -141,23 +152,26 @@ extension OSCAddressSpace {
141152extension OSCAddressSpace {
142153 /// Returns all OSC address nodes matching the address pattern.
143154 ///
144- /// - Note: This will not automatically execute the closure blocks that may be associated with
145- /// the methods. To execute the closures, invoke the ``dispatch(message:host:port:)`` function
146- /// instead.
147- ///
148- /// - Remark: An OSC Method is defined as being the last path component in the address. OSC
149- /// Methods are the potential destinations of OSC messages received by the OSC server and
150- /// correspond to each of the points of control that the application makes available.
151- ///
152- /// `methodname` is the method name in the following address examples:
153- ///
154- /// /methodname
155- /// /container1/container2/methodname
156- ///
157- /// Any other path components besides the last are referred to as _containers_.
158- ///
159- /// A container may also be a method. Simply register it the same way as other methods.
160- ///
155+ /// > Note:
156+ /// >
157+ /// > This will not automatically execute the closure blocks that may be associated with
158+ /// > the methods. To execute the closures, invoke the ``dispatch(message:host:port:)`` function
159+ /// > instead.
160+ ///
161+ /// > OSC Methods:
162+ /// >
163+ /// > An OSC Method is defined as being the last path component in the address. OSC Methods are the
164+ /// > potential destinations of OSC messages received by the OSC server and correspond to each of the
165+ /// > points of control that the application makes available.
166+ /// >
167+ /// > The `methodname` path component is the method name in the following address examples:
168+ /// >
169+ /// > /methodname
170+ /// > /container1/container2/methodname
171+ /// >
172+ /// > Any other path components besides the last are referred to as _containers_.
173+ /// >
174+ /// > A container may also be a method. Simply register it the same way as other methods.
161175 public func methods( matching address: OSCAddressPattern ) -> [ MethodID ] {
162176 methodNodes ( patternMatching: address)
163177 . map { $0. id }
@@ -170,18 +184,20 @@ extension OSCAddressSpace {
170184 /// Executes the closure blocks (and passes the OSC message values to them) for all local OSC
171185 /// address nodes matching the address pattern in the OSC message.
172186 ///
173- /// - Remark: An OSC Method is defined as being the last path component in the address. OSC
174- /// Methods are the potential destinations of OSC messages received by the OSC server and
175- /// correspond to each of the points of control that the application makes available.
176- ///
177- /// `methodname` is the method name in the following address examples:
178- ///
179- /// /methodname
180- /// /container1/container2/methodname
181- ///
182- /// Any other path components besides the last are referred to as _containers_.
183- ///
184- /// A container may also be a method. Simply register it the same way as other methods.
187+ /// > OSC Methods:
188+ /// >
189+ /// > An OSC Method is defined as being the last path component in the address. OSC Methods are the
190+ /// > potential destinations of OSC messages received by the OSC server and correspond to each of the
191+ /// > points of control that the application makes available.
192+ /// >
193+ /// > The `methodname` path component is the method name in the following address examples:
194+ /// >
195+ /// > /methodname
196+ /// > /container1/container2/methodname
197+ /// >
198+ /// > Any other path components besides the last are referred to as _containers_.
199+ /// >
200+ /// > A container may also be a method. Simply register it the same way as other methods.
185201 ///
186202 /// - Returns: The OSC method IDs that were matched (the same as calling
187203 /// ``methods(matching:)``).
0 commit comments