lib
operatordictionary.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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
|