Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

String.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2001 Carnegie Mellon University.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010 */
00011 
00012 
00013 #ifndef _STRINGH_
00014 #define _STRINGH_
00015 
00016 #include "common_headers.hpp"
00017 #include "ByteHash.hpp"
00018 
00019 class String : public string {
00020   public:
00021     String() : string() {}
00022     String(const char * p) : string(p) {}
00023     String(const string & s) : string(s) {}
00024     String(unsigned int n, char c) : string(n, c) {}
00025 
00026     unsigned int Hash() const { return ByteHash(data(),length(),0); }
00027     unsigned int hash() const { return Hash(); } 
00028     operator const char *() const { return c_str(); }
00029     friend ostream &operator<<(ostream &os, const String &ts);
00030     friend istream &operator>>(istream &is, String &ts);
00031 };
00032 
00033 #endif

Generated on Wed Nov 3 12:59:04 2004 for Lemur Toolkit by doxygen1.2.18