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
#include "kdelibs_export.h"
00027
00032 struct KDECORE_EXPORT KEntry
00033 {
00034 KEntry()
00035 : mValue(0), bDirty(
false), bNLS(
false),
00036 bGlobal(
false), bImmutable(
false), bDeleted(
false), bExpand(
false) {}
00037
QCString mValue;
00041 bool bDirty :1;
00045 bool bNLS :1;
00049 bool bGlobal:1;
00053 bool bImmutable:1;
00057 bool bDeleted:1;
00061 bool bExpand:1;
00062 };
00063
00069 struct KDECORE_EXPORT KEntryKey
00070 {
00071 KEntryKey(
const QCString& _group = 0,
00072
const QCString& _key = 0)
00073 : mGroup(_group), mKey(_key), bLocal(
false), bDefault(
false),
00074 c_key(_key.data()) {}
00078 QCString mGroup;
00082 QCString mKey;
00086 bool bLocal :1;
00090 bool bDefault:1;
00091
00092
const char *c_key;
00093 };
00094
00099
inline bool operator <(
const KEntryKey &k1,
const KEntryKey &k2)
00100 {
00101
00102
int result=qstrcmp(k1.
mGroup.data(),k2.
mGroup.data());
00103
if (result!=0)
00104
return (result<0);
00105
00106
if (!k1.
c_key && k2.
c_key)
00107
return true;
00108
00109 result = 0;
00110
if (k1.
c_key && k2.
c_key)
00111 result = strcmp(k1.
c_key, k2.
c_key);
00112
if (result != 0)
00113
return result < 0;
00114
if (!k1.
bLocal && k2.
bLocal)
00115
return true;
00116
if (k1.
bLocal && !k2.
bLocal)
00117
return false;
00118
return (!k1.
bDefault && k2.
bDefault);
00119 }
00120
00128
typedef QMap<KEntryKey, KEntry> KEntryMap;
00129
00135
typedef QMap<KEntryKey, KEntry>::Iterator
KEntryMapIterator;
00136
00144
typedef QMap<KEntryKey, KEntry>::ConstIterator
KEntryMapConstIterator;
00145
00146
#endif
This file is part of the documentation for kdecore Library Version 3.4.0.