Home2L - C/C++ API  v1.2-2-ga4fe (2023-04-15)
Smart Tools for a Private Home
List of all members
CDictRaw Class Reference

Description

Raw dictionary (base class for other dictionary variants).

This class stores typeless value data and is the base class for the other dirctionary classes. It should not be used directly.

Definition at line 1137 of file base.H.

#include "base.H"

Inheritance diagram for CDictRaw:
Inheritance graph
[legend]

Public Member Functions

Read access ...
void Del (int idx)
 Delete entry; complexity is O(n). More...
 
void Del (const char *key)
 Delete entry by key; complexity is O(n).
 
Write access ...
const char * GetKey (int idx) const
 Get key by index.
 
int Find (const char *key, int *retInsIdx=NULL)
 Make binary search and return index of entry found or -1 if the key does not exist. If retInsIdx != NULL, the index to insert a new item is return in *retInsIdx.
 
void PrefixSearch (const char *key, int *retIdx0, int *retIdx1)
 Determine all elements with keys starting with key. More...
 
Debugging ...
virtual void Dump (const char *name)
 Dump contents by means of INFO logs (for debugging)
 
- Public Member Functions inherited from CListRaw
int Entries () const
 Get number of entries.
 
void Clear ()
 Clear the list.
 
void Del (int idx)
 Delete entry; complexity is O(n).
 

Member Function Documentation

◆ Del()

void CDictRaw::Del ( int  idx)
inline

Delete entry; complexity is O(n).

     Entries with indices < 'idx' remain unchanged, all other entries may be modified.
     This is important to consider if, for example, multiple entries are to be deleted in a loop.
     Such a loop is legal if it traverses the indices in reverse order. 

Definition at line 1143 of file base.H.

◆ PrefixSearch()

void CDictRaw::PrefixSearch ( const char *  key,
int *  retIdx0,
int *  retIdx1 
)

Determine all elements with keys starting with key.

Parameters
keyKey prefix
retIdx0Pointer to first return value, index of first matching entry.
retIdx1Pointer to second return value, index behind last matching entry.

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