kconfigdata.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef _KCONFIGDATA_H
00023
#define _KCONFIGDATA_H
00024
00025
#include <qmap.h>
00026
00031 struct KEntry
00032 {
00033
KEntry()
00034 : mValue(0),
bDirty(
false),
bNLS(
false),
00035
bGlobal(
false),
bImmutable(
false),
bDeleted(
false),
bExpand(
false) {}
00036
QCString mValue;
00040 bool bDirty :1;
00044 bool bNLS :1;
00048 bool bGlobal:1;
00052 bool bImmutable:1;
00056 bool bDeleted:1;
00060 bool bExpand:1;
00061 };
00062
00068 struct KEntryKey
00069 {
00070
KEntryKey(
const QCString& _group = 0,
00071
const QCString& _key = 0)
00072 :
mGroup(_group),
mKey(_key),
bLocal(
false),
bDefault(
false),
00073 c_key(_key.data()) {}
00077 QCString mGroup;
00081 QCString mKey;
00085 bool bLocal :1;
00089 bool bDefault:1;
00090
00091
const char *c_key;
00092 };
00093
00098
inline bool operator <(
const KEntryKey &k1,
const KEntryKey &k2)
00099 {
00100
00101
int result=qstrcmp(k1.
mGroup.data(),k2.
mGroup.data());
00102
if (result!=0)
00103
return (result<0);
00104
00105
if (!k1.
c_key && k2.
c_key)
00106
return true;
00107
00108 result = 0;
00109
if (k1.
c_key && k2.
c_key)
00110 result = strcmp(k1.
c_key, k2.
c_key);
00111
if (result != 0)
00112
return result < 0;
00113
if (!k1.
bLocal && k2.
bLocal)
00114
return true;
00115
if (k1.
bLocal && !k2.
bLocal)
00116
return false;
00117
return (!k1.
bDefault && k2.
bDefault);
00118 }
00119
00127
typedef QMap<KEntryKey, KEntry> KEntryMap;
00128
00134
typedef QMap<KEntryKey, KEntry>::Iterator KEntryMapIterator;
00135
00143
typedef QMap<KEntryKey, KEntry>::ConstIterator KEntryMapConstIterator;
00144
00145
#endif
This file is part of the documentation for kdecore Library Version 3.3.0.