Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
List of all members
CKeySet Class Reference

Description

Set of strings (keys).

Definition at line 1306 of file base.H.

#include "base.H"

Inheritance diagram for CKeySet:
Inheritance graph
[legend]

Public Member Functions

Read access ...
const char * operator[] (int idx)
 
Write access ...
int Set (const char *key)
 
void Merge (CKeySet *set2)
 Merge another map into this one. Complexity is O(n_this + n_set2). 'set2' will be empty afterwards. More...
 
Debugging ...
virtual void Dump (const char *name)
 Dump contents by means of INFO logs (for debugging)
 
- Public Member Functions inherited from CDictRaw
void Del (int idx)
 Delete entry; complexity is O(n). More...
 
void Del (const char *key)
 Delete entry by key; complexity is O(n).
 
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...
 
- 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

◆ Merge()

void CKeySet::Merge ( CKeySet set2)
inline

Merge another map into this one. Complexity is O(n_this + n_set2). 'set2' will be empty afterwards.

The recommended way to add a bunch of new entries to a dictionary is to first add them to a new dictionary and then use this method to merge them into 'this'.

Definition at line 1318 of file base.H.


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