• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.12
  • kdelibs
  • kdecore
  • services
ktraderparsetree.cpp
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #include "ktraderparsetree_p.h"
21 
22 namespace KTraderParse {
23 
24 bool ParseTreeOR::eval( ParseContext *_context ) const
25 {
26  ParseContext c1( _context );
27  ParseContext c2( _context );
28 
29 // don't evaluate both expressions but return immediately
30 // if the first one of them succeeds. Otherwise queries like
31 // ((not exist Blah) or (Blah == 'Foo')) do not work, because
32 // the evaluation of the second term ends up in a fatal error
33 // (Simon)
34 
35  if ( !m_pLeft->eval( &c1 ) )
36  return false;
37 
38  if ( c1.type != ParseContext::T_BOOL )
39  return false;
40 
41  _context->b = c1.b;
42  _context->type = ParseContext::T_BOOL;
43  if ( c1.b )
44  return true;
45 
46  if ( !m_pRight->eval( &c2 ) )
47  return false;
48 
49  if ( c2.type != ParseContext::T_BOOL )
50  return false;
51 
52  _context->b = ( c1.b || c2.b );
53  _context->type = ParseContext::T_BOOL;
54 
55  return true;
56 }
57 
58 bool ParseTreeAND::eval( ParseContext *_context ) const
59 {
60  _context->type = ParseContext::T_BOOL;
61 
62  ParseContext c1( _context );
63  ParseContext c2( _context );
64  if ( !m_pLeft->eval( &c1 ) )
65  return false;
66  if ( c1.type != ParseContext::T_BOOL )
67  return false;
68  if ( !c1.b )
69  {
70  _context->b = false;
71  return true;
72  }
73 
74  if ( !m_pRight->eval( &c2 ) )
75  return false;
76  if ( c2.type != ParseContext::T_BOOL )
77  return false;
78 
79  _context->b = ( c1.b && c2.b );
80 
81  return true;
82 }
83 
84 bool ParseTreeCALC::eval( ParseContext *_context ) const
85 {
86  ParseContext c1( _context );
87  ParseContext c2( _context );
88  if ( !m_pLeft->eval( &c1 ) )
89  return false;
90  if ( !m_pRight->eval( &c2 ) )
91  return false;
92 
93  // Bool extension
94  if ( c1.type != ParseContext::T_NUM && c1.type != ParseContext::T_DOUBLE && c1.type != ParseContext::T_BOOL )
95  return false;
96  // Bool extension
97  if ( c2.type != ParseContext::T_NUM && c2.type != ParseContext::T_DOUBLE && c2.type != ParseContext::T_BOOL )
98  return false;
99  // Bool extension
100  if ( c1.type == ParseContext::T_BOOL && c2.type == ParseContext::T_BOOL )
101  return false;
102 
106  if ( c1.type == ParseContext::T_NUM && c2.type == ParseContext::T_DOUBLE )
107  {
108  c1.type = ParseContext::T_DOUBLE;
109  c1.f = (double)c1.i;
110  }
111  else if ( c1.type == ParseContext::T_DOUBLE && c2.type == ParseContext::T_NUM )
112  {
113  c2.type = ParseContext::T_DOUBLE;
114  c2.f = (double)c2.i;
115  }
116  // Bool extension
117  else if ( c1.type == ParseContext::T_BOOL && c2.type == ParseContext::T_NUM )
118  {
119  c1.type = ParseContext::T_NUM;
120  if ( c1.b )
121  c1.i = 1;
122  else
123  c1.i = -1;
124  }
125  // Bool extension
126  else if ( c1.type == ParseContext::T_BOOL && c2.type == ParseContext::T_DOUBLE )
127  {
128  c1.type = ParseContext::T_DOUBLE;
129  if ( c1.b )
130  c1.f = 1.0;
131  else
132  c1.f = -1.0;
133  }
134  // Bool extension
135  else if ( c1.type == ParseContext::T_NUM && c2.type == ParseContext::T_BOOL )
136  {
137  c2.type = ParseContext::T_NUM;
138  if ( c2.b )
139  c2.i = 1;
140  else
141  c2.i = -1;
142  }
143  // Bool extension
144  else if ( c1.type == ParseContext::T_DOUBLE && c2.type == ParseContext::T_BOOL )
145  {
146  c2.type = ParseContext::T_DOUBLE;
147  if ( c2.b )
148  c2.f = 1.0;
149  else
150  c2.f = -1.0;
151  }
152 
153  _context->type = c1.type;
154 
158  switch( m_cmd )
159  {
160  case 1: /* Add */
161  if ( c1.type == ParseContext::T_DOUBLE )
162  {
163  _context->f = ( c1.f + c2.f );
164  return true;
165  }
166  if ( c1.type == ParseContext::T_NUM )
167  {
168  _context->i = ( c1.i + c2.i );
169  return true;
170  }
171  break;
172  case 2: /* Sub */
173  if ( c1.type == ParseContext::T_DOUBLE )
174  {
175  _context->f = ( c1.f - c2.f );
176  return true;
177  }
178  if ( c1.type == ParseContext::T_NUM )
179  {
180  _context->i = ( c1.i - c2.i );
181  return true;
182  }
183  break;
184  case 3: /* Mul */
185  if ( c1.type == ParseContext::T_DOUBLE )
186  {
187  //cout << "Double Mult" << endl;
188  _context->f = ( c1.f * c2.f );
189  return true;
190  }
191  if ( c1.type == ParseContext::T_NUM )
192  {
193  _context->i = ( c1.i * c2.i );
194  return true;
195  }
196  break;
197  case 4: /* Div */
198  if ( c1.type == ParseContext::T_DOUBLE )
199  {
200  _context->f = ( c1.f / c2.f );
201  return true;
202  }
203  if ( c1.type == ParseContext::T_NUM )
204  {
205  _context->i = ( c1.i / c2.i );
206  return true;
207  }
208  break;
209  }
210 
211  return false;
212 }
213 
214 bool ParseTreeCMP::eval( ParseContext *_context ) const
215 {
216  //cout << "CMP 1 cmd=" << m_cmd << endl;
217  ParseContext c1( _context );
218  ParseContext c2( _context );
219  if ( !m_pLeft->eval( &c1 ) )
220  return false;
221 
222  if ( !m_pRight->eval( &c2 ) )
223  return false;
224 
228  if ( c1.type == ParseContext::T_NUM && c2.type == ParseContext::T_DOUBLE )
229  {
230  c1.type = ParseContext::T_DOUBLE;
231  c1.f = (double)c1.i;
232  }
233  else if ( c1.type == ParseContext::T_DOUBLE && c2.type == ParseContext::T_NUM )
234  {
235  c2.type = ParseContext::T_DOUBLE;
236  c2.f = (double)c2.i;
237  }
238 
242  _context->type = ParseContext::T_BOOL;
243 
244  switch( m_cmd )
245  {
246  case 1: /* EQ */
247  case 7: /* EQI */
248  if ( c1.type != c2.type )
249  {
250  _context->b = false;
251  return true;
252  }
253  if ( c1.type == ParseContext::T_STRING )
254  {
255  if (m_cmd == 7) {
256  _context->b = QString::compare(c1.str, c2.str, Qt::CaseInsensitive) == 0;
257  } else {
258  _context->b = ( c1.str == c2.str );
259  }
260  return true;
261  }
262  if ( c1.type == ParseContext::T_BOOL )
263  {
264  _context->b = ( c1.b == c2.b );
265  return true;
266  }
267  if ( c1.type == ParseContext::T_DOUBLE )
268  {
269  _context->b = ( c1.f == c2.f );
270  return true;
271  }
272  if ( c1.type == ParseContext::T_NUM )
273  {
274  _context->b = ( c1.i == c2.i );
275  return true;
276  }
277  break;
278  case 2: /* NEQ */
279  case 8: /* NEQI */
280  if ( c1.type != c2.type )
281  {
282  _context->b = true;
283  return true;
284  }
285  if ( c1.type == ParseContext::T_STRING ) {
286  if (m_cmd == 8) {
287  _context->b = QString::compare(c1.str, c2.str, Qt::CaseInsensitive) != 0;
288  } else {
289  _context->b = ( c1.str != c2.str );
290  }
291  return true;
292  }
293  if ( c1.type == ParseContext::T_BOOL )
294  {
295  _context->b = ( c1.b != c2.b );
296  return true;
297  }
298  if ( c1.type == ParseContext::T_DOUBLE )
299  {
300  _context->b = ( c1.f != c2.f );
301  return true;
302  }
303  if ( c1.type == ParseContext::T_NUM )
304  {
305  _context->b = ( c1.i != c2.i );
306  return true;
307  }
308  break;
309  case 3: /* GEQ */
310  if ( c1.type != c2.type )
311  {
312  _context->b = false;
313  return true;
314  }
315  if ( c1.type == ParseContext::T_DOUBLE )
316  {
317  _context->b = ( c1.f >= c2.f );
318  return true;
319  }
320  if ( c1.type == ParseContext::T_NUM )
321  {
322  _context->b = ( c1.i >= c2.i );
323  return true;
324  }
325  _context->b = false;
326  return true;
327 
328  case 4: /* LEQ */
329  if ( c1.type != c2.type )
330  {
331  _context->b = false;
332  return true;
333  }
334  if ( c1.type == ParseContext::T_DOUBLE )
335  {
336  _context->b = ( c1.f <= c2.f );
337  return true;
338  }
339  if ( c1.type == ParseContext::T_NUM )
340  {
341  _context->b = ( c1.i <= c2.i );
342  return true;
343  }
344  _context->b = false;
345  return true;
346 
347  case 5: /* < */
348  if ( c1.type != c2.type )
349  {
350  _context->b = false;
351  return true;
352  }
353  if ( c1.type == ParseContext::T_DOUBLE )
354  {
355  _context->b = ( c1.f < c2.f );
356  return true;
357  }
358  if ( c1.type == ParseContext::T_NUM )
359  {
360  _context->b = ( c1.i < c2.i );
361  return true;
362  }
363  _context->b = false;
364  return true;
365 
366  case 6: /* > */
367  if ( c1.type != c2.type )
368  {
369  _context->b = false;
370  return true;
371  }
372  if ( c1.type == ParseContext::T_DOUBLE )
373  {
374  _context->b = ( c1.f > c2.f );
375  return true;
376  }
377  if ( c1.type == ParseContext::T_NUM )
378  {
379  _context->b = ( c1.i > c2.i );
380  return true;
381  }
382  _context->b = false;
383  return true;
384 
385  }
386 
387  return false;
388 }
389 
390 bool ParseTreeNOT::eval( ParseContext *_context ) const
391 {
392  ParseContext c1( _context );
393  if ( !m_pLeft->eval( &c1 ) )
394  return false;
395  if ( c1.type != ParseContext::T_BOOL )
396  return false;
397 
398  _context->b = !c1.b;
399  _context->type = ParseContext::T_BOOL;
400 
401  return true;
402 }
403 
404 bool ParseTreeEXIST::eval( ParseContext *_context ) const
405 {
406  _context->type = ParseContext::T_BOOL;
407 
408  QVariant prop = _context->service->property( m_id );
409  _context->b = prop.isValid();
410 
411  return true;
412 }
413 
414 bool ParseTreeMATCH::eval( ParseContext *_context ) const
415 {
416  _context->type = ParseContext::T_BOOL;
417 
418  ParseContext c1( _context );
419  ParseContext c2( _context );
420  if ( !m_pLeft->eval( &c1 ) )
421  return false;
422  if ( !m_pRight->eval( &c2 ) )
423  return false;
424  if ( c1.type != ParseContext::T_STRING || c2.type != ParseContext::T_STRING )
425  return false;
426 
427  _context->b = c2.str.contains( c1.str, m_cs );
428 
429  return true;
430 }
431 
432 bool ParseTreeIN::eval( ParseContext *_context ) const
433 {
434  _context->type = ParseContext::T_BOOL;
435 
436  ParseContext c1( _context );
437  ParseContext c2( _context );
438  if ( !m_pLeft->eval( &c1 ) )
439  return false;
440  if ( !m_pRight->eval( &c2 ) )
441  return false;
442 
443  if ( (c1.type == ParseContext::T_NUM) &&
444  (c2.type == ParseContext::T_SEQ) &&
445  ((*(c2.seq.begin())).type() == QVariant::Int)) {
446 
447  QList<QVariant>::ConstIterator it = c2.seq.constBegin();
448  QList<QVariant>::ConstIterator end = c2.seq.constEnd();
449  _context->b = false;
450  for (; it != end; ++it)
451  if ((*it).type() == QVariant::Int &&
452  (*it).toInt() == c1.i) {
453  _context->b = true;
454  break;
455  }
456  return true;
457  }
458 
459  if ( c1.type == ParseContext::T_DOUBLE &&
460  c2.type == ParseContext::T_SEQ &&
461  (*(c2.seq.begin())).type() == QVariant::Double) {
462 
463  QList<QVariant>::ConstIterator it = c2.seq.constBegin();
464  QList<QVariant>::ConstIterator end = c2.seq.constEnd();
465  _context->b = false;
466  for (; it != end; ++it)
467  if ((*it).type() == QVariant::Double &&
468  (*it).toDouble() == c1.i) {
469  _context->b = true;
470  break;
471  }
472  return true;
473  }
474 
475  if (c1.type == ParseContext::T_STRING && c2.type == ParseContext::T_STR_SEQ)
476  {
477  if (false && m_substring) {
478  _context->b = false;
479  foreach (const QString &string, c2.strSeq) {
480  if (string.contains(c1.str, m_cs)) {
481  _context->b = true;
482  break;
483  }
484  }
485  } else {
486  _context->b = c2.strSeq.contains(c1.str, m_cs);
487  }
488 
489  return true;
490  }
491 
492  return false;
493 }
494 
495 bool ParseTreeID::eval( ParseContext *_context ) const
496 {
497  QVariant prop = _context->service->property( m_str );
498  if ( !prop.isValid() )
499  return false;
500 
501  if ( prop.type() == QVariant::String )
502  {
503  _context->str = prop.toString();
504  _context->type = ParseContext::T_STRING;
505  return true;
506  }
507 
508  if ( prop.type() == QVariant::Int )
509  {
510  _context->i = prop.toInt();
511  _context->type = ParseContext::T_NUM;
512  return true;
513  }
514 
515  if ( prop.type() == QVariant::Bool )
516  {
517  _context->b = prop.toBool();
518  _context->type = ParseContext::T_BOOL;
519  return true;
520  }
521 
522  if ( prop.type() == QVariant::Double )
523  {
524  _context->f = prop.toDouble();
525  _context->type = ParseContext::T_DOUBLE;
526  return true;
527  }
528 
529  if ( prop.type() == QVariant::List )
530  {
531  _context->seq = prop.toList();
532  _context->type = ParseContext::T_SEQ;
533  return true;
534  }
535 
536  if ( prop.type() == QVariant::StringList )
537  {
538  _context->strSeq = prop.toStringList();
539  _context->type = ParseContext::T_STR_SEQ;
540  return true;
541  }
542 
543  // Value has unknown type
544  return false;
545 }
546 
547 bool ParseTreeMIN2::eval( ParseContext *_context ) const
548 {
549  _context->type = ParseContext::T_DOUBLE;
550 
551  QVariant prop = _context->service->property( m_strId );
552  if ( !prop.isValid() )
553  return false;
554 
555  if ( !_context->initMaxima( m_strId ) )
556  return false;
557 
558  QMap<QString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
559  if ( it == _context->maxima.end() )
560  return false;
561 
562  if ( prop.type() == QVariant::Int && it.value().type == PreferencesMaxima::PM_INT )
563  {
564  _context->f = (double)( prop.toInt() - it.value().iMin ) /
565  (double)(it.value().iMax - it.value().iMin ) * (-2.0) + 1.0;
566  return true;
567  }
568  else if ( prop.type() == QVariant::Double && it.value().type == PreferencesMaxima::PM_DOUBLE )
569  {
570  _context->f = ( prop.toDouble() - it.value().fMin ) / (it.value().fMax - it.value().fMin )
571  * (-2.0) + 1.0;
572  return true;
573  }
574 
575  return false;
576 }
577 
578 bool ParseTreeMAX2::eval( ParseContext *_context ) const
579 {
580  _context->type = ParseContext::T_DOUBLE;
581 
582  QVariant prop = _context->service->property( m_strId );
583  if ( !prop.isValid() )
584  return false;
585 
586  // Create extrema
587  if ( !_context->initMaxima( m_strId ) )
588  return false;
589 
590  // Find extrema
591  QMap<QString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
592  if ( it == _context->maxima.end() )
593  return false;
594 
595  if ( prop.type() == QVariant::Int && it.value().type == PreferencesMaxima::PM_INT )
596  {
597  _context->f = (double)( prop.toInt() - it.value().iMin ) /
598  (double)(it.value().iMax - it.value().iMin ) * 2.0 - 1.0;
599  return true;
600  }
601  else if ( prop.type() == QVariant::Double && it.value().type == PreferencesMaxima::PM_DOUBLE )
602  {
603  _context->f = ( prop.toDouble() - it.value().fMin ) /
604  (it.value().fMax - it.value().fMin ) * 2.0 - 1.0;
605  return true;
606  }
607 
608  return false;
609 }
610 
611 int matchConstraint( const ParseTreeBase *_tree, const KService::Ptr &_service,
612  const KService::List& _list )
613 {
614  // Empty tree matches always
615  if ( !_tree )
616  return 1;
617 
618  QMap<QString,PreferencesMaxima> maxima;
619  ParseContext c( _service, _list, maxima );
620 
621  // Error during evaluation ?
622  if ( !_tree->eval( &c ) )
623  return -1;
624 
625  // Did we get a bool ?
626  if ( c.type != ParseContext::T_BOOL )
627  return -1;
628 
629  return ( c.b ? 1 : 0 );
630 }
631 
632 bool ParseContext::initMaxima( const QString& _prop )
633 {
634  // Is the property known ?
635  QVariant prop = service->property( _prop );
636  if ( !prop.isValid() )
637  return false;
638 
639  // Numeric ?
640  if ( prop.type() != QVariant::Int && prop.type() != QVariant::Double )
641  return false;
642 
643  // Did we cache the result ?
644  QMap<QString,PreferencesMaxima>::Iterator it = maxima.find( _prop );
645  if ( it != maxima.end() )
646  return ( it.value().type == PreferencesMaxima::PM_DOUBLE ||
647  it.value().type == PreferencesMaxima::PM_INT );
648 
649  // Double or Int ?
650  PreferencesMaxima extrema;
651  if ( prop.type() == QVariant::Int )
652  extrema.type = PreferencesMaxima::PM_INVALID_INT;
653  else
654  extrema.type = PreferencesMaxima::PM_INVALID_DOUBLE;
655 
656  // Iterate over all offers
657  KService::List::ConstIterator oit = offers.begin();
658  for( ; oit != offers.end(); ++oit )
659  {
660  QVariant p = (*oit)->property( _prop );
661  if ( p.isValid() )
662  {
663  // Determine new maximum/minimum
664  if ( extrema.type == PreferencesMaxima::PM_INVALID_INT )
665  {
666  extrema.type = PreferencesMaxima::PM_INT;
667  extrema.iMin = p.toInt();
668  extrema.iMax = p.toInt();
669  }
670  // Correct existing extrema
671  else if ( extrema.type == PreferencesMaxima::PM_INT )
672  {
673  if ( p.toInt() < extrema.iMin )
674  extrema.iMin = p.toInt();
675  if ( p.toInt() > extrema.iMax )
676  extrema.iMax = p.toInt();
677  }
678  // Determine new maximum/minimum
679  else if ( extrema.type == PreferencesMaxima::PM_INVALID_DOUBLE )
680  {
681  extrema.type = PreferencesMaxima::PM_DOUBLE;
682  extrema.fMin = p.toDouble();
683  extrema.fMax = p.toDouble();
684  }
685  // Correct existing extrema
686  else if ( extrema.type == PreferencesMaxima::PM_DOUBLE )
687  {
688  if ( p.toDouble() < it.value().fMin )
689  extrema.fMin = p.toDouble();
690  if ( p.toDouble() > it.value().fMax )
691  extrema.fMax = p.toDouble();
692  }
693  }
694  }
695 
696  // Cache the result
697  maxima.insert( _prop, extrema );
698 
699  // Did we succeed ?
700  return ( extrema.type == PreferencesMaxima::PM_DOUBLE ||
701  extrema.type == PreferencesMaxima::PM_INT );
702 }
703 
704 }
QVariant
ktraderparsetree_p.h
KTraderParse::PreferencesMaxima::PM_INVALID_DOUBLE
Definition: ktraderparsetree_p.h:52
KSharedPtr< KService >
KTraderParse::ParseTreeAND::m_pLeft
ParseTreeBase::Ptr m_pLeft
Definition: ktraderparsetree_p.h:136
KTraderParse::ParseContext::offers
const KService::List & offers
Definition: ktraderparsetree_p.h:92
KTraderParse::ParseContext::type
Type type
Definition: ktraderparsetree_p.h:87
KTraderParse::PreferencesMaxima::PM_DOUBLE
Definition: ktraderparsetree_p.h:52
KTraderParse::ParseContext::service
KService::Ptr service
Definition: ktraderparsetree_p.h:89
KTraderParse::ParseTreeCALC::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:84
KTraderParse::ParseTreeOR::m_pLeft
ParseTreeBase::Ptr m_pLeft
Definition: ktraderparsetree_p.h:121
KTraderParse::ParseTreeCMP::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:214
KTraderParse::ParseTreeIN::m_cs
Qt::CaseSensitivity m_cs
Definition: ktraderparsetree_p.h:175
KTraderParse::ParseContext::seq
QList< QVariant > seq
Definition: ktraderparsetree_p.h:85
KTraderParse::ParseTreeMATCH::m_pRight
ParseTreeBase::Ptr m_pRight
Definition: ktraderparsetree_p.h:191
KTraderParse::ParseTreeBase
Definition: ktraderparsetree_p.h:98
KTraderParse::PreferencesMaxima::PM_INT
Definition: ktraderparsetree_p.h:52
KService::property
QVariant property(const QString &_name, QVariant::Type t) const
Returns the requested property.
Definition: kservice.cpp:498
KTraderParse::ParseTreeIN::m_pLeft
ParseTreeBase::Ptr m_pLeft
Definition: ktraderparsetree_p.h:173
KTraderParse::ParseTreeOR::m_pRight
ParseTreeBase::Ptr m_pRight
Definition: ktraderparsetree_p.h:122
KTraderParse::ParseTreeOR::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:24
double
KTraderParse::ParseContext::i
int i
Definition: ktraderparsetree_p.h:82
QString
KTraderParse::PreferencesMaxima::iMin
int iMin
Definition: ktraderparsetree_p.h:56
KTraderParse::ParseTreeIN::m_pRight
ParseTreeBase::Ptr m_pRight
Definition: ktraderparsetree_p.h:174
KTraderParse::ParseTreeIN::m_substring
bool m_substring
Definition: ktraderparsetree_p.h:176
KTraderParse::ParseTreeCALC::m_cmd
int m_cmd
Definition: ktraderparsetree_p.h:208
KTraderParse::ParseTreeAND::m_pRight
ParseTreeBase::Ptr m_pRight
Definition: ktraderparsetree_p.h:137
KTraderParse::ParseContext::f
double f
Definition: ktraderparsetree_p.h:83
KTraderParse::ParseTreeMIN2::m_strId
QString m_strId
Definition: ktraderparsetree_p.h:350
KTraderParse::ParseTreeCALC::m_pRight
ParseTreeBase::Ptr m_pRight
Definition: ktraderparsetree_p.h:207
KTraderParse::ParseTreeMAX2::m_strId
QString m_strId
Definition: ktraderparsetree_p.h:336
KTraderParse::ParseTreeID::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:495
KTraderParse::ParseTreeBase::eval
virtual bool eval(ParseContext *_context) const =0
KTraderParse::ParseContext::maxima
QMap< QString, PreferencesMaxima > & maxima
Definition: ktraderparsetree_p.h:91
KTraderParse::ParseContext::initMaxima
bool initMaxima(const QString &_prop)
Definition: ktraderparsetree.cpp:632
KTraderParse::ParseTreeID::m_str
QString m_str
Definition: ktraderparsetree_p.h:264
KTraderParse::matchConstraint
int matchConstraint(const ParseTreeBase *_tree, const KService::Ptr &_service, const KService::List &_list)
Definition: ktraderparsetree.cpp:611
KTraderParse::ParseTreeCMP::m_pRight
ParseTreeBase::Ptr m_pRight
Definition: ktraderparsetree_p.h:152
KTraderParse::ParseTreeMIN2::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:547
KTraderParse::ParseTreeAND::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:58
KTraderParse::ParseContext::T_BOOL
Definition: ktraderparsetree_p.h:78
KTraderParse::ParseTreeMATCH::m_pLeft
ParseTreeBase::Ptr m_pLeft
Definition: ktraderparsetree_p.h:190
KTraderParse::ParseTreeEXIST::m_id
QString m_id
Definition: ktraderparsetree_p.h:250
KTraderParse::ParseTreeMAX2::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:578
KTraderParse::ParseTreeMATCH::m_cs
Qt::CaseSensitivity m_cs
Definition: ktraderparsetree_p.h:192
KTraderParse::ParseTreeMATCH::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:414
KTraderParse::ParseTreeNOT::m_pLeft
ParseTreeBase::Ptr m_pLeft
Definition: ktraderparsetree_p.h:236
KTraderParse::ParseContext::strSeq
QStringList strSeq
Definition: ktraderparsetree_p.h:86
KTraderParse::ParseTreeEXIST::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:404
KTraderParse::PreferencesMaxima::PM_INVALID_INT
Definition: ktraderparsetree_p.h:52
KTraderParse::ParseContext::b
bool b
Definition: ktraderparsetree_p.h:84
KTraderParse::ParseTreeIN::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:432
KTraderParse::ParseContext::T_STRING
Definition: ktraderparsetree_p.h:78
KTraderParse::PreferencesMaxima::type
Type type
Definition: ktraderparsetree_p.h:54
KTraderParse::ParseContext
Definition: ktraderparsetree_p.h:64
KTraderParse::PreferencesMaxima
Definition: ktraderparsetree_p.h:45
KTraderParse::PreferencesMaxima::iMax
int iMax
Definition: ktraderparsetree_p.h:55
KTraderParse::PreferencesMaxima::fMax
double fMax
Definition: ktraderparsetree_p.h:57
Kuit::Tag::List
Definition: kuitsemantics.cpp:84
KTraderParse::PreferencesMaxima::fMin
double fMin
Definition: ktraderparsetree_p.h:58
KTraderParse::ParseTreeNOT::eval
bool eval(ParseContext *_context) const
Definition: ktraderparsetree.cpp:390
KTraderParse::ParseContext::T_DOUBLE
Definition: ktraderparsetree_p.h:78
KTraderParse::ParseContext::str
QString str
Definition: ktraderparsetree_p.h:81
KTraderParse::ParseContext::T_SEQ
Definition: ktraderparsetree_p.h:79
KTraderParse::ParseTreeCALC::m_pLeft
ParseTreeBase::Ptr m_pLeft
Definition: ktraderparsetree_p.h:206
KTraderParse::ParseTreeCMP::m_cmd
int m_cmd
Definition: ktraderparsetree_p.h:153
KTraderParse::ParseContext::T_STR_SEQ
Definition: ktraderparsetree_p.h:79
KTraderParse::ParseTreeCMP::m_pLeft
ParseTreeBase::Ptr m_pLeft
Definition: ktraderparsetree_p.h:151
QMap
QList
Definition: kaboutdata.h:33
KTraderParse::ParseContext::T_NUM
Definition: ktraderparsetree_p.h:78
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal