<commit_before>//===-- Wrappers for Win32 API parameters ---------------------------------===//
//
// Copyright (c) 2013 <NAME>
// This file may be freely distributed under the MIT license.
//
//===----------------------------------------------------------------------===//
//
// These wrapper are used to make the Win32 API functions in curt.h more
// convenient to call. They allow the caller to either use convenient C++ types
// or to use the underlying Win32 types. In either case these wrapper's will
// convert the parameters to the correct types.
//
//===----------------------------------------------------------------------===//

#ifndef CURT_API_PARAMS_H
#define CURT_API_PARAMS_H

#include "types.h"

#include <string>

namespace curt {

template<typename WindowsHandle>
class HandleOr {
  using HandleType = Handle<WindowsHandle, detail::HandleTraits>;

  WindowsHandle handle;

public:
  HandleOr(WindowsHandle h) : handle{ h } {}
  HandleOr(const HandleType& h) : handle{ h.get() } {}
  
  HandleOr(const HandleOr&) = delete;
  HandleOr& operator=(const HandleOr&) = delete;
<commit_msg>Fixed api_params.h file comment<commit_after>//===-- Wrappers for Win32 API parameters ---------------------------------===//
//
// Copyright (c) 2013 <NAME>
// This file may be freely distributed under the MIT license.
//
//===----------------------------------------------------------------------===//
//
// These parameter wrappers are used to make the Win32 API functions in curt.h
// more convenient to call. They allow the caller to specify arguments using
// either convenient C++ types or the underlying Win32 types. In either case
// the parameter wrappers convert the arguments to the correct types.
//
//===----------------------------------------------------------------------===//

#ifndef CURT_API_PARAMS_H
#define CURT_API_PARAMS_H

#include "types.h"

#include <string>

namespace curt {

template<typename WindowsHandle>
class HandleOr {
  using HandleType = Handle<WindowsHandle, detail::HandleTraits>;

  WindowsHandle handle;

public:
  HandleOr(WindowsHandle h) : handle{ h } {}
  HandleOr(const HandleType& h) : handle{ h.get() } {}
  
  HandleOr(const HandleOr&) = delete;
  HandleOr& operator=(const HandleOr&) = delete;

{'fraction_non_alphanumeric': 0.2599020916777926, 'fraction_numerical': 0.008900756564307966, 'mean_word_length': 2.07103825136612, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3170591', 'n_tokens_mistral': 589, 'n_tokens_neox': 569, 'n_words': 210}