IOFormat C# 1.12.0
Loading...
Searching...
No Matches
IOFormat.OptionMap Class Reference
Inheritance diagram for IOFormat.OptionMap:
IOFormat.GeneralOptions

Public Member Functions

 OptionMap (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 
long[] GetIntArray (string key)
 Return an option value as an array of integers.
 
double[] GetFloatArray (string key)
 Return an option value as an array of floats.
 
void SetInt (string key, long[] values)
 Associate an integer array with a specific key.
 
void SetFloat (string key, double[] values)
 Associate a float array with a specific key.
 
 OptionMap (OptionMap other)
 
uint Size ()
 Get the number of element in the option map.
 
bool Empty ()
 Check if the option map is empty.
 
bool Has (string key)
 Check if a key is present.
 
DataType Dtype (string key)
 Get the option data type.
 
uint Count (string key)
 Get the number of values associated with a key.
 
void Remove (string key)
 Remove a key from the option map.
 
string ToString ()
 Get a string representation of the option map.
 
bool GetBool (string key)
 Get a boolean value.
 
string GetString (string key)
 Get a string value.
 
long GetInt (string key, uint index)
 Get the integer value at a given index.
 
long GetInt (string key)
 Get an integer value.
 
double GetFloat (string key, uint index)
 Get the float value at the given index.
 
double GetFloat (string key)
 Get a float value.
 
void SetBool (string key, bool value)
 Associate a boolean value with a specific key.
 
void SetString (string key, string value)
 Associate a string value with a specific key.
 
void SetInt (string key, long value)
 Associate an integer value with a specific key.
 
void SetFloat (string key, double value)
 Associate a float value with a specific key.
 

Static Public Member Functions

static global::System.Runtime.InteropServices.HandleRef getCPtr (OptionMap obj)
 
static global::System.Runtime.InteropServices.HandleRef swigRelease (OptionMap obj)
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Protected Attributes

bool swigCMemOwn
 

Member Function Documentation

◆ Count()

uint IOFormat.OptionMap.Count ( string  key)
inline

Get the number of values associated with a key.

Boolean and string values will always return one, while numeric values will return the number of elements in the array.

Parameters
keyThe key to fetch.
Exceptions
InvalidArgumentif the key is not present.

◆ Dtype()

DataType IOFormat.OptionMap.Dtype ( string  key)
inline

Get the option data type.

Parameters
keyThe key to fetch.
Exceptions
InvalidArgumentif the key is not present.

◆ GetBool()

bool IOFormat.OptionMap.GetBool ( string  key)
inline

Get a boolean value.

Parameters
keyThe key to fetch.
Exceptions
InvalidArgumentif the key is not present.
Errorif the value is not a boolean.

◆ GetFloat() [1/2]

double IOFormat.OptionMap.GetFloat ( string  key)
inline

Get a float value.

This shortcut method return the first element of the array.

Parameters
keyThe key to fetch.
Exceptions
InvalidArgumentif the key is not present.
Errorif the value is not a float.

◆ GetFloat() [2/2]

double IOFormat.OptionMap.GetFloat ( string  key,
uint  index 
)
inline

Get the float value at the given index.

Parameters
keyThe key to fetch.
indexThe index of the value in the array.
Exceptions
InvalidArgumentif the key is not present.
InvalidArgumentif the index is out of bounds.
Errorif the value is not a float.

◆ GetFloatArray()

double[] IOFormat.OptionMap.GetFloatArray ( string  key)
inline

Return an option value as an array of floats.

Parameters
keyThe key to fetch.

◆ GetInt() [1/2]

long IOFormat.OptionMap.GetInt ( string  key)
inline

Get an integer value.

This shortcut method return the first element of the array.

Parameters
keyThe key to fetch.
Exceptions
InvalidArgumentif the key is not present.
Errorif the value is not an integer.

◆ GetInt() [2/2]

long IOFormat.OptionMap.GetInt ( string  key,
uint  index 
)
inline

Get the integer value at a given index.

Parameters
keyThe key to fetch.
indexThe index of the value in the array.
Exceptions
InvalidArgumentif the key is not present.
InvalidArgumentif the index is out of bounds.
Errorif the value is not an integer.

◆ GetIntArray()

long[] IOFormat.OptionMap.GetIntArray ( string  key)
inline

Return an option value as an array of integers.

Parameters
keyThe key to fetch.

◆ GetString()

string IOFormat.OptionMap.GetString ( string  key)
inline

Get a string value.

Parameters
keyThe key to fetch.
Exceptions
InvalidArgumentif the key is not present.
Errorif the value is not a string.

◆ Has()

bool IOFormat.OptionMap.Has ( string  key)
inline

Check if a key is present.

Parameters
keyThe key to check

◆ Remove()

void IOFormat.OptionMap.Remove ( string  key)
inline

Remove a key from the option map.

Parameters
keyThe key to remove.
Exceptions
InvalidArgumentif the key is not present.

◆ SetBool()

void IOFormat.OptionMap.SetBool ( string  key,
bool  value 
)
inline

Associate a boolean value with a specific key.

Parameters
keyThe key to set.
valueThe value to set.

◆ SetFloat() [1/2]

void IOFormat.OptionMap.SetFloat ( string  key,
double  value 
)
inline

Associate a float value with a specific key.

This shortcut method set a single value.

Parameters
keyThe key to set.
valueThe value to set.

◆ SetFloat() [2/2]

void IOFormat.OptionMap.SetFloat ( string  key,
double[]  values 
)
inline

Associate a float array with a specific key.

Parameters
keyThe key to set.
valuesThe values to set.

◆ SetInt() [1/2]

void IOFormat.OptionMap.SetInt ( string  key,
long  value 
)
inline

Associate an integer value with a specific key.

This shortcut method set a single value.

Parameters
keyThe key to set.
valueThe value to set.

◆ SetInt() [2/2]

void IOFormat.OptionMap.SetInt ( string  key,
long[]  values 
)
inline

Associate an integer array with a specific key.

Parameters
keyThe key to set.
valuesThe values to set.

◆ SetString()

void IOFormat.OptionMap.SetString ( string  key,
string  value 
)
inline

Associate a string value with a specific key.

Parameters
keyThe key to set.
valueThe value to set.

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