KDevelop API Documentation

lib/cppparser/lookup.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 2 -*- 00002 /* 00003 * This file is part of the KDE libraries 00004 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 // adapted to kdevelop by Roberto Raggi <roberto@kdevelop.org> 00023 00024 #ifndef _KJSLOOKUP_H_ 00025 #define _KJSLOOKUP_H_ 00026 00027 #include <qstring.h> 00028 #include <stdio.h> 00029 00033 struct HashEntry { 00037 const char *s; 00041 int value; 00045 short int attr; 00050 short int params; 00054 const HashEntry *next; 00055 }; 00056 00068 struct HashTable { 00072 int type; 00078 int size; 00083 const HashEntry *entries; 00087 int hashSize; 00088 }; 00089 00093 class Lookup { 00094 public: 00098 static int find(const struct HashTable *table, const QString& s); 00099 static int find(const struct HashTable *table, const QChar *c, unsigned int len); 00100 00106 static const HashEntry* findEntry(const struct HashTable *table, 00107 const QString &s); 00108 static const HashEntry* findEntry(const struct HashTable *table, 00109 const QChar *c, unsigned int len); 00110 00114 static unsigned int hash(const QString &key); 00115 static unsigned int hash(const QChar *c, unsigned int len); 00116 static unsigned int hash(const char *s); 00117 }; 00118 00119 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 6 17:39:07 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003