Elektra  0.8.25
Namespaces | Functions
comparison.hpp File Reference

Comparison helper functions. More...

#include <kdb.hpp>
#include <string>
Include dependency graph for comparison.hpp:
This graph shows which files directly or indirectly include this file:

Namespaces

 kdb
 This is the main namespace for the C++ binding and libraries.
 
 kdb::tools
 This namespace is for the libtool library.
 

Functions

bool kdb::tools::helper::keyDataEqual (const Key &, const Key &)
 Determines if two keys are equal based on their string value If one of the two keys is null, false is returned. More...
 
bool kdb::tools::helper::keyMetaEqual (Key &, Key &)
 Determines if two keys have equal metadata. More...
 

Detailed Description

Comparison helper functions.

Function Documentation

◆ keyDataEqual()

bool kdb::tools::helper::keyDataEqual ( const Key k1,
const Key k2 
)

Determines if two keys are equal based on their string value If one of the two keys is null, false is returned.

Parameters
k1the first key to be compared
k2the second key to be compared
Returns
true if both keys are not null and have an equal string value, false otherwise

◆ keyMetaEqual()

bool kdb::tools::helper::keyMetaEqual ( Key k1,
Key k2 
)

Determines if two keys have equal metadata.

The keys are not const because their meta cursor is changed

Parameters
k1the first key whose metadata should be compared
k2the second key whose metadata should be compared
Returns
true if the keys have equal metadata, false otherwise