A Discrete-Event Network Simulator
API
file-config.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 INRIA
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Mathieu Lacage <mathieu.lacage@cutebugs.net>
18  */
19 
20 #ifndef FILE_CONFIG_H
21 #define FILE_CONFIG_H
22 
23 #include <string>
24 
25 namespace ns3
26 {
27 
34 {
35  public:
36  virtual ~FileConfig();
41  virtual void SetFilename(std::string filename) = 0;
46  void SetSaveDeprecated(bool saveDeprecated);
50  virtual void Default() = 0;
54  virtual void Global() = 0;
58  virtual void Attributes() = 0;
59 
60  protected:
62 };
63 
68 class NoneFileConfig : public FileConfig
69 {
70  public:
72  ~NoneFileConfig() override;
73  void SetFilename(std::string filename) override;
74  void Default() override;
75  void Global() override;
76  void Attributes() override;
77 };
78 
79 } // namespace ns3
80 
81 #endif /* FILE_CONFIG_H */
base class for ConfigStore classes using files
Definition: file-config.h:34
virtual void Attributes()=0
Load or save the attributes values.
void SetSaveDeprecated(bool saveDeprecated)
Set if to save deprecated attributes.
Definition: file-config.cc:30
virtual ~FileConfig()
Definition: file-config.cc:25
virtual void SetFilename(std::string filename)=0
Set the file name.
bool m_saveDeprecated
save deprecated attributes
Definition: file-config.h:61
virtual void Default()=0
Load or save the default values.
virtual void Global()=0
Load or save the global values.
A dummy class (does nothing)
Definition: file-config.h:69
void Default() override
Load or save the default values.
Definition: file-config.cc:49
void Global() override
Load or save the global values.
Definition: file-config.cc:54
void SetFilename(std::string filename) override
Set the file name.
Definition: file-config.cc:44
void Attributes() override
Load or save the attributes values.
Definition: file-config.cc:59
~NoneFileConfig() override
Definition: file-config.cc:39
Every class exported by the ns3 library is enclosed in the ns3 namespace.