Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/spacestationentry/src/libraries/core/config/ConfigFileEntryComment.h @ 10177

Last change on this file since 10177 was 9559, checked in by landauf, 12 years ago

split ConfigFileManager.h/cc into multiple files, one for each class. why did I ever put them all into the same file?

  • Property svn:eol-style set to native
File size: 2.3 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            inline virtual ~ConfigFileEntryComment() {}
57
58            inline virtual const std::string& getName() const
59                { return this->comment_; }
60
61            inline virtual void setComment(const std::string& comment)
62                { this->comment_ = comment; }
63
64            inline virtual void setValue(const std::string& value)
65                {}
66            inline virtual const std::string& getValue() const
67                { return BLANKSTRING; }
68
69            inline void setString(bool bString)
70                {}
71
72            inline virtual const std::string& getFileEntry() const
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.