bpp-core3  3.0.0
BppString.h
Go to the documentation of this file.
1 //
2 // File: BppString.h
3 // Authors:
4 // Julien Dutheil
5 // Francois Gindraud (2017)
6 // Created: 2006-05-04 10:21:00
7 // Last modified: 2017-06-27 00:00:00
8 //
9 
10 /*
11  Copyright or © or Copr. Bio++ Development Team, (November 17, 2004)
12 
13  This software is a computer program whose purpose is to provide utilitary
14  classes. This file belongs to the Bio++ Project.
15 
16  This software is governed by the CeCILL license under French law and
17  abiding by the rules of distribution of free software. You can use,
18  modify and/ or redistribute the software under the terms of the CeCILL
19  license as circulated by CEA, CNRS and INRIA at the following URL
20  "http://www.cecill.info".
21 
22  As a counterpart to the access to the source code and rights to copy,
23  modify and redistribute granted by the license, users are provided only
24  with a limited warranty and the software's author, the holder of the
25  economic rights, and the successive licensors have only limited
26  liability.
27 
28  In this respect, the user's attention is drawn to the risks associated
29  with loading, using, modifying and/or developing or reproducing the
30  software by the user in light of its specific status of free software,
31  that may mean that it is complicated to manipulate, and that also
32  therefore means that it is reserved for developers and experienced
33  professionals having in-depth computer knowledge. Users are therefore
34  encouraged to load and test the software's suitability as regards their
35  requirements in conditions enabling the security of their systems and/or
36  data to be ensured and, more generally, to use and operate it in the
37  same conditions as regards security.
38 
39  The fact that you are presently reading this means that you have had
40  knowledge of the CeCILL license and that you accept its terms.
41 */
42 
43 #ifndef BPP_BPPSTRING_H
44 #define BPP_BPPSTRING_H
45 
46 #include <iosfwd>
47 #include <string>
48 
49 #include "Clonable.h"
50 
51 namespace bpp
52 {
56 class BppString : public Clonable
57 {
58 private:
59  std::string text_{};
60 
61 public:
63  BppString(const char* value);
64  BppString(const std::string& value);
65  BppString& operator=(const char* value);
66  BppString& operator=(const std::string& value);
67  BppString* clone() const;
68  const std::string& toSTL() const;
69 };
70 
71 std::ostream& operator<<(std::ostream& out, const BppString& s);
72 } // namespace bpp
73 #endif // BPP_BPPSTRING_H
The BppString object class. This class extends the stl::string class to support the Clonable interfac...
Definition: BppString.h:57
BppString & operator=(const char *value)
Definition: BppString.cpp:56
BppString * clone() const
Create a copy of this object and send a pointer to it.
Definition: BppString.cpp:67
const std::string & toSTL() const
Definition: BppString.cpp:69
std::string text_
Definition: BppString.h:59
The Clonable interface (allow an object to be cloned).
Definition: Clonable.h:103
std::ostream & operator<<(std::ostream &out, const BppBoolean &s)
Definition: BppBoolean.h:69