GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/gui/fonts/textchunklist.h Lines: 1 1 100.0 %
Date: 2017-11-29 Branches: 0 0 0.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2011-2017  The ManaPlus Developers
4
 *
5
 *  This file is part of The ManaPlus Client.
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
10
 *  any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
#ifndef GUI_FONTS_TEXTCHUNKLIST_H
22
#define GUI_FONTS_TEXTCHUNKLIST_H
23
24
#include "gui/fonts/textchunksmall.h"
25
26
#include <map>
27
28
#include "localconsts.h"
29
30
class TextChunk;
31
32
1144428
class TextChunkList final
33
{
34
    public:
35
        TextChunkList();
36
37
        A_DELETE_COPY(TextChunkList)
38
39
        void insertFirst(TextChunk *restrict const item)
40
                         restrict2 A_NONNULL(2);
41
42
        void moveToFirst(TextChunk *restrict const item)
43
                         restrict2 A_NONNULL(2);
44
45
        void remove(const TextChunk *restrict const item) restrict2;
46
47
        void removeBack() restrict2;
48
49
        void removeBack(int n) restrict2;
50
51
        void clear() restrict2;
52
53
        TextChunk *restrict start;
54
        TextChunk *restrict end;
55
        uint32_t size;
56
        std::map<TextChunkSmall, TextChunk*> search;
57
        std::map<std::string, TextChunk*> searchWidth;
58
};
59
60
#endif  // GUI_FONTS_TEXTCHUNKLIST_H