00001 /*************************************************************************** 00002 tjlabel.h - description 00003 ------------------- 00004 begin : Fri Aug 2 2002 00005 copyright : (C) 2001 by Thies H. Jochimsen 00006 email : jochimse@cns.mpg.de 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 #ifndef TJLABEL_H 00019 #define TJLABEL_H 00020 00021 #include <tjutils/tjutils.h> 00022 00031 class Labeled { 00032 00033 public: 00034 00038 Labeled(const STD_string& label="unnamed") : objlabel(label) {} 00039 00043 Labeled& set_label(const STD_string& label) {objlabel=label; return *this;} 00044 00048 const STD_string& get_label() const {return objlabel;} 00049 00050 00054 Labeled& operator = (const Labeled& l) { 00055 objlabel=l.objlabel; 00056 return *this; 00057 } 00058 00059 private: 00060 STD_string objlabel; 00061 }; 00062 00065 #endif
1.5.6