My Project  + 80db3
ini.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011-2019 Daniel Scharrer
3  *
4  * This software is provided 'as-is', without any express or implied
5  * warranty. In no event will the author(s) be held liable for any damages
6  * arising from the use of this software.
7  *
8  * Permission is granted to anyone to use this software for any purpose,
9  * including commercial applications, and to alter it and redistribute it
10  * freely, subject to the following restrictions:
11  *
12  * 1. The origin of this software must not be misrepresented; you must not
13  * claim that you wrote the original software. If you use this software
14  * in a product, an acknowledgment in the product documentation would be
15  * appreciated but is not required.
16  * 2. Altered source versions must be plainly marked as such, and must not be
17  * misrepresented as being the original software.
18  * 3. This notice may not be removed or altered from any source distribution.
19  */
20 
26 #ifndef INNOEXTRACT_SETUP_INI_HPP
27 #define INNOEXTRACT_SETUP_INI_HPP
28 
29 #include <string>
30 #include <iosfwd>
31 
32 #include "setup/item.hpp"
33 #include "util/enum.hpp"
34 #include "util/flags.hpp"
35 
36 namespace setup {
37 
38 struct info;
39 
40 struct ini_entry : public item {
41 
42  FLAGS(flags,
43  CreateKeyIfDoesntExist,
44  UninsDeleteEntry,
45  UninsDeleteEntireSection,
46  UninsDeleteSectionIfEmpty,
47  HasValue
48  );
49 
50  std::string inifile;
51  std::string section;
52  std::string key;
53  std::string value;
54 
56 
57  void load(std::istream & is, const info & i);
58 
59 };
60 
61 } // namespace setup
62 
63 NAMED_FLAGS(setup::ini_entry::flags)
64 
65 #endif // INNOEXTRACT_SETUP_INI_HPP
Definition: gog.hpp:34
flags options
Definition: ini.hpp:55
std::string value
Definition: ini.hpp:53
Class used to hold and load the various setup headers.
Definition: info.hpp:57
Definition: ini.hpp:40
FLAGS(flags, CreateKeyIfDoesntExist, UninsDeleteEntry, UninsDeleteEntireSection, UninsDeleteSectionIfEmpty, HasValue)
Utilities to associate strings with enum values.
#define NAMED_FLAGS(Flags)
Definition: enum.hpp:66
Structures for setup items stored in Inno Setup files.
void load(std::istream &is, const info &i)
Definition: ini.cpp:44
std::string section
Definition: ini.hpp:51
Typesafe flags.
std::string inifile
Definition: ini.hpp:50
A typesafe way to define flags as a combination of enum values.
Definition: flags.hpp:45
std::string key
Definition: ini.hpp:52