Coverage Report

Created: 2026-05-16 06:26

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
159k
    Vector() {}
acommon::Vector<acommon::FilterChar>::Vector()
Line
Count
Source
19
60.3k
    Vector() {}
acommon::Vector<acommon::Notifier*>::Vector()
Line
Count
Source
19
3.57k
    Vector() {}
acommon::Vector<acommon::ConfigModule>::Vector()
Line
Count
Source
19
3.57k
    Vector() {}
acommon::Vector<acommon::Cacheable*>::Vector()
Line
Count
Source
19
3.57k
    Vector() {}
acommon::Vector<acommon::NormTables::ToUniTable>::Vector()
Line
Count
Source
19
1.01k
    Vector() {}
acommon::Vector<acommon::IndividualFilter*>::Vector()
Line
Count
Source
19
14.0k
    Vector() {}
acommon::Vector<acommon::KeyInfo>::Vector()
Line
Count
Source
19
5.54k
    Vector() {}
acommon::Vector<acommon::String>::Vector()
Line
Count
Source
19
732
    Vector() {}
acommon::Vector<acommon::FilterMode>::Vector()
Line
Count
Source
19
2.63k
    Vector() {}
acommon::Vector<acommon::FilterMode::MagicString>::Vector()
Line
Count
Source
19
684
    Vector() {}
acommon::Vector<acommon::FilterMode::KeyValue>::Vector()
Line
Count
Source
19
684
    Vector() {}
acommon::Vector<unsigned int>::Vector()
Line
Count
Source
19
44
    Vector() {}
tex.cpp:acommon::Vector<(anonymous namespace)::TexFilter::Command>::Vector()
Line
Count
Source
19
55
    Vector() {}
texinfo.cpp:acommon::Vector<(anonymous namespace)::TexInfoFilter::Command>::Vector()
Line
Count
Source
19
142
    Vector() {}
texinfo.cpp:acommon::Vector<(anonymous namespace)::TexInfoFilter::Table>::Vector()
Line
Count
Source
19
142
    Vector() {}
acommon::Vector<acommon::DictExt>::Vector()
Line
Count
Source
19
32.6k
    Vector() {}
acommon::Vector<aspeller::Dictionary*>::Vector()
Line
Count
Source
19
3.30k
    Vector() {}
acommon::Vector<aspeller::Dictionary const*>::Vector()
Line
Count
Source
19
4.53k
    Vector() {}
acommon::Vector<aspeller::SpellerDict*>::Vector()
Line
Count
Source
19
1.06k
    Vector() {}
acommon::Vector<aspeller::SuggestRepl>::Vector()
Line
Count
Source
19
1.09k
    Vector() {}
suggest.cpp:acommon::Vector<(anonymous namespace)::Suggestion>::Vector()
Line
Count
Source
19
2.12k
    Vector() {}
acommon::Vector<acommon::ObjStack::Node*>::Vector()
Line
Count
Source
19
2.12k
    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.19k
    Vector() {}
acommon::Vector<char const*>::Vector()
Line
Count
Source
19
1.34k
    Vector() {}
suggest.cpp:acommon::Vector<(anonymous namespace)::NGramScore>::Vector()
Line
Count
Source
19
476
    Vector() {}
acommon::Vector<aspeller::CharPair>::Vector()
Line
Count
Source
19
1.06k
    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
62.7M
    void append(T t) {
24
62.7M
      this->push_back(t);
25
62.7M
    }
acommon::Vector<acommon::FilterChar>::append(acommon::FilterChar)
Line
Count
Source
23
62.7M
    void append(T t) {
24
62.7M
      this->push_back(t);
25
62.7M
    }
acommon::Vector<acommon::DictExt>::append(acommon::DictExt)
Line
Count
Source
23
732
    void append(T t) {
24
732
      this->push_back(t);
25
732
    }
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
616k
    T * pbegin() {return data();}
acommon::Vector<acommon::FilterChar>::pbegin()
Line
Count
Source
48
597k
    T * pbegin() {return data();}
acommon::Vector<acommon::ConfigModule>::pbegin()
Line
Count
Source
48
5.54k
    T * pbegin() {return data();}
Unexecuted instantiation: acommon::Vector<acommon::KeyInfo>::pbegin()
acommon::Vector<unsigned int>::pbegin()
Line
Count
Source
48
11.6k
    T * pbegin() {return data();}
acommon::Vector<char const*>::pbegin()
Line
Count
Source
48
1.34k
    T * pbegin() {return data();}
49
666k
    T * pend()   {return data() + this->size();}
acommon::Vector<acommon::FilterChar>::pend()
Line
Count
Source
49
597k
    T * pend()   {return data() + this->size();}
acommon::Vector<acommon::ConfigModule>::pend()
Line
Count
Source
49
55.4k
    T * pend()   {return data() + this->size();}
Unexecuted instantiation: acommon::Vector<acommon::KeyInfo>::pend()
acommon::Vector<unsigned int>::pend()
Line
Count
Source
49
11.6k
    T * pend()   {return data() + this->size();}
acommon::Vector<char const*>::pend()
Line
Count
Source
49
1.34k
    T * pend()   {return data() + this->size();}
50
51
31.3k
    const T * pbegin() const {return data();}
acommon::Vector<acommon::ConfigModule>::pbegin() const
Line
Count
Source
51
30.1k
    const T * pbegin() const {return data();}
acommon::Vector<aspeller::SuggestRepl>::pbegin() const
Line
Count
Source
51
1.19k
    const T * pbegin() const {return data();}
Unexecuted instantiation: acommon::Vector<char const*>::pbegin() const
52
80.6k
    const T * pend()   const {return data() + this->size();}
acommon::Vector<acommon::ConfigModule>::pend() const
Line
Count
Source
52
79.4k
    const T * pend()   const {return data() + this->size();}
acommon::Vector<aspeller::SuggestRepl>::pend() const
Line
Count
Source
52
1.19k
    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