<commit_before>/** Copyright (C) 2016 European Spallation Source ERIC */

#include <cassert>
#include <cstdlib>

/** @file
 *
 *  @brief Simple RingBuffer class to keep track of a number of buffers
 *  for receiving socket data. No bounds checking so it is possible to corrupt
 *  data and write beyond buffers
 *  @todo add cookies around  each buffer
 */

#pragma once

template <const unsigned int N>
class RingBuffer {
  static const unsigned int COOKIE1 = 0xDEADC0DE;<commit_msg>doxygen comment<commit_after>/** Copyright (C) 2016 European Spallation Source ERIC */

#include <cassert>
#include <cstdlib>

/** @file
 *
 *  @brief Simple RingBuffer class to keep track of a number of buffers
 *  for receiving socket data. No bounds checking so it is possible to corrupt
 *  data and write beyond buffers. However overwrites are detected on the nextbuffer()
 *  that would have provided a corrupt buffer.
 */

#pragma once

template <const unsigned int N>
class RingBuffer {
  static const unsigned int COOKIE1 = 0xDEADC0DE;
{'fraction_non_alphanumeric': 0.07295719844357977, 'fraction_numerical': 0.013618677042801557, 'mean_word_length': 4.119402985074627, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2861542', 'n_tokens_mistral': 301, 'n_tokens_neox': 286, 'n_words': 136}