KDevelop API Documentation

Trie.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           Trie.h  -  description
00003                              -------------------
00004     begin                : Fri Dec 7 2001
00005     copyright            : (C) 2001 by Eray Ozkural
00006     email                : erayo@cs.bilkent.edu.tr
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include <qstring.h>
00019 
00020 namespace Structure {
00021 
00022  inline char blank(const QString& str) {
00023    return ' ';
00024  }
00025 
00026  inline char first(const QString& str) {
00027    return str[0];
00028  }
00029 
00030  inline void strip(QString& str) {
00031    str.remove(0,1);
00032  }
00033 
00034  inline bool empty(const QString& str) {
00035    return str.isEmpty();
00036  }
00037 
00038  inline int length(const QString& str) {
00039    return str.length();
00040  }
00041 
00042  inline void add_prefix(QString& str, const char& prefix) {
00043    str.prepend(prefix);
00044  //   cout << "add_prefix: prefix=<" << prefix <<  ">" << endl;
00045  //   cout << "add_prefix: <" << str << ">" << endl;
00046  }
00047 
00048 }
00049 
00050 #include "Trie.hxx"
00051 
00052 namespace Structure {
00053 
00054   typedef  Trie<char, QString, int> KStringIntTrie;
00055 
00056 }
00057 
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:52 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003