<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bci2000.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Programming_Reference%3ATarget_Class</id>
	<title>Programming Reference:Target Class - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.bci2000.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Programming_Reference%3ATarget_Class"/>
	<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:Target_Class&amp;action=history"/>
	<updated>2026-06-24T16:17:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:Target_Class&amp;diff=4336&amp;oldid=prev</id>
		<title>Mellinger at 16:54, 11 September 2008</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:Target_Class&amp;diff=4336&amp;oldid=prev"/>
		<updated>2008-09-11T16:54:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Target Class==&lt;br /&gt;
===Location===&lt;br /&gt;
&amp;lt;tt&amp;gt;src/shared/modules/application/stimuli&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Synopsis===&lt;br /&gt;
The &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; class is a virtual base class which defines an event handling interface for targets.&lt;br /&gt;
There, a &amp;quot;Target&amp;quot; is defined as &amp;quot;an object that performs an action when selected.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; descendant class will typically override its empty &amp;lt;tt&amp;gt;OnSelect()&amp;lt;/tt&amp;gt; event handlers with a function that performs an action.&lt;br /&gt;
An application uses the public &amp;lt;tt&amp;gt;Target::Select()&amp;lt;/tt&amp;gt; function to control its behavior; this function, in turn, calls the virtual event handler.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;SetOfTargets&amp;lt;/tt&amp;gt; class allows to define sets of targets, and to select all of the targets it contains.&lt;br /&gt;
&lt;br /&gt;
===Properties===&lt;br /&gt;
====int Tag (rw)====&lt;br /&gt;
An arbitrary integer that may be used to encode information about a given target (e.g., its corresponding row in a configuration matrix).&lt;br /&gt;
&lt;br /&gt;
===Methods===&lt;br /&gt;
====Select()====&lt;br /&gt;
Prompts a target to perform its selection action by calling its &amp;lt;tt&amp;gt;OnSelect()&amp;lt;/tt&amp;gt; event handler.&lt;br /&gt;
&lt;br /&gt;
===Events===&lt;br /&gt;
====OnSelect()====&lt;br /&gt;
In its &amp;lt;tt&amp;gt;OnSelect&amp;lt;/tt&amp;gt; event handler, a target performs an action, e.g. entering a letter into a speller.&lt;br /&gt;
&lt;br /&gt;
===Descendants===&lt;br /&gt;
The &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; class is parent to the [[Programming Reference:Speller Class#SpellerTarget Class|SpellerTarget]] and [[Programming Reference:AudioSpellerTarget Class|AudioSpellerTarget]] classes.&lt;br /&gt;
&lt;br /&gt;
==SetOfTargets Class==&lt;br /&gt;
===Location===&lt;br /&gt;
&amp;lt;tt&amp;gt;SetOfTargets&amp;lt;/tt&amp;gt; is declared in the &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; class header file.&lt;br /&gt;
===Synopsis===&lt;br /&gt;
&amp;lt;tt&amp;gt;SetOfTargets&amp;lt;/tt&amp;gt; is a helper class that provides selection and destruction of a group of stimuli.&lt;br /&gt;
===Methods===&lt;br /&gt;
====Add(Target pointer)====&lt;br /&gt;
Adds a target object to the set.&lt;br /&gt;
====Remove(Target pointer)====&lt;br /&gt;
Removes a given target object from the set; nothing happens when the specified target is not a member of the set.&lt;br /&gt;
====Clear()====&lt;br /&gt;
Clears the set. Targets that were represented in the set in form of pointers are unaffected.&lt;br /&gt;
====DeleteObjects()====&lt;br /&gt;
Deletes all target objects that are in the set, and clears the set. To avoid dangling pointers, and multiple deletion, you should make sure that the set&amp;#039;s members are not part of any other &amp;lt;tt&amp;gt;SetOfTargets&amp;lt;/tt&amp;gt; by the time you call &amp;lt;tt&amp;gt;SetOfTargets::DeleteObjects()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
====bool Contains(Target pointer)====&lt;br /&gt;
Returns &amp;#039;&amp;#039;true&amp;#039;&amp;#039; if the specified target object is part of the set, and &amp;#039;&amp;#039;false&amp;#039;&amp;#039; otherwise.&lt;br /&gt;
====bool Intersects(SetOfTargets)====&lt;br /&gt;
Returns &amp;#039;&amp;#039;true&amp;#039;&amp;#039; if any of the elements of the specified set is part of the set on which &amp;lt;tt&amp;gt;Intersects&amp;lt;/tt&amp;gt; is called, and &amp;#039;&amp;#039;false&amp;#039;&amp;#039; otherwise.&lt;br /&gt;
====Select()====&lt;br /&gt;
Calls each element&amp;#039;s &amp;lt;tt&amp;gt;Select()&amp;lt;/tt&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[[Programming Reference:AssociationMap Class]], [[Programming Reference:Stimulus Class]], [[Programming Reference:StimulusTask Class]]&lt;br /&gt;
&lt;br /&gt;
[[Programming Reference:Speller Class]], [[Programming Reference:AudioSpellerTarget Class]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]][[Category:Framework API]] [[Category:User Application]]&lt;/div&gt;</summary>
		<author><name>Mellinger</name></author>
	</entry>
</feed>