IDS peak ICV v1.5.0
Loading...
Searching...
No Matches
IArchive Interface Reference
Inheritance diagram for IArchive:

Public Member Functions

bool HasKey (string key)
 Determines whether a value exists for the specified key.
 
ArchiveValueKind GetValueKind (string key)
 Gets the value kind associated with the specified key.
 
IReadOnlyList< string > GetKeys ()
 Gets all keys currently stored in the archive.
 
void SetBool (string key, bool value)
 Stores a boolean value under the specified key.
 
bool GetBool (string key)
 Retrieves a boolean value by key.
 
void SetInt64 (string key, long value)
 Stores a 64-bit integer value under the specified key.
 
long GetInt64 (string key)
 Retrieves a 64-bit integer value by key.
 
void SetDouble (string key, double value)
 Stores a double-precision floating-point value under the specified key.
 
double GetDouble (string key)
 Retrieves a double-precision floating-point value by key.
 
void SetString (string key, string value)
 Stores a string value under the specified key.
 
string GetString (string key)
 Retrieves a string value by key.
 
void SetArchive (string key, IArchive value)
 Stores a nested archive under the specified key.
 
IArchive GetArchive (string key)
 Retrieves a nested archive by key.
 
int GetArrayCount (string key)
 Gets the number of elements in an array stored under the specified key.
 
void SetBoolArray (string key, IEnumerable< bool > value)
 Stores an array of boolean values under the specified key.
 
IReadOnlyList< bool > GetBoolArray (string key)
 Retrieves an array of boolean values by key.
 
void SetInt64Array (string key, IEnumerable< long > value)
 Stores an array of 64-bit integer values under the specified key.
 
IReadOnlyList< long > GetInt64Array (string key)
 Retrieves an array of 64-bit integer values by key.
 
void SetDoubleArray (string key, IEnumerable< double > value)
 Stores an array of double-precision floating-point values under the specified key.
 
IReadOnlyList< double > GetDoubleArray (string key)
 Retrieves an array of double-precision floating-point values by key.
 
void SetStringArray (string key, IEnumerable< string > value)
 Stores an array of string values under the specified key.
 
IReadOnlyList< string > GetStringArray (string key)
 Retrieves an array of string values by key.
 
void SetArchiveArray (string key, IEnumerable< IArchive > value)
 Stores an array of nested archives under the specified key.
 
IReadOnlyList< IArchive > GetArchiveArray (string key)
 Retrieves an array of nested archives by key.
 
IArchive CreateArchive ()
 Creates a new, empty archive instance of the same concrete type.
 

Detailed Description

Represents a hierarchical, strongly-typed key-value archive.

An IArchive stores values by string keys and supports primitive values, arrays, and nested archives. It is intended for serialization and deserialization of structured data.

Since
IDSImaging.Peak.Common 1.3

Member Function Documentation

◆ CreateArchive()

IArchive CreateArchive ( )

Creates a new, empty archive instance of the same concrete type.

The returned archive is empty and not automatically stored in the current archive.

Returns
A new empty IArchive instance.

Implemented in ArchiveBase, and Archive.

◆ GetArchive()

IArchive GetArchive ( string key)

Retrieves a nested archive by key.

Parameters
keyThe key of the archive to retrieve.
Returns
The stored child archive.

Implemented in ArchiveBase, and Archive.

◆ GetArchiveArray()

IReadOnlyList< IArchive > GetArchiveArray ( string key)

Retrieves an array of nested archives by key.

Parameters
keyThe key of the array to retrieve.
Returns
A read-only list of child archives.

Implemented in ArchiveBase, and Archive.

◆ GetArrayCount()

int GetArrayCount ( string key)

Gets the number of elements in an array stored under the specified key.

Parameters
keyThe key referencing the array.
Returns
The number of elements in the array.

Implemented in ArchiveBase, and Archive.

◆ GetBool()

bool GetBool ( string key)

Retrieves a boolean value by key.

Parameters
keyThe key of the value to retrieve.
Returns
The stored boolean value.

Implemented in ArchiveBase, and Archive.

◆ GetBoolArray()

IReadOnlyList< bool > GetBoolArray ( string key)

Retrieves an array of boolean values by key.

Parameters
keyThe key of the array to retrieve.
Returns
A read-only list of boolean values.

Implemented in ArchiveBase, and Archive.

◆ GetDouble()

double GetDouble ( string key)

Retrieves a double-precision floating-point value by key.

Parameters
keyThe key of the value to retrieve.
Returns
The stored floating-point value.

Implemented in ArchiveBase, and Archive.

◆ GetDoubleArray()

IReadOnlyList< double > GetDoubleArray ( string key)

Retrieves an array of double-precision floating-point values by key.

Parameters
keyThe key of the array to retrieve.
Returns
A read-only list of floating-point values.

Implemented in ArchiveBase, and Archive.

◆ GetInt64()

long GetInt64 ( string key)

Retrieves a 64-bit integer value by key.

Parameters
keyThe key of the value to retrieve.
Returns
The stored integer value.

Implemented in ArchiveBase, and Archive.

◆ GetInt64Array()

IReadOnlyList< long > GetInt64Array ( string key)

Retrieves an array of 64-bit integer values by key.

Parameters
keyThe key of the array to retrieve.
Returns
A read-only list of integer values.

Implemented in ArchiveBase, and Archive.

◆ GetKeys()

IReadOnlyList< string > GetKeys ( )

Gets all keys currently stored in the archive.

Returns
A read-only list containing all stored keys.

Implemented in ArchiveBase, and Archive.

◆ GetString()

string GetString ( string key)

Retrieves a string value by key.

Parameters
keyThe key of the value to retrieve.
Returns
The stored string value.

Implemented in ArchiveBase, and Archive.

◆ GetStringArray()

IReadOnlyList< string > GetStringArray ( string key)

Retrieves an array of string values by key.

Parameters
keyThe key of the array to retrieve.
Returns
A read-only list of string values.

Implemented in ArchiveBase, and Archive.

◆ GetValueKind()

ArchiveValueKind GetValueKind ( string key)

Gets the value kind associated with the specified key.

Parameters
keyThe key whose value kind is requested.
Returns
The kind of value stored under the key.

Implemented in ArchiveBase, and Archive.

◆ HasKey()

bool HasKey ( string key)

Determines whether a value exists for the specified key.

Parameters
keyThe key to check.
Returns
true if the key exists in the archive; otherwise, false.

Implemented in ArchiveBase, and Archive.

◆ SetArchive()

void SetArchive ( string key,
IArchive value )

Stores a nested archive under the specified key.

Parameters
keyThe key under which the archive is stored.
valueThe archive to store. Must not be null.

Implemented in ArchiveBase, and Archive.

◆ SetArchiveArray()

void SetArchiveArray ( string key,
IEnumerable< IArchive > value )

Stores an array of nested archives under the specified key.

Parameters
keyThe key under which the array is stored.
valueThe archives to store. Must not be null.

Implemented in ArchiveBase, and Archive.

◆ SetBool()

void SetBool ( string key,
bool value )

Stores a boolean value under the specified key.

Parameters
keyThe key under which the value is stored.
valueThe boolean value to store.

If a value already exists for key , it is overwritten.

Implemented in ArchiveBase, and Archive.

◆ SetBoolArray()

void SetBoolArray ( string key,
IEnumerable< bool > value )

Stores an array of boolean values under the specified key.

Parameters
keyThe key under which the array is stored.
valueThe boolean values to store. Must not be null.

Implemented in ArchiveBase, and Archive.

◆ SetDouble()

void SetDouble ( string key,
double value )

Stores a double-precision floating-point value under the specified key.

Parameters
keyThe key under which the value is stored.
valueThe floating-point value to store.

Implemented in ArchiveBase, and Archive.

◆ SetDoubleArray()

void SetDoubleArray ( string key,
IEnumerable< double > value )

Stores an array of double-precision floating-point values under the specified key.

Parameters
keyThe key under which the array is stored.
valueThe floating-point values to store. Must not be null.

Implemented in ArchiveBase, and Archive.

◆ SetInt64()

void SetInt64 ( string key,
long value )

Stores a 64-bit integer value under the specified key.

Parameters
keyThe key under which the value is stored.
valueThe integer value to store.

If a value already exists for key , it is overwritten.

Implemented in ArchiveBase, and Archive.

◆ SetInt64Array()

void SetInt64Array ( string key,
IEnumerable< long > value )

Stores an array of 64-bit integer values under the specified key.

Parameters
keyThe key under which the array is stored.
valueThe integer values to store. Must not be null.

Implemented in ArchiveBase, and Archive.

◆ SetString()

void SetString ( string key,
string value )

Stores a string value under the specified key.

Parameters
keyThe key under which the value is stored.
valueThe string value to store. Must not be null.

Implemented in ArchiveBase, and Archive.

◆ SetStringArray()

void SetStringArray ( string key,
IEnumerable< string > value )

Stores an array of string values under the specified key.

Parameters
keyThe key under which the array is stored.
valueThe string values to store. Must not be null.

Implemented in ArchiveBase, and Archive.