I_Map (Interface)

An interface for a collection that holds key/value pairs

Extends: I_Collection

Methods

Clear

Returns: I_Map

Empties/Clears/Deletes every item in the map.

Contains

Returns: BOOL

Checks if key is contained in the map.

Inputs

Name

Type

Description

Key

ANY

Key to find.

Get

Returns: I_Map

Gets the value associated with the specified key without removing it from the map.

Inputs

Name

Type

Description

Key

ANY

Key used to identify stored value

Value

ANY

Variable to store requested data

Outputs

Name

Type

Description

bSuccess

BOOL

Get_As_String

Returns: I_Map

Returns value as a string, if type to string conversion is supported.

Inputs

Name

Type

Description

Key

ANY

Key used to identify stored value

sValue

REFERENCE TO STRING

Variable to store returned item.

Outputs

Name

Type

Description

bSuccess

BOOL

Get_Generic

Returns: I_Map

Gets the value in its generic form associated with the specified key in its generic form without removing it from the map. Use carefully as this contains the pointer of the actual value in the collection. If you wish to use this it is recommeded you create a copy of the returned value using MEMCPY

Inputs

Name

Type

Description

Key

T_Generic

Key used to identify stored value

Outputs

Name

Type

Description

Value

T_Generic

Variable to store requested data

bSuccess

BOOL

Get_Keys

Returns: I_Immutable_List

Gets an immutable list of the keys.

Get_Values

Returns: I_Immutable_List

Gets an immutable list of the values.

Insert

Returns: I_Map

Insert an element with the provided key and value to the map.

Inputs

Name

Type

Description

Key

ANY

Key used to identify stored value

Value

ANY

Value to store in map with key

Outputs

Name

Type

Description

bSuccess

BOOL

Insert_Generic

Returns: I_Map

Insert an element with the provided key and value in their generic forms to the map.

Inputs

Name

Type

Description

Key

T_Generic

Key used to identify stored value

Value

T_Generic

Value to store in map with key

bUpdate

BOOL

If this is true the value will be updated if the key already exists.

Outputs

Name

Type

Description

bSuccess

BOOL

Remove

Returns: I_Map

Removes value with the specified key from the map.

Inputs

Name

Type

Description

Key

ANY

Key used to identify stored value

Outputs

Name

Type

Description

bSuccess

BOOL

Remove_Generic

Returns: I_Map

Removes value with the specified key in its generic form from the map.

Inputs

Name

Type

Description

Key

T_Generic

Key used to identify stored value

Outputs

Name

Type

Description

bSuccess

BOOL

Update

Returns: I_Map

Updates the value at the provided key with the new value in the map.

Inputs

Name

Type

Description

Key

ANY

Key used to identify stored value

Value

ANY

Value to store in map with key

Outputs

Name

Type

Description

bSuccess

BOOL

Update_Generic

Returns: I_Map

Updates the value at the provided key with the new value in their generic forms in the map.

Inputs

Name

Type

Description

Key

T_Generic

Key used to identify stored value

Value

T_Generic

Value to store in map with key

Outputs

Name

Type

Description

bSuccess

BOOL

Upsert

Returns: I_Map

Updates a value in the map for a given key. If the key doesnt exist, it will be inserted.

Inputs

Name

Type

Description

Key

ANY

Key used to identify stored value

Value

ANY

Value to store in map with key

Outputs

Name

Type

Description

bSuccess

BOOL