Astra Unity 2.6.6
Astra Unity Plugin
Astra.Serialization.SerializableDictionaryII Class Reference

Two element serializable dictionary with int as key and int as value More...

Inheritance diagram for Astra.Serialization.SerializableDictionaryII:

Public Member Functions

 SerializableDictionaryII ()
 Standard constructor
 
 SerializableDictionaryII (Dictionary< int, int > input)
 Constructor from a standard dictionary with key and value as ints More...
 
 SerializableDictionaryII (Google.Protobuf.Collections.MapField< int, int > input)
 Constructor that takes in protobuf data More...
 
void Upsert (string a, string b)
 Add or update the value for the given key as typed values More...
 
override void Upsert (System.Object a, System.Object b)
 Add or update the value for the given key as generic values More...
 
- Public Member Functions inherited from Astra.Serialization.SerializableDictionary< int, int >
Type GetKeyType ()
 Retreives the type of the key element
 
Type GetValType ()
 Retreives the type of the value element
 
void Clear ()
 Clears the dictionary
 
void CopyTo (KeyValuePair< A, B >[] pairs, int index)
 Defined in the IDictionary interface, but not implemented here
 
bool Contains (KeyValuePair< A, B > pair)
 Whether the given key is found in the dictionary More...
 
void Add (KeyValuePair< A, B > pair)
 Adds the given key/value pair into the dictionary More...
 
void Add (A a, B b)
 Adds this key/value pair to the dictionary More...
 
bool Remove (KeyValuePair< A, B > pair)
 Removes the given key/value pair from the dictionary More...
 
bool Remove (A a)
 Removes this key/value pair from the dictionary More...
 
bool ContainsKey (A a)
 Whether the dictionary contains this key More...
 
bool ContainsValue (B b)
 Whether the dictionary contains this value More...
 
Tuplet< A, B > GetFromSlot (int slot)
 Retrieves the tuplet at a given index More...
 
GetSecondFromSlot (int slot)
 Get the 2nd element (the value) from a given index More...
 
bool TryGetValue (A a, out B b)
 Attempts to retrieve the value for the given key. Returns false if the key does not exist in this dictionary. More...
 
void OnBeforeSerialize ()
 Implementation for Unity ISerializationCallbackReceiver
 
void OnAfterDeserialize ()
 Implementation for Unity ISerializationCallbackReceiver
 
virtual void Upsert (System.Object a, System.Object b)
 Adds or updates the value for the given key More...
 
void RemoveKey (System.Object a)
 Removes the tuplet for the given key More...
 
SerializableDictionaryEnumerator GetEnumerator ()
 Retrieves an enumerator for this dictionary
 
System.Collections.IEnumerator GetEnumeratorGeneric ()
 Retreives a generic enumerator for this dictionary
 

Protected Attributes

new TupletsII __tuplets = null
 
- Protected Attributes inherited from Astra.Serialization.SerializableDictionary< int, int >
Tuplets< A, B > __tuplets
 

Properties

override Tuplets< int, int > _tuplets [getset]
 
- Properties inherited from Astra.Serialization.SerializableDictionary< int, int >
virtual Tuplets< A, B > _tuplets [getset]
 
int Count [get]
 Count of tuplets in the dictionary
 
ICollection< A > Keys [get]
 Retreives the list of keys
 
ICollection< B > Values [get]
 Retrieves the list of values
 
bool IsReadOnly [get]
 Whether this is read only
 
this[A key] [getset]
 Returns the value from the given key More...
 

Detailed Description

Two element serializable dictionary with int as key and int as value

Constructor & Destructor Documentation

◆ SerializableDictionaryII() [1/2]

Astra.Serialization.SerializableDictionaryII.SerializableDictionaryII ( Dictionary< int, int >  input)
inline

Constructor from a standard dictionary with key and value as ints

Parameters
inputDictionary to set values from

◆ SerializableDictionaryII() [2/2]

Astra.Serialization.SerializableDictionaryII.SerializableDictionaryII ( Google.Protobuf.Collections.MapField< int, int >  input)
inline

Constructor that takes in protobuf data

Parameters
inputMap to set values from

Member Function Documentation

◆ Upsert() [1/2]

void Astra.Serialization.SerializableDictionaryII.Upsert ( string  a,
string  b 
)
inline

Add or update the value for the given key as typed values

Parameters
aKey to add/update
bValue to add/update

◆ Upsert() [2/2]

override void Astra.Serialization.SerializableDictionaryII.Upsert ( System.Object  a,
System.Object  b 
)
inline

Add or update the value for the given key as generic values

Parameters
aKey to add/update
bValue to add/update

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