ODIN
tjlabel.h
1 /***************************************************************************
2  tjlabel.h - description
3  -------------------
4  begin : Fri Aug 2 2002
5  copyright : (C) 2000-2021 by Thies H. Jochimsen
6  email : thies@jochimsen.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef TJLABEL_H
19 #define TJLABEL_H
20 
21 #include <tjutils/tjutils.h>
22 
31 class Labeled {
32 
33  public:
34 
38  Labeled(const STD_string& label="unnamed") : objlabel(label) {}
39 
43  Labeled& set_label(const STD_string& label) {objlabel=label; return *this;}
44 
48  const STD_string& get_label() const {return objlabel;}
49 
50 
55  objlabel=l.objlabel;
56  return *this;
57  }
58 
59  private:
60  STD_string objlabel;
61 };
62 
65 #endif
Labeled(const STD_string &label="unnamed")
Definition: tjlabel.h:38
Labeled & operator=(const Labeled &l)
Definition: tjlabel.h:54
Labeled & set_label(const STD_string &label)
Definition: tjlabel.h:43
const STD_string & get_label() const
Definition: tjlabel.h:48