lib

operatordictionary.h

00001 //
00002 // Created: Sat Aug 26 20:12:37 2006
00003 //      by: oper-dict.py
00004 //    from: appendixf.html
00005 //
00006 // WARNING! All changes made in this file will be lost!
00007 
00008 /* This file is part of the KDE project
00009    Copyright (C) 2006 Alfredo Beaumont Sainz <alfredo.beaumont@gmail.com>
00010 
00011    This library is free software; you can redistribute it and/or
00012    modify it under the terms of the GNU Library General Public
00013    License as published by the Free Software Foundation; either
00014    version 2 of the License, or (at your option) any later version.
00015  
00016    This library is distributed in the hope that it will be useful,
00017    but WITHOUT ANY WARRANTY; without even the implied warranty of
00018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019    Library General Public License for more details.
00020  
00021    You should have received a copy of the GNU Library General Public License
00022    along with this library; see the file COPYING.LIB.  If not, write to
00023    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00024  * Boston, MA 02110-1301, USA.
00025 */
00026 
00027 
00028 #ifndef OPERATORDICTIONARY_H
00029 #define OPERATORDICTIONARY_H
00030 
00031 #include "kformuladefs.h"
00032 
00033 KFORMULA_NAMESPACE_BEGIN
00034     
00035 struct DictionaryKey
00036 {
00037     int operator==( const DictionaryKey& right ) const {
00038         if ( qstrcmp( name, right.name ) || qstrcmp( form, right.form ) ) {
00039             return false;
00040         }
00041         return true;
00042     }
00043     const char* name;
00044     const char* form;
00045 };
00046 
00047 struct OperatorDictionary {
00048     static int size();
00049     int operator<( const DictionaryKey& right ) const {
00050         int equal = qstrcmp( key.name, right.name );
00051         if ( equal != 0 ) {
00052             return equal < 0;
00053         }
00054         return qstrcmp( key.form, right.form ) < 0;
00055     }
00056     const DictionaryKey key;
00057     const char* lspace;
00058     const char* rspace;
00059     const char* maxsize;
00060     const char* minsize;
00061     bool fence;
00062     bool separator;
00063     bool stretchy;
00064     bool symmetric;
00065     bool largeop;
00066     bool movablelimits;
00067     bool accent;
00068 };
00069     
00070 extern const OperatorDictionary operators[];
00071 
00072 KFORMULA_NAMESPACE_END
00073 
00074 #endif // OPERATORDICTIONARY_H
00075 
KDE Home | KDE Accessibility Home | Description of Access Keys