Class Metadata
Metadata.
Namespace: UnityEngine.Perception.GroundTruth.DataModel
Syntax
public class Metadata : object, IMessageProducer
Constructors
Metadata()
Declaration
public Metadata()
Methods
Add(String, IEnumerable<Boolean>)
Adds a new metadata value
Declaration
public void Add(string key, IEnumerable<bool> value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata |
IEnumerable<Boolean> | value | The value of the metadata |
Add(String, IEnumerable<Int32>)
Adds a new metadata value
Declaration
public void Add(string key, IEnumerable<int> value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata |
IEnumerable<Int32> | value | The value of the metadata |
Add(String, IEnumerable<Single>)
Adds a new metadata value
Declaration
public void Add(string key, IEnumerable<float> value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata |
IEnumerable<Single> | value | The value of the metadata |
Add(String, IEnumerable<String>)
Adds a new metadata value
Declaration
public void Add(string key, IEnumerable<string> value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata |
IEnumerable<String> | value | The value of the metadata |
Add(String, IEnumerable<Metadata>)
Declaration
public void Add(string key, IEnumerable<Metadata> value)
Parameters
Type | Name | Description |
---|---|---|
String | key | |
IEnumerable<Metadata> | value |
Add(String, Boolean)
Adds a new metadata value
Declaration
public void Add(string key, bool value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata |
Boolean | value | The value of the metadata |
Add(String, Int32)
Adds a new metadata value
Declaration
public void Add(string key, int value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata |
Int32 | value | The value of the metadata |
Add(String, Single)
Adds a new metadata value
Declaration
public void Add(string key, float value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata |
Single | value | The value of the metadata |
Add(String, String)
Adds a new metadata value
Declaration
public void Add(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata |
String | value | The value of the metadata |
Add(String, UInt32)
Adds a new metadata value
Declaration
public void Add(string key, uint value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata |
UInt32 | value | The value of the metadata |
Add(String, Metadata)
Declaration
public void Add(string key, Metadata value)
Parameters
Type | Name | Description |
---|---|---|
String | key | |
Metadata | value |
GetBool(String)
Gets a value out of the metadata. If the value does not exist, or if a request is made for the improper data type, an exception will be thrown.
Declaration
public bool GetBool(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Returns
Type | Description |
---|---|
Boolean | The metadata value |
GetBoolArray(String)
Gets a value out of the metadata. If the value does not exist, or if a request is made for the improper data type, an exception will be thrown.
Declaration
public bool[] GetBoolArray(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Returns
Type | Description |
---|---|
Boolean[] | The metadata value |
GetFloat(String)
Gets a value out of the metadata. If the value does not exist, or if a request is made for the improper data type, an exception will be thrown.
Declaration
public float GetFloat(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Returns
Type | Description |
---|---|
Single | The metadata value |
GetFloatArray(String)
Gets a value out of the metadata. If the value does not exist, or if a request is made for the improper data type, an exception will be thrown.
Declaration
public float[] GetFloatArray(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Returns
Type | Description |
---|---|
Single[] | The metadata value |
GetInt(String)
Gets a value out of the metadata. If the value does not exist, or if a request is made for the improper data type, an exception will be thrown.
Declaration
public int GetInt(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Returns
Type | Description |
---|---|
Int32 | The metadata value |
GetIntArray(String)
Gets a value out of the metadata. If the value does not exist, or if a request is made for the improper data type, an exception will be thrown.
Declaration
public int[] GetIntArray(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Returns
Type | Description |
---|---|
Int32[] | The metadata value |
GetString(String)
Gets a value out of the metadata. If the value does not exist, or if a request is made for the improper data type, an exception will be thrown.
Declaration
public string GetString(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Returns
Type | Description |
---|---|
String | The metadata value |
GetStringArray(String)
Gets a value out of the metadata. If the value does not exist, or if a request is made for the improper data type, an exception will be thrown.
Declaration
public string[] GetStringArray(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Returns
Type | Description |
---|---|
String[] | The metadata value |
GetSubMetadata(String)
Declaration
public Metadata GetSubMetadata(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key |
Returns
Type | Description |
---|---|
Metadata |
GetSubMetadataArray(String)
Declaration
public Metadata[] GetSubMetadataArray(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key |
Returns
Type | Description |
---|---|
Metadata[] |
GetUInt(String)
Gets a value out of the metadata. If the value does not exist, or if a request is made for the improper data type, an exception will be thrown.
Declaration
public uint GetUInt(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Returns
Type | Description |
---|---|
UInt32 | The metadata value |
ToMessage(IMessageBuilder)
Convert contents int a message.
Declaration
public void ToMessage(IMessageBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
IMessageBuilder | builder | The message builder that will convert the class's contents into a message |
Implements
TryGetValue(String, out Boolean)
Tries to get a value from the metadata. This method will fail if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type.
Declaration
public bool TryGetValue(string key, out bool value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Boolean | value | The value associated with the key |
Returns
Type | Description |
---|---|
Boolean | Returns true if the data was properly retrieved. This method returns false if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type. |
TryGetValue(String, out Boolean[])
Tries to get a value from the metadata. This method will fail if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type.
Declaration
public bool TryGetValue(string key, out bool[] value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Boolean[] | value | The value associated with the key |
Returns
Type | Description |
---|---|
Boolean | Returns true if the data was properly retrieved. This method returns false if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type. |
TryGetValue(String, out Int32)
Tries to get a value from the metadata. This method will fail if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type.
Declaration
public bool TryGetValue(string key, out int value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Int32 | value | The value associated with the key |
Returns
Type | Description |
---|---|
Boolean | Returns true if the data was properly retrieved. This method returns false if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type. |
TryGetValue(String, out Int32[])
Tries to get a value from the metadata. This method will fail if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type.
Declaration
public bool TryGetValue(string key, out int[] value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Int32[] | value | The value associated with the key |
Returns
Type | Description |
---|---|
Boolean | Returns true if the data was properly retrieved. This method returns false if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type. |
TryGetValue(String, out Single)
Tries to get a value from the metadata. This method will fail if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type.
Declaration
public bool TryGetValue(string key, out float value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Single | value | The value associated with the key |
Returns
Type | Description |
---|---|
Boolean | Returns true if the data was properly retrieved. This method returns false if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type. |
TryGetValue(String, out Single[])
Tries to get a value from the metadata. This method will fail if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type.
Declaration
public bool TryGetValue(string key, out float[] value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
Single[] | value | The value associated with the key |
Returns
Type | Description |
---|---|
Boolean | Returns true if the data was properly retrieved. This method returns false if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type. |
TryGetValue(String, out String)
Tries to get a value from the metadata. This method will fail if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type.
Declaration
public bool TryGetValue(string key, out string value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
String | value | The value associated with the key |
Returns
Type | Description |
---|---|
Boolean | Returns true if the data was properly retrieved. This method returns false if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type. |
TryGetValue(String, out String[])
Tries to get a value from the metadata. This method will fail if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type.
Declaration
public bool TryGetValue(string key, out string[] value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
String[] | value | The value associated with the key |
Returns
Type | Description |
---|---|
Boolean | Returns true if the data was properly retrieved. This method returns false if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type. |
TryGetValue(String, out UInt32)
Tries to get a value from the metadata. This method will fail if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type.
Declaration
public bool TryGetValue(string key, out uint value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the metadata value |
UInt32 | value | The value associated with the key |
Returns
Type | Description |
---|---|
Boolean | Returns true if the data was properly retrieved. This method returns false if the key was not found in the metadata, or if the metadata stored with the passed in key is associated with a different data type. |
TryGetValue(String, out Metadata)
Declaration
public bool TryGetValue(string key, out Metadata value)
Parameters
Type | Name | Description |
---|---|---|
String | key | |
Metadata | value |
Returns
Type | Description |
---|---|
Boolean |
TryGetValue(String, out Metadata[])
Declaration
public bool TryGetValue(string key, out Metadata[] value)
Parameters
Type | Name | Description |
---|---|---|
String | key | |
Metadata[] | value |
Returns
Type | Description |
---|---|
Boolean |