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 _TERM_HPP 00014 #define _TERM_HPP 00015 #include "Exception.hpp" 00016 namespace lemur 00017 { 00018 namespace api 00019 { 00020 00022 00026 class Term { 00027 public: 00028 Term() : termptr(NULL) {} 00029 virtual ~Term() { } 00031 virtual const char* spelling() const { return termptr; } 00034 virtual void spelling(const char* str) { termptr = str; } 00037 virtual void spelling(const string& str) { termptr = str.c_str(); } 00039 virtual void reset() { termptr=NULL; } 00040 protected: 00041 const char* termptr; 00042 }; 00043 } 00044 } 00045 #endif