GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/eathena/messagein.h Lines: 0 1 0.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 NET_EATHENA_MESSAGEIN_H
24
#define NET_EATHENA_MESSAGEIN_H
25
26
#include "net/messagein.h"
27
28
#include "localconsts.h"
29
30
namespace EAthena
31
{
32
33
/**
34
 * Used for parsing an incoming message.
35
 *
36
 * \ingroup Network
37
 */
38
class MessageIn final : public Net::MessageIn
39
{
40
    public:
41
        /**
42
         * Constructor.
43
         */
44
        MessageIn(const char *const data,
45
                  const unsigned int length);
46
47
        A_DELETE_COPY(MessageIn)
48
49
        void postInit(const char *const str,
50
                      const unsigned int version);
51
52
        /**< Reads a short. */
53
        int16_t readInt16(const char *const str) override final;
54
55
        uint16_t readUInt16(const char *const str) override final;
56
57
        /**< Reads a long. */
58
        int32_t readInt32(const char *const str) override final;
59
60
        int64_t readInt64(const char *const str) override final;
61
62
        BeingId readBeingId(const char *const str) override final;
63
64
        uint16_t readId() const;
65
};
66
67
}  // namespace EAthena
68
69
#endif  // NET_EATHENA_MESSAGEIN_H