<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="route" module="max" category="Control">
	<digest>
		Select outlet based on input matching
	</digest>
	<description>
		Tries to match a message's first argument to the <o>route</o> object's own arguments. The rightmost outlet passes any message that matched no other choice, so you may gang <o>route</o> objects to get more choices
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Control
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Number or list to be Routed
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Number or list to be Routed
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Outputs if Input Matches 0
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Input if Input Doesn't Match
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="selectors" optional="1" type="anything">
			<digest>
				Outlet selectors
			</digest>
			<description>
				Arguments can be a mix of ints, floats, or symbols. The number of arguments determines the number of outlets, in addition to the rightmost outlet. Each argument assigns a name or a number to an outlet. If there is no argument, there is one other outlet, which is assigned the number <m>0</m>.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Route output based on a match
			</digest>
			<description>
				Performs the same function as <m>anything</m>.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Route output based on a match
			</digest>
			<description>
				Performs the same function as <m>anything</m>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Route output based on a match
			</digest>
			<description>
				Performs the same function as <m>anything</m>.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Route output based on a match
			</digest>
			<description>
				Performs the same function as <m>anything</m>.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Route output based on a match
			</digest>
			<description>
				If the first item of the message is the same as one of the arguments of <o>route</o>, the rest of the message is sent out the outlet that corresponds to that argument. If the first item does not match any of the arguments, the entire message is passed out the rightmost outlet.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="route.png" caption="Arguments assign names or numbers to the outlets, and route the input to the correct outlet" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="bucket" />
		<seealso name="forward" />
		<seealso name="gate" />
		<seealso name="join" />
		<seealso name="pack" />
		<seealso name="receive" />
		<seealso name="routepass" />
		<seealso name="select" />
		<seealso name="send" />
		<seealso name="sprintf" />
		<seealso name="zl" />
		<seealso name="basicchapter18" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="anything">
			<description>
				The first item of any message received in the inlet is compared with the arguments. If it matches one of the arguments, the rest of the message is sent out the specified outlet. Otherwise, the entire message is passed out the rightmost outlet.
			</description>
		</entry>
		<entry name="bang">
			<description>
				If the first item of a message matches one of the arguments, but the message has no additional items, <m>bang</m> is sent out the specified outlet.
			</description>
		</entry>
	</misc>
</c74object>
