Orxonox  0.0.5 Codename: Arcturus
ConfigFileEntryComment.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Fabian 'x3n' Landau
24  * Co-authors:
25  * ...
26  *
27  */
28 
34 #ifndef _ConfigFileEntryComment_H__
35 #define _ConfigFileEntryComment_H__
36 
37 #include "core/CorePrereqs.h"
38 
39 #include "ConfigFileEntry.h"
40 
41 namespace orxonox
42 {
44  // ConfigFileEntryComment //
46 
50  {
51  public:
53  inline ConfigFileEntryComment(const std::string& comment) : comment_(comment) {}
54 
56  virtual inline ~ConfigFileEntryComment() = default;
57 
58  virtual inline const std::string& getName() const override
59  { return this->comment_; }
60 
61  virtual inline void setComment(const std::string& comment) override
62  { this->comment_ = comment; }
63 
64  virtual inline void setValue(const std::string& value) override
65  {}
66  virtual inline const std::string& getValue() const override
67  { return BLANKSTRING; }
68 
69  virtual inline void setString(bool bString) override
70  {}
71 
72  virtual inline const std::string& getFileEntry() const override
73  { return this->comment_; }
74 
75  private:
77  };
78 }
79 
80 #endif /* _ConfigFileEntryComment_H__ */
std::string BLANKSTRING
A blank string (""). Used to return a blank string by reference.
Definition: StringUtils.cc:46
std::string comment_
The comment.
Definition: ConfigFileEntryComment.h:76
Shared library macros, enums, constants and forward declarations for the core library ...
::std::string string
Definition: gtest-port.h:756
This class represents a line in the config file which contains only a comment.
Definition: ConfigFileEntryComment.h:49
virtual void setValue(const std::string &value) override
Changes the value of the entry.
Definition: ConfigFileEntryComment.h:64
virtual const std::string & getValue() const override
Returns the value of the entry.
Definition: ConfigFileEntryComment.h:66
virtual void setComment(const std::string &comment) override
Changes the comment of the entry (will be placed after the value)
Definition: ConfigFileEntryComment.h:61
virtual void setString(bool bString) override
Defines if this entry is treated as string which means some special treatment of special characters...
Definition: ConfigFileEntryComment.h:69
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
#define _CoreExport
Definition: CorePrereqs.h:61
virtual const std::string & getName() const override
Returns the name of the entry.
Definition: ConfigFileEntryComment.h:58
ConfigFileEntryComment(const std::string &comment)
Constructor: Initializes the object.
Definition: ConfigFileEntryComment.h:53
virtual const std::string & getFileEntry() const override
Returns the line as it will be stored in the config file.
Definition: ConfigFileEntryComment.h:72
This class represents an entry in the config file.
Definition: ConfigFileEntry.h:49