SBufCaseInsensitiveLess Class Reference

#include <LookupTable.h>

Inheritance diagram for SBufCaseInsensitiveLess:
Collaboration diagram for SBufCaseInsensitiveLess:

Public Member Functions

bool operator() (const SBuf &x, const SBuf &y) const
 

Detailed Description

SBuf -> case-insensitive enum lookup table

How to use: enum enum_type { ... }; static const LookupTable<enum_type>::Record initializerTable[] = { {"key1", ENUM_1}, {"key2", ENUM_2}, ... {nullptr, ENUM_INVALID_VALUE} }; LookupTable<enum_type> lookupTableInstance(ENUM_INVALID_VALUE, initializerTable);

then in the code: SBuf s(string_to_lookup); enum_type item = lookupTableInstance.lookup(s); if (item != ENUM_INVALID_VALUE) { // do stuff }

Definition at line 50 of file LookupTable.h.

Member Function Documentation

bool SBufCaseInsensitiveLess::operator() ( const SBuf x,
const SBuf y 
) const
inline

Definition at line 52 of file LookupTable.h.

References SBuf::caseCmp().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors