Coverage Report

Created: 2026-08-13 06:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/aspell/common/vector.hpp
Line
Count
Source
1
// This file is part of The New Aspell
2
// Copyright (C) 2001-2003 by Kevin Atkinson under the GNU LGPL license
3
// version 2.0 or 2.1.  You should have received a copy of the LGPL
4
// license along with this library if you did not you can find
5
// it at http://www.gnu.org/.
6
7
#ifndef ASPELL_VECTOR__HPP
8
#define ASPELL_VECTOR__HPP
9
10
#include <vector>
11
12
namespace acommon
13
{
14
  template <typename T>
15
  class Vector : public std::vector<T>
16
  {
17
  public:
18
19
109k
    Vector() {}
acommon::Vector<acommon::FilterChar>::Vector()
Line
Count
Source
19
45.0k
    Vector() {}
acommon::Vector<acommon::Notifier*>::Vector()
Line
Count
Source
19
2.50k
    Vector() {}
acommon::Vector<acommon::ConfigModule>::Vector()
Line
Count
Source
19
2.50k
    Vector() {}
acommon::Vector<acommon::Cacheable*>::Vector()
Line
Count
Source
19
2.50k
    Vector() {}
acommon::Vector<acommon::NormTables::ToUniTable>::Vector()
Line
Count
Source
19
703
    Vector() {}
acommon::Vector<acommon::IndividualFilter*>::Vector()
Line
Count
Source
19
9.91k
    Vector() {}
acommon::Vector<acommon::KeyInfo>::Vector()
Line
Count
Source
19
4.70k
    Vector() {}
acommon::Vector<acommon::String>::Vector()
Line
Count
Source
19
350
    Vector() {}
acommon::Vector<acommon::FilterMode>::Vector()
Line
Count
Source
19
2.26k
    Vector() {}
acommon::Vector<acommon::FilterMode::MagicString>::Vector()
Line
Count
Source
19
312
    Vector() {}
acommon::Vector<acommon::FilterMode::KeyValue>::Vector()
Line
Count
Source
19
312
    Vector() {}
acommon::Vector<unsigned int>::Vector()
Line
Count
Source
19
46
    Vector() {}
tex.cpp:acommon::Vector<(anonymous namespace)::TexFilter::Command>::Vector()
Line
Count
Source
19
33
    Vector() {}
texinfo.cpp:acommon::Vector<(anonymous namespace)::TexInfoFilter::Command>::Vector()
Line
Count
Source
19
116
    Vector() {}
texinfo.cpp:acommon::Vector<(anonymous namespace)::TexInfoFilter::Table>::Vector()
Line
Count
Source
19
116
    Vector() {}
acommon::Vector<acommon::DictExt>::Vector()
Line
Count
Source
19
13.5k
    Vector() {}
acommon::Vector<aspeller::Dictionary*>::Vector()
Line
Count
Source
19
2.32k
    Vector() {}
acommon::Vector<aspeller::Dictionary const*>::Vector()
Line
Count
Source
19
3.19k
    Vector() {}
acommon::Vector<aspeller::SpellerDict*>::Vector()
Line
Count
Source
19
754
    Vector() {}
acommon::Vector<aspeller::SuggestRepl>::Vector()
Line
Count
Source
19
766
    Vector() {}
suggest.cpp:acommon::Vector<(anonymous namespace)::Suggestion>::Vector()
Line
Count
Source
19
1.50k
    Vector() {}
acommon::Vector<acommon::ObjStack::Node*>::Vector()
Line
Count
Source
19
1.50k
    Vector() {}
suggest.cpp:acommon::Vector<(anonymous namespace)::Working*>::Vector()
Line
Count
Source
19
11.3k
    Vector() {}
suggest.cpp:acommon::Vector<(anonymous namespace)::ReplTry>::Vector()
Line
Count
Source
19
1.20k
    Vector() {}
acommon::Vector<char const*>::Vector()
Line
Count
Source
19
1.20k
    Vector() {}
suggest.cpp:acommon::Vector<(anonymous namespace)::NGramScore>::Vector()
Line
Count
Source
19
44
    Vector() {}
acommon::Vector<aspeller::CharPair>::Vector()
Line
Count
Source
19
750
    Vector() {}
Unexecuted instantiation: acommon::Vector<aspeller::WordAff>::Vector()
Unexecuted instantiation: readonly_ws.cpp:acommon::Vector<(anonymous namespace)::Jump>::Vector()
20
    Vector(unsigned int s) : std::vector<T>(s) {}
21
    Vector(unsigned int s, const T & val) : std::vector<T>(s, val) {}
22
23
46.8M
    void append(T t) {
24
46.8M
      this->push_back(t);
25
46.8M
    }
acommon::Vector<acommon::FilterChar>::append(acommon::FilterChar)
Line
Count
Source
23
46.8M
    void append(T t) {
24
46.8M
      this->push_back(t);
25
46.8M
    }
acommon::Vector<acommon::DictExt>::append(acommon::DictExt)
Line
Count
Source
23
465
    void append(T t) {
24
465
      this->push_back(t);
25
465
    }
26
0
    void append(const T * begin, unsigned int size) {
27
0
      this->insert(this->end(), begin, begin+size);
28
0
    }
29
    void append(const T * begin, const T * end) {
30
      this->insert(this->end(), begin, end);
31
    }
32
    int alloc(int s) {
33
      int pos = this->size();
34
      this->resize(pos + s);
35
      return pos;
36
    }
37
38
#if __cplusplus < 201103L
39
    T * data() {return &*this->begin();}
40
    const T * data() const {return &*this->begin();}
41
#else
42
    using std::vector<T>::data;
43
#endif
44
45
    T * data(int pos) {return data() + pos;}
46
    T * data_end() {return data() + this->size();}
47
48
574k
    T * pbegin() {return data();}
acommon::Vector<acommon::FilterChar>::pbegin()
Line
Count
Source
48
554k
    T * pbegin() {return data();}
acommon::Vector<acommon::ConfigModule>::pbegin()
Line
Count
Source
48
4.70k
    T * pbegin() {return data();}
Unexecuted instantiation: acommon::Vector<acommon::KeyInfo>::pbegin()
acommon::Vector<unsigned int>::pbegin()
Line
Count
Source
48
13.5k
    T * pbegin() {return data();}
acommon::Vector<char const*>::pbegin()
Line
Count
Source
48
1.20k
    T * pbegin() {return data();}
49
616k
    T * pend()   {return data() + this->size();}
acommon::Vector<acommon::FilterChar>::pend()
Line
Count
Source
49
554k
    T * pend()   {return data() + this->size();}
acommon::Vector<acommon::ConfigModule>::pend()
Line
Count
Source
49
47.0k
    T * pend()   {return data() + this->size();}
Unexecuted instantiation: acommon::Vector<acommon::KeyInfo>::pend()
acommon::Vector<unsigned int>::pend()
Line
Count
Source
49
13.5k
    T * pend()   {return data() + this->size();}
acommon::Vector<char const*>::pend()
Line
Count
Source
49
1.20k
    T * pend()   {return data() + this->size();}
50
51
27.6k
    const T * pbegin() const {return data();}
acommon::Vector<acommon::ConfigModule>::pbegin() const
Line
Count
Source
51
26.4k
    const T * pbegin() const {return data();}
acommon::Vector<aspeller::SuggestRepl>::pbegin() const
Line
Count
Source
51
1.20k
    const T * pbegin() const {return data();}
Unexecuted instantiation: acommon::Vector<char const*>::pbegin() const
52
71.1k
    const T * pend()   const {return data() + this->size();}
acommon::Vector<acommon::ConfigModule>::pend() const
Line
Count
Source
52
69.9k
    const T * pend()   const {return data() + this->size();}
acommon::Vector<aspeller::SuggestRepl>::pend() const
Line
Count
Source
52
1.20k
    const T * pend()   const {return data() + this->size();}
Unexecuted instantiation: acommon::Vector<char const*>::pend() const
53
54
    template <typename U>
55
    U * datap() { 
56
      return reinterpret_cast<U * >(data());
57
    }
58
    template <typename U>
59
    U * datap(int pos) {
60
      return reinterpret_cast<U * >(data() + pos);
61
    }
62
63
    void pop_front() {this->erase(this->begin());}
64
    void push_front(const T & v) {this->insert(this->begin(), v);}
65
  };
66
}
67
68
#endif