All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
verbatimString.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::verbatimString
26 
27 Description
28  A class for handling verbatimStrings, derived from string.
29 
30  A verbatimString is a verbatim string of characters.
31 
32 SourceFiles
33  verbatimString.C
34  verbatimStringIO.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef verbatimString_H
39 #define verbatimString_H
40 
41 #include "string.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward declaration of friend functions and operators
49 class verbatimString;
50 inline verbatimString operator&(const verbatimString&, const verbatimString&);
51 Istream& operator>>(Istream&, verbatimString&);
52 Ostream& operator<<(Ostream&, const verbatimString&);
53 
54 
55 /*---------------------------------------------------------------------------*\
56  Class verbatimString Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class verbatimString
60 :
61  public string
62 {
63 
64 public:
65 
66  // Static Data Members
67 
68  static const char* const typeName;
69  static int debug;
70 
71  //- An empty verbatimString
72  static const verbatimString null;
73 
74 
75  // Constructors
76 
77  //- Construct null
78  inline verbatimString();
79 
80  //- Copy constructor
81  inline verbatimString(const verbatimString&);
82 
83  //- Copy constructor of character array
84  inline verbatimString(const char*);
85 
86  //- Copy constructor of string
87  inline verbatimString(const string&);
88 
89  //- Copy constructor of std::string
90  inline verbatimString(const std::string&);
91 
92  //- Construct from Istream
94 
95 
96  // Member Operators
97 
98  // Assignment
99 
100  inline void operator=(const verbatimString&);
101  inline void operator=(const string&);
102  inline void operator=(const std::string&);
103  inline void operator=(const char*);
104 
105 
106  // IOstream Operators
107 
109  friend Ostream& operator<<(Ostream&, const verbatimString&);
110 };
111 
112 
113 void writeEntry(Ostream& os, const verbatimString& value);
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #include "verbatimStringI.H"
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
A class for handling verbatimStrings, derived from string.
friend Ostream & operator<<(Ostream &, const verbatimString &)
static const char *const typeName
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
tmp< GeometricField< Type, fvPatchField, volMesh > > operator &(const fvMatrix< Type > &, const DimensionedField< Type, volMesh > &)
static const verbatimString null
An empty verbatimString.
void operator=(const verbatimString &)
Istream & operator>>(Istream &, directionInfo &)
friend Istream & operator>>(Istream &, verbatimString &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Definition: HashTableIO.C:96
Ostream & operator<<(Ostream &, const ensightPart &)
verbatimString()
Construct null.
A class for handling character strings derived from std::string.
Definition: string.H:76
Namespace for OpenFOAM.