Greet 2014
Documentation for the GREET 2014 API
 All Classes Namespaces Functions Variables Enumerations Properties Events
Greet.DataStructureV3.Interfaces.IGDataDictionary< TKey, TValue > Interface Template Reference

An interface wrapper around a mutable dictionary to expose common methods such as CreateValue, DeleteValue, AllValues More...

Public Member Functions

void AddValue (TValue value)
 Add the given value to the dictionary More...
 
TValue CreateValue (IData data, int type=0)
 Creates a new instance of an object of the same type that the dictionary holds More...
 
bool DeleteValue (IData data, TKey key)
 Deletes the given value from the dictionary More...
 
bool KeyExists (TKey key)
 Returns true if the key exists in the dictionary; returns false otherwise More...
 
TValue ValueForKey (TKey key)
 Returns the value associated with a given key; Returns Null if the key does not exist More...
 

Properties

IEnumerable< TValue > AllValues [get]
 Returns an enumerable sequence of all values contained in the dictionary More...
 

Detailed Description

An interface wrapper around a mutable dictionary to expose common methods such as CreateValue, DeleteValue, AllValues

Member Function Documentation

void Greet.DataStructureV3.Interfaces.IGDataDictionary< TKey, TValue >.AddValue ( TValue  value)

Add the given value to the dictionary

TValue Greet.DataStructureV3.Interfaces.IGDataDictionary< TKey, TValue >.CreateValue ( IData  data,
int  type = 0 
)

Creates a new instance of an object of the same type that the dictionary holds

Parameters
typeActs as an identifier when needed.

List of cases where identifier is needed:

Identifier for creating new instances of processes (returned as Process.IProcess) - type = 1: stationary process. type = 2: transportation process. Default: stationary process

Identifier for creating new instances of mode for transportation processes (returned as Process.Transportation.IAMode) - type = 1: tankerBarge. type = 2:truck. type = 3:pipeline. type = 4:rail. type = 5:connector. Default: connector

IProject project = myControler.CurrentProject;
Process.IProcess proc = project.Data.Processes.CreateValue(data, 2);

Returns
Created instance
bool Greet.DataStructureV3.Interfaces.IGDataDictionary< TKey, TValue >.DeleteValue ( IData  data,
TKey  key 
)

Deletes the given value from the dictionary

bool Greet.DataStructureV3.Interfaces.IGDataDictionary< TKey, TValue >.KeyExists ( TKey  key)

Returns true if the key exists in the dictionary; returns false otherwise

TValue Greet.DataStructureV3.Interfaces.IGDataDictionary< TKey, TValue >.ValueForKey ( TKey  key)

Returns the value associated with a given key; Returns Null if the key does not exist

Property Documentation

IEnumerable<TValue> Greet.DataStructureV3.Interfaces.IGDataDictionary< TKey, TValue >.AllValues
get

Returns an enumerable sequence of all values contained in the dictionary


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