Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/libraries/core/config/ConfigFileEntryComment.h @ 11317

Last change on this file since 11317 was 11071, checked in by landauf, 9 years ago

merged branch cpp11_v3 back to trunk

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
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
29/**
30    @file
31    @ingroup Config ConfigFile
32*/
33
34#ifndef _ConfigFileEntryComment_H__
35#define _ConfigFileEntryComment_H__
36
37#include "core/CorePrereqs.h"
38
39#include "ConfigFileEntry.h"
40
41namespace orxonox
42{
43    ////////////////////////////
44    // ConfigFileEntryComment //
45    ////////////////////////////
46    /**
47        @brief This class represents a line in the config file which contains only a comment.
48    */
49    class _CoreExport ConfigFileEntryComment : public ConfigFileEntry
50    {
51        public:
52            /// Constructor: Initializes the object.
53            inline ConfigFileEntryComment(const std::string& comment) : comment_(comment) {}
54
55            /// Destructor
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:
76            std::string comment_;   ///< The comment
77    };
78}
79
80#endif /* _ConfigFileEntryComment_H__ */
Note: See TracBrowser for help on using the repository browser.