• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
tdeconfigdata.h
1/*
2 This file is part of the KDE libraries
3 Copyright (c) 1999-2000 Preston Brown <pbrown@kde.org>
4 Copyright (C) 1996-2000 Matthias Kalle Dalheimer <kalle@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#ifndef _TDECONFIGDATA_H
23#define _TDECONFIGDATA_H
24
25#include <tqmap.h> // generic red-black tree class
26#include "tdelibs_export.h"
27
32struct TDECORE_EXPORT KEntry
33{
34 KEntry()
35 : mValue(0), bDirty(false), bNLS(false),
36 bGlobal(false), bImmutable(false), bDeleted(false), bExpand(false) {}
37 TQCString mValue;
41 bool bDirty :1;
45 bool bNLS :1;
49 bool bGlobal:1;
53 bool bImmutable:1;
57 bool bDeleted:1;
61 bool bExpand:1;
62};
63
69struct TDECORE_EXPORT KEntryKey
70{
71 KEntryKey(const TQCString& _group = 0,
72 const TQCString& _key = 0)
73 : mGroup(_group), mKey(_key), bLocal(false), bDefault(false),
74 c_key(_key.data()) {}
78 TQCString mGroup;
82 TQCString mKey;
86 bool bLocal :1;
90 bool bDefault:1;
91
92 const char *c_key;
93};
94
99inline bool operator <(const KEntryKey &k1, const KEntryKey &k2)
100{
101 //saves one strcmp on each call
102 int result=qstrcmp(k1.mGroup.data(),k2.mGroup.data());
103 if (result!=0)
104 return (result<0);
105
106 if (!k1.c_key && k2.c_key)
107 return true;
108
109 result = 0;
110 if (k1.c_key && k2.c_key)
111 result = strcmp(k1.c_key, k2.c_key);
112 if (result != 0)
113 return result < 0;
114 if (!k1.bLocal && k2.bLocal)
115 return true;
116 if (k1.bLocal && !k2.bLocal)
117 return false;
118 return (!k1.bDefault && k2.bDefault);
119}
120
128typedef TQMap<KEntryKey, KEntry> KEntryMap;
129
135typedef TQMap<KEntryKey, KEntry>::Iterator KEntryMapIterator;
136
144typedef TQMap<KEntryKey, KEntry>::ConstIterator KEntryMapConstIterator;
145
146#endif
KEntryKey
key structure holding both the actual key and the the group to which it belongs.
Definition: tdeconfigdata.h:70
KEntryKey::bDefault
bool bDefault
Entry indicates if this is a default value.
Definition: tdeconfigdata.h:90
KEntryKey::bLocal
bool bLocal
Entry is localised or not.
Definition: tdeconfigdata.h:86
KEntryKey::mGroup
TQCString mGroup
The "group" to which this EntryKey belongs.
Definition: tdeconfigdata.h:78
KEntryKey::mKey
TQCString mKey
The actual key of the entry in question.
Definition: tdeconfigdata.h:82
KEntry
map/dict/list config node entry.
Definition: tdeconfigdata.h:33
KEntry::KEntryMapConstIterator
TQMap< KEntryKey, KEntry >::ConstIterator KEntryMapConstIterator
type for iterating over keys in a KEntryMap in sorted order.
Definition: tdeconfigdata.h:144
KEntry::bImmutable
bool bImmutable
Entry can not be modified.
Definition: tdeconfigdata.h:53
KEntry::bNLS
bool bNLS
Entry should be written with locale tag.
Definition: tdeconfigdata.h:45
KEntry::bGlobal
bool bGlobal
Entry should be written to the global config file.
Definition: tdeconfigdata.h:49
KEntry::bExpand
bool bExpand
Whether to apply dollar expansion or not.
Definition: tdeconfigdata.h:61
KEntry::bDirty
bool bDirty
Must the entry be written back to disk?
Definition: tdeconfigdata.h:41
KEntry::KEntryMapIterator
TQMap< KEntryKey, KEntry >::Iterator KEntryMapIterator
type for iterating over keys in a KEntryMap in sorted order.
Definition: tdeconfigdata.h:135
KEntry::KEntryMap
TQMap< KEntryKey, KEntry > KEntryMap
type specifying a map of entries (key,value pairs).
Definition: tdeconfigdata.h:128
KEntry::bDeleted
bool bDeleted
Entry has been deleted.
Definition: tdeconfigdata.h:57

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.