Ditto 2.0.2
Public Member Functions | Protected Member Functions | Properties | List of all members
DittoSDK.DittoMutableDocumentPath Class Reference

Provides an interface to specify a path to a key in a document that you can then call various update functions on. You obtain a DittoMutableDocumentPath by subscripting a DittoMutableDocument and you can then further subscript a DittoMutableDocumentPath to further specify the key of the document that you want to update. More...

Inheritance diagram for DittoSDK.DittoMutableDocumentPath:
DittoSDK.DocumentPath

Public Member Functions

void Set (object value, bool isDefault=false)
 Set a value at the document's key defined by the preceding subscripting. More...
 
void Remove ()
 Remove a value at the document's key defined by the preceding subscripting. If removing an index from an array, any subsequent indexes will be shifted left to fill the gap.
 

Protected Member Functions

override unsafe CBORObject GetCborObjectAtCurrentPath (PathAccessorType_t pathType)
 
abstract CBORObject GetCborObjectAtCurrentPath (PathAccessorType_t pathType)
 

Properties

DittoMutableCounter Counter [get]
 Gets the value at the previously specified key in the document as a DittoMutableCounter if possible, otherwise the return value will be null. More...
 
DittoMutableRegister Register [get]
 Gets the value at the previously specified key in the document as a DittoMutableRegister if possible, otherwise the return value will be null. More...
 
DittoMutableRGA RGA [get]
 Gets the value at the previously specified key in the document as a DittoMutableRGA if possible, otherwise the return value will be null. More...
 
DittoMutableDocumentPath this[string key] [get]
 Used to specify a path to a key in the document that you can subscript further to access a nested key in the document and eventually perform an update operation on. More...
 
DittoMutableDocumentPath this[int index] [get]
 Used to specify an index in the array at the preceding key-path specified through the subscripting defined previously. You can subscript the return value further to access a further nested key in the document and eventually perform an update operation. More...
 
- Properties inherited from DittoSDK.DocumentPath
object Value [get]
 Gets the value at the previously specified key in the document as an object if it exists, otherwise the return value will be null.
 
string String [get]
 Gets the value at the previously specified key in the document as a string if possible, otherwise the return value will be null.
 
string StringValue [get]
 Gets the value at the previously specified key in the document as a string if possible, otherwise the return value will be "" (an empty string).
 
int Int32Value [get]
 Gets the value at the previously specified key in the document as an Int32 if possible, otherwise the return value will be 0.
 
long Int64Value [get]
 Gets the value at the previously specified key in the document as an Int64 if possible, otherwise the return value will be 0.
 
uint UInt32Value [get]
 Gets the value at the previously specified key in the document as a UInt32 if possible, otherwise the return value will be 0.
 
ulong UInt64Value [get]
 Gets the value at the previously specified key in the document as a UInt64 if possible, otherwise the return value will be 0.
 
float FloatValue [get]
 Gets the value at the previously specified key in the document as a Float if possible, otherwise the return value will be 0.0.
 
double DoubleValue [get]
 Gets the value at the previously specified key in the document as a UInt32 if possible, otherwise the return value will be 0.
 
bool BooleanValue [get]
 Gets the value at the previously specified key in the document as a bool if possible, otherwise the return value will be false.
 
List< object > List [get]
 Gets the value at the previously specified key in the document as a List<object> if possible, otherwise the return value will be null.
 
List< object > ListValue [get]
 Gets the value at the previously specified key in the document as a List<object> if possible, otherwise the return value will be [] (an empty list).
 
Dictionary< string, object > Dictionary [get]
 Gets the value at the previously specified key in the document as a Dictionary<string, object> if possible, otherwise the return value will be null.
 
Dictionary< string, object > DictionaryValue [get]
 Gets the value at the previously specified key in the document as a Dictionary<string, object> if possible, otherwise the return value will be {} (an empty dictionary).
 
DittoAttachmentToken AttachmentToken [get]
 Gets the value at the previously specified key in the document as a DittoAttachmentToken if possible, otherwise the return value will be null.
 

Detailed Description

Provides an interface to specify a path to a key in a document that you can then call various update functions on. You obtain a DittoMutableDocumentPath by subscripting a DittoMutableDocument and you can then further subscript a DittoMutableDocumentPath to further specify the key of the document that you want to update.

Member Function Documentation

◆ GetCborObjectAtCurrentPath()

override unsafe CBORObject DittoSDK.DittoMutableDocumentPath.GetCborObjectAtCurrentPath ( PathAccessorType_t  pathType)
inlineprotectedvirtual

Implements DittoSDK.DocumentPath.

◆ Set()

void DittoSDK.DittoMutableDocumentPath.Set ( object  value,
bool  isDefault = false 
)
inline

Set a value at the document's key defined by the preceding subscripting.

Parameters
valueThe value to set at the subscripting-defined document key.
isDefaultRepresents whether or not the value should be set as a default value. Set this to true if you want to set a default value that you expect to be overwritten by other devices in the network. The default value is false.

Property Documentation

◆ Counter

DittoMutableCounter DittoSDK.DittoMutableDocumentPath.Counter
get

Gets the value at the previously specified key in the document as a DittoMutableCounter if possible, otherwise the return value will be null.

Returns
A DittoMutableCounter if a counter exists at the previously specified key, otherwise null

◆ Register

DittoMutableRegister DittoSDK.DittoMutableDocumentPath.Register
get

Gets the value at the previously specified key in the document as a DittoMutableRegister if possible, otherwise the return value will be null.

Returns
A DittoMutableRegister if a register exists at the previously specified key, otherwise null

◆ RGA

DittoMutableRGA DittoSDK.DittoMutableDocumentPath.RGA
get

Gets the value at the previously specified key in the document as a DittoMutableRGA if possible, otherwise the return value will be null.

Returns
A DittoMutableRGA if an RGA exists at the previously specified key, otherwise null

◆ this[int index]

DittoMutableDocumentPath DittoSDK.DittoMutableDocumentPath.this[int index]
get

Used to specify an index in the array at the preceding key-path specified through the subscripting defined previously. You can subscript the return value further to access a further nested key in the document and eventually perform an update operation.

Parameters
indexThe index of the array that you wish to access in the key previously specified with the preceding subscripting.
Returns
A DittoMutableDocumentPath with the provided index incorporated into the path.

◆ this[string key]

DittoMutableDocumentPath DittoSDK.DittoMutableDocumentPath.this[string key]
get

Used to specify a path to a key in the document that you can subscript further to access a nested key in the document and eventually perform an update operation on.

Parameters
keyThe next part of the path needed to get to the key in the document you wish to update.
Returns
A DittoMutableDocumentPath with the provided key incorporated into the path.