Watson Developer Cloud Unity SDK  1.0.0
The Unity SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
IBM.Watson.DeveloperCloud.Widgets.Widget.Input Class Reference

This object handles input on a widget. More...

Public Member Functions

 Input (string name, Type dataType, string receiverFunction, bool allowMany=true)
 Constructs an input object for a Widget. More...
 
override string ToString ()
 <exclude> More...
 
bool AddOutput (Output output)
 Add output to input. More...
 
bool RemoveOutput (Output output)
 Remove the output. More...
 
virtual void Start (Widget owner)
 Start this Input. More...
 
virtual void ReceiveData (Data data)
 Receives input and forwards that input onto the assigned delegate. Optionally, the user may inherit from Input and override the ReceiveData() function. More...
 

Properties

Widget Owner [get, set]
 A reference to the widget that contains this input, this is initialized when the Widget starts. More...
 
string OwnerName [get]
 The name of the owning widget. More...
 
string InputName [get]
 The name of this input. More...
 
string FullInputName [get]
 The fully qualified name of this input. More...
 
Type DataType [get]
 The type of data this input accepts. More...
 
bool AllowMany [get]
 If true, then more than one output may connect to this input. More...
 
Output[] Connections [get]
 The array of outputs connected to this input. More...
 
string DataTypeName [get]
 The name of the data type. More...
 
string ReceiverFunction [get]
 The name of the receiver function. More...
 
OnReceiveData DataReceiver [get]
 The delegate to the receiver function, this is set when Start() is called on this input. More...
 
OnOutputAdded OnOutputAdded [get, set]
 Gets or sets the on output added callback More...
 
OnOutputRemoved OnOutputRemoved [get, set]
 Gets or sets the on output removed callback More...
 

Detailed Description

This object handles input on a widget.

Constructor & Destructor Documentation

IBM.Watson.DeveloperCloud.Widgets.Widget.Input.Input ( string  name,
Type  dataType,
string  receiverFunction,
bool  allowMany = true 
)
inline

Constructs an input object for a Widget.

Parameters
nameThe name of the input.
dataTypeThe type of data the input takes.
receiverFunctionThe name of the function to invoke with the input. The input function must match
Parameters
allowManyIf true, then allow more than one output to connect to this input.
the OnReceiveData callback.

Member Function Documentation

bool IBM.Watson.DeveloperCloud.Widgets.Widget.Input.AddOutput ( Output  output)
inline

Add output to input.

Parameters
output
Returns
virtual void IBM.Watson.DeveloperCloud.Widgets.Widget.Input.ReceiveData ( Data  data)
inlinevirtual

Receives input and forwards that input onto the assigned delegate. Optionally, the user may inherit from Input and override the ReceiveData() function.

Parameters
dataThe received data object.
bool IBM.Watson.DeveloperCloud.Widgets.Widget.Input.RemoveOutput ( Output  output)
inline

Remove the output.

Parameters
output
Returns
virtual void IBM.Watson.DeveloperCloud.Widgets.Widget.Input.Start ( Widget  owner)
inlinevirtual

Start this Input.

Parameters
ownerThe owning widget.
override string IBM.Watson.DeveloperCloud.Widgets.Widget.Input.ToString ( )
inline

<exclude>

Property Documentation

bool IBM.Watson.DeveloperCloud.Widgets.Widget.Input.AllowMany
get

If true, then more than one output may connect to this input.

Output [] IBM.Watson.DeveloperCloud.Widgets.Widget.Input.Connections
get

The array of outputs connected to this input.

OnReceiveData IBM.Watson.DeveloperCloud.Widgets.Widget.Input.DataReceiver
get

The delegate to the receiver function, this is set when Start() is called on this input.

Type IBM.Watson.DeveloperCloud.Widgets.Widget.Input.DataType
get

The type of data this input accepts.

string IBM.Watson.DeveloperCloud.Widgets.Widget.Input.DataTypeName
get

The name of the data type.

string IBM.Watson.DeveloperCloud.Widgets.Widget.Input.FullInputName
get

The fully qualified name of this input.

string IBM.Watson.DeveloperCloud.Widgets.Widget.Input.InputName
get

The name of this input.

OnOutputAdded IBM.Watson.DeveloperCloud.Widgets.Widget.Input.OnOutputAdded
getset

Gets or sets the on output added callback

The on output added.

OnOutputRemoved IBM.Watson.DeveloperCloud.Widgets.Widget.Input.OnOutputRemoved
getset

Gets or sets the on output removed callback

The on output removed.

Widget IBM.Watson.DeveloperCloud.Widgets.Widget.Input.Owner
getset

A reference to the widget that contains this input, this is initialized when the Widget starts.

string IBM.Watson.DeveloperCloud.Widgets.Widget.Input.OwnerName
get

The name of the owning widget.

string IBM.Watson.DeveloperCloud.Widgets.Widget.Input.ReceiverFunction
get

The name of the receiver function.


The documentation for this class was generated from the following file: