Coverage Report

Created: 2025-06-13 06:46

/src/Fast-DDS/thirdparty/taocpp-pegtl/pegtl/internal/iterator.hpp
Line
Count
Source (jump to first uncovered line)
1
// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey
2
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
3
4
#ifndef TAO_PEGTL_INTERNAL_ITERATOR_HPP
5
#define TAO_PEGTL_INTERNAL_ITERATOR_HPP
6
7
#include <cstdlib>
8
9
#include "../config.hpp"
10
11
namespace tao
12
{
13
   namespace TAO_PEGTL_NAMESPACE
14
   {
15
      namespace internal
16
      {
17
         struct iterator
18
         {
19
0
            iterator() noexcept = default;
20
21
            explicit iterator( const char* in_data ) noexcept
22
0
               : data( in_data )
23
0
            {
24
0
            }
25
26
            iterator( const char* in_data, const std::size_t in_byte, const std::size_t in_line, const std::size_t in_byte_in_line ) noexcept
27
               : data( in_data ),
28
                 byte( in_byte ),
29
                 line( in_line ),
30
                 byte_in_line( in_byte_in_line )
31
0
            {
32
0
            }
33
34
            iterator( const iterator& ) = default;
35
            iterator( iterator&& ) = default;
36
37
            ~iterator() = default;
38
39
            iterator& operator=( const iterator& ) = default;
40
            iterator& operator=( iterator&& ) = default;
41
42
            void reset() noexcept
43
0
            {
44
0
               *this = iterator();
45
0
            }
46
47
            const char* data = nullptr;
48
49
            std::size_t byte = 0;
50
            std::size_t line = 1;
51
            std::size_t byte_in_line = 0;
52
         };
53
54
      }  // namespace internal
55
56
   }  // namespace TAO_PEGTL_NAMESPACE
57
58
}  // namespace tao
59
60
#endif