Graph Maker
WMG_Data_Source Class Reference

This defines a data source which can be used with WMG_Series, WMG_Pie_Graph, or WMG_Ring_Graph. More...

Inheritance diagram for WMG_Data_Source:

Public Types

enum  WMG_DataSourceTypes { WMG_DataSourceTypes.Single_Object_Multiple_Variables, WMG_DataSourceTypes.Multiple_Objects_Single_Variable, WMG_DataSourceTypes.Single_Object_Single_Variable }
 
enum  WMG_VariableTypes {
  WMG_VariableTypes.Not_Specified, WMG_VariableTypes.Field, WMG_VariableTypes.Property, WMG_VariableTypes.Property_Field,
  WMG_VariableTypes.Field_Field
}
 

Public Member Functions

void setVariableNames (List< string > variableNames)
 Set entire list of variable names to variableNames. More...
 
void setVariableName (string variableName)
 Sets variableName. More...
 
void addVariableNameToList (string variableName)
 Adds a variable name to variableNames. More...
 
void removeVariableNameFromList (string variableName)
 Removes the specified variable name from variableNames. More...
 
void setDataProviders< T > (List< T > dataProviderList)
 Set entire list of data providers to dataProviders. More...
 
void setDataProvider< T > (T dataProvider)
 Sets dataProvider. More...
 
void addDataProviderToList< T > (T dataProvider)
 Adds a data provider to dataProviders. More...
 
bool removeDataProviderFromList< T > (T dataProvider)
 Removes the specified data provider from dataProviders. More...
 
List< T > getData< T > ()
 Pulls a list of data such as a list of floats, from this data source. More...
 
getDatum< T > ()
 Pulls a single value such as a float, from this data source. More...
 

Public Attributes

WMG_DataSourceTypes dataSourceType
 Determines the type of this data source in terms of multi vs single objects and multi vs single variables. More...
 
List< object > dataProviders = new List<object>()
 When using dataSourceType = Multiple_Objects_Single_Variable, this is the reference to the list of instanced script objects from which data will be pulled. More...
 
object dataProvider
 When using dataSourceType = Single_Object_Multiple_Variables or Single_Object_Single_Variable, this is the reference to the instanced script object from which data will be pulled. More...
 
List< WMG_VariableTypesvariableTypes = new List<WMG_VariableTypes>()
 Optionally set the variable type corresponding with variableNames to slightly improve performance. More...
 
WMG_VariableTypes variableType
 Optionally set the variable type corresponding with variableName to slightly improve performance. More...
 
List< string > variableNames
 When using dataSourceType = Single_Object_Multiple_Variables, this is the name of the variables from which data will be pulled. More...
 
string variableName
 When using dataSourceType = Multiple_Objects_Single_Variable or Single_Object_Single_Variable, this is the name of the variable from which data will be pulled. More...
 

Detailed Description

This defines a data source which can be used with WMG_Series, WMG_Pie_Graph, or WMG_Ring_Graph.

Member Enumeration Documentation

◆ WMG_DataSourceTypes

Enumerator
Single_Object_Multiple_Variables 
Multiple_Objects_Single_Variable 
Single_Object_Single_Variable 

◆ WMG_VariableTypes

Enumerator
Not_Specified 
Field 
Property 
Property_Field 
Field_Field 

Member Function Documentation

◆ addDataProviderToList< T >()

void WMG_Data_Source.addDataProviderToList< T > ( dataProvider)

Adds a data provider to dataProviders.

Parameters
dataProviderData provider.
Template Parameters
TThe 1st type parameter.

◆ addVariableNameToList()

void WMG_Data_Source.addVariableNameToList ( string  variableName)

Adds a variable name to variableNames.

Parameters
variableNameVariable name.

◆ getData< T >()

List<T> WMG_Data_Source.getData< T > ( )

Pulls a list of data such as a list of floats, from this data source.

Returns
The data.
Template Parameters
TThe 1st type parameter.

◆ getDatum< T >()

T WMG_Data_Source.getDatum< T > ( )

Pulls a single value such as a float, from this data source.

Returns
The datum.
Template Parameters
TThe 1st type parameter.

◆ removeDataProviderFromList< T >()

bool WMG_Data_Source.removeDataProviderFromList< T > ( dataProvider)

Removes the specified data provider from dataProviders.

Returns
true, if data provider from list was removed, false otherwise.
Parameters
dataProviderData provider.
Template Parameters
TThe 1st type parameter.

◆ removeVariableNameFromList()

void WMG_Data_Source.removeVariableNameFromList ( string  variableName)

Removes the specified variable name from variableNames.

Parameters
variableNameVariable name.

◆ setDataProvider< T >()

void WMG_Data_Source.setDataProvider< T > ( dataProvider)

Sets dataProvider.

Parameters
dataProviderData provider.
Template Parameters
TThe 1st type parameter.

◆ setDataProviders< T >()

void WMG_Data_Source.setDataProviders< T > ( List< T >  dataProviderList)

Set entire list of data providers to dataProviders.

Parameters
dataProviderListData provider list.
Template Parameters
TThe 1st type parameter.

◆ setVariableName()

void WMG_Data_Source.setVariableName ( string  variableName)

Sets variableName.

Parameters
variableNameVariable name.

◆ setVariableNames()

void WMG_Data_Source.setVariableNames ( List< string >  variableNames)

Set entire list of variable names to variableNames.

Parameters
variableNamesVariable names.

Member Data Documentation

◆ dataProvider

object WMG_Data_Source.dataProvider

When using dataSourceType = Single_Object_Multiple_Variables or Single_Object_Single_Variable, this is the reference to the instanced script object from which data will be pulled.

◆ dataProviders

List<object> WMG_Data_Source.dataProviders = new List<object>()

When using dataSourceType = Multiple_Objects_Single_Variable, this is the reference to the list of instanced script objects from which data will be pulled.

◆ dataSourceType

WMG_DataSourceTypes WMG_Data_Source.dataSourceType

Determines the type of this data source in terms of multi vs single objects and multi vs single variables.

  • Single_Object_Multiple_Variables: Expected data source refers to a single script object and multiple variables (Use dataProvider, and variableNames)
  • Multiple_Objects_Single_Variable: Expected data source refers to multiple instanced script objects and a single variable (Use dataProviders, and variableName)
  • Single_Object_Single_Variable: Expected data source refers to a single script object and a single variable (Use dataProvider, and variableName)

◆ variableName

string WMG_Data_Source.variableName

When using dataSourceType = Multiple_Objects_Single_Variable or Single_Object_Single_Variable, this is the name of the variable from which data will be pulled.

Variable can correspond to the field of a property, for example Transform.localPosition.x (Transform is the data provider, and localPosition.x is the variableName). Use the setVariableName function to change this.

◆ variableNames

List<string> WMG_Data_Source.variableNames

When using dataSourceType = Single_Object_Multiple_Variables, this is the name of the variables from which data will be pulled.

Variable can correspond to the field of a property, for example Transform.localPosition.x (Transform is the data provider, and localPosition.x is the variableName). Use the setVariableNames, addVariableNameToList, or removeVariableNameFromList functions to change this.

◆ variableType

WMG_VariableTypes WMG_Data_Source.variableType

Optionally set the variable type corresponding with variableName to slightly improve performance.

◆ variableTypes

List<WMG_VariableTypes> WMG_Data_Source.variableTypes = new List<WMG_VariableTypes>()

Optionally set the variable type corresponding with variableNames to slightly improve performance.


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