GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/options.h Lines: 4 4 100.0 %
Date: 2021-03-17 Branches: 0 0 0.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2004-2009  The Mana World Development Team
4
 *  Copyright (C) 2009-2010  The Mana Developers
5
 *  Copyright (C) 2011-2019  The ManaPlus Developers
6
 *  Copyright (C) 2019-2021  Andrei Karas
7
 *
8
 *  This file is part of The ManaPlus Client.
9
 *
10
 *  This program is free software; you can redistribute it and/or modify
11
 *  it under the terms of the GNU General Public License as published by
12
 *  the Free Software Foundation; either version 2 of the License, or
13
 *  any later version.
14
 *
15
 *  This program is distributed in the hope that it will be useful,
16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 *  GNU General Public License for more details.
19
 *
20
 *  You should have received a copy of the GNU General Public License
21
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
 */
23
24
#ifndef OPTIONS_H
25
#define OPTIONS_H
26
27
#include <string>
28
29
#if defined(__GXX_EXPERIMENTAL_CXX0X__)
30
#if defined(__APPLE__)
31
#include <tr1/cstdint>
32
#endif  // defined(__APPLE__)
33
#endif  // defined(__GXX_EXPERIMENTAL_CXX0X__)
34
35
#include "localconsts.h"
36
37
/**
38
 * A structure holding the values of various options that can be passed
39
 * from the command line.
40
 */
41
16
struct Options final
42
{
43
1
    Options() :
44
        username(),
45
        password(),
46
        character(),
47
        brandingPath(),
48
        updateHost(),
49
        dataPath(),
50
        homeDir(),
51
        logFileName(),
52
        chatLogDir(),
53
        configDir(),
54
        localDataDir(),
55
        screenshotDir(),
56
        test(),
57
        serverName(),
58
        serverType(),
59
        renderer(-1),
60
        serverPort(0),
61
        printHelp(false),
62
        printVersion(false),
63
        skipUpdate(false),
64
        chooseDefault(false),
65
        noOpenGL(false),
66
        safeMode(false),
67
        testMode(false),
68
        ipc(false),
69
        hideCursor(false),
70
        error(false),
71
16
        validate(false)
72
1
    {}
73
74
    A_DELETE_COPY(Options)
75
76
    std::string username;
77
    std::string password;
78
    std::string character;
79
    std::string brandingPath;
80
    std::string updateHost;
81
    std::string dataPath;
82
    std::string homeDir;
83
    std::string logFileName;
84
    std::string chatLogDir;
85
    std::string configDir;
86
    std::string localDataDir;
87
    std::string screenshotDir;
88
    std::string test;
89
    std::string serverName;
90
    std::string serverType;
91
    int renderer;
92
    uint16_t serverPort;
93
    bool printHelp;
94
    bool printVersion;
95
    bool skipUpdate;
96
    bool chooseDefault;
97
    bool noOpenGL;
98
    bool safeMode;
99
    bool testMode;
100
    bool ipc;
101
    bool hideCursor;
102
    bool error;
103
    bool validate;
104
};
105
106
#endif  // OPTIONS_H