<commit_before>// Copyright <NAME> 2010-2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// This file is part of HadesMem.
// <http://www.raptorfactor.com/> <<EMAIL>>

#pragma once

#include <memory>

#include "hadesmem/detail/warning_disable_prefix.hpp"
#include <boost/config.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include "hadesmem/detail/warning_disable_suffix.hpp"

#include "hadesmem/module.hpp"

namespace hadesmem
{

class Process;

namespace detail
{
  struct ModuleIteratorImpl;
}

// Boost.Iterator causes the following warning under GCC:
// error: base class 'class boost::iterator_facade<hadesmem::ModuleIterator, 
// hadesmem::Module, boost::single_pass_traversal_tag>' has a non-virtual 
// destructor [-Werror=effc++]
#if defined(HADESMEM_GCC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif // #if defined(HADESMEM_GCC)

class ModuleIterator : 
  public boost::iterator_facade<
    ModuleIterator, 
    Module, 
    boost::single_pass_traversal_tag
    >
{
public:
  ModuleIterator() BOOST_NOEXCEPT;
  
  ModuleIterator(Process const& process);
  
private:
  friend class boost::iterator_core_access;
  
  typedef boost::iterator_facade<
    ModuleIterator, 
    Module, 
    boost::single_pass_traversal_tag
    > ModuleIteratorFacade;
  
  ModuleIteratorFacade::reference dereference() const;
  <commit_msg>* [module_iterator] Notes about InputIterator concept compliance.<commit_after>// Copyright <NAME> 2010-2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// This file is part of HadesMem.
// <http://www.raptorfactor.com/> <<EMAIL>>

#pragma once

#include <memory>

#include "hadesmem/detail/warning_disable_prefix.hpp"
#include <boost/config.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include "hadesmem/detail/warning_disable_suffix.hpp"

#include "hadesmem/module.hpp"

namespace hadesmem
{

class Process;

namespace detail
{
  struct ModuleIteratorImpl;
}

// Boost.Iterator causes the following warning under GCC:
// error: base class 'class boost::iterator_facade<hadesmem::ModuleIterator, 
// hadesmem::Module, boost::single_pass_traversal_tag>' has a non-virtual 
// destructor [-Werror=effc++]
#if defined(HADESMEM_GCC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif // #if defined(HADESMEM_GCC)

// ModuleIterator satisfies the requirements of an input iterator 
// (C++ Standard, 24.2.1, Input Iterators [input.iterators]).
class ModuleIterator : 
  public boost::iterator_facade<
    ModuleIterator, 
    Module, 
    boost::single_pass_traversal_tag
    >
{
public:
  ModuleIterator() BOOST_NOEXCEPT;
  
  ModuleIterator(Process const& process);
  
private:
  friend class boost::iterator_core_access;
  
  typedef boost::iterator_facade<
    ModuleIterator, 
    Module, 
    boost::single_pass_traversal_tag
    > ModuleIteratorFacade;
  
  ModuleIteratorFacade::reference dereference() const;
  
{'fraction_non_alphanumeric': 0.11199490932230353, 'fraction_numerical': 0.010181355392936684, 'mean_word_length': 4.726775956284153, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6976262', 'n_tokens_mistral': 1036, 'n_tokens_neox': 981, 'n_words': 238}