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