<commit_before>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
 * This file is part of the libabw project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#ifndef __ABWCOLLECTOR_H__
#define __ABWCOLLECTOR_H__

#include <string>
#include <map>
#include <librevenge/librevenge.h>

namespace libabw
{
class ABWOutputElements;

enum ABWUnit
{
  ABW_NONE,
  ABW_CM,
  ABW_IN,
  ABW_MM,
  ABW_PI,
  ABW_PT,
  ABW_PX,
  ABW_PERCENT
};

enum ABWListType
{
  ABW_ORDERED,
  ABW_UNORDERED
};

typedef std::map<std::string, std::string> ABWPropertyMap;

bool findInt(const std::string &str, int &res);
bool findDouble(const std::string &str, double &res, ABWUnit &unit);
void parsePropString(const std::string &str, ABWPropertyMap &props);

struct ABWData
{
  ABWData()
    : m_mimeType(), m_binaryData() {}
  ABWData(const ABWData &data)
    : m_mimeType(data.m_mimeType), m_binaryData(data.m_binaryData) {}
  ABWData(const librevenge::RVNGString &mimeType, const librevenge::RVNGBinaryData binaryData)
    : m_mimeType(mimeType), m_binaryData(binaryData) {}
  ~ABWData() {}

  librevenge::RVNGString m_mimeType;
  librevenge::RVNGBinaryData m_binaryData;
};

struct ABWListElement
{
  ABWListElement()
    : m_listLevel(-1), m_minLabelWidth(0.0), m_spaceBefore(0.0), m_parentId(), m_listId(0) {}
  virtual ~ABWListElement() {}
  virtual void writeOut(librevenge::RVNGPropertyList &propList) const;
  virtual ABWListType getType() const = 0;

  int m_listLevel;
  double m_minLabelWidth;
  double m_spaceBefore;
  int m_parentId;
  //! the list id
  int m_listId;
};<commit_msg>WaE: implicitly declared ABWData::operator= is deprecated<commit_after>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
 * This file is part of the libabw project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#ifndef __ABWCOLLECTOR_H__
#define __ABWCOLLECTOR_H__

#include <string>
#include <map>
#include <librevenge/librevenge.h>

namespace libabw
{
class ABWOutputElements;

enum ABWUnit
{
  ABW_NONE,
  ABW_CM,
  ABW_IN,
  ABW_MM,
  ABW_PI,
  ABW_PT,
  ABW_PX,
  ABW_PERCENT
};

enum ABWListType
{
  ABW_ORDERED,
  ABW_UNORDERED
};

typedef std::map<std::string, std::string> ABWPropertyMap;

bool findInt(const std::string &str, int &res);
bool findDouble(const std::string &str, double &res, ABWUnit &unit);
void parsePropString(const std::string &str, ABWPropertyMap &props);

struct ABWData
{
  ABWData()
    : m_mimeType(), m_binaryData() {}
  ABWData(const ABWData &data)
    : m_mimeType(data.m_mimeType), m_binaryData(data.m_binaryData) {}
  ABWData(const librevenge::RVNGString &mimeType, const librevenge::RVNGBinaryData binaryData)
    : m_mimeType(mimeType), m_binaryData(binaryData) {}
  ~ABWData() {}
  ABWData &operator=(const ABWData &data) = default;

  librevenge::RVNGString m_mimeType;
  librevenge::RVNGBinaryData m_binaryData;
};

struct ABWListElement
{
  ABWListElement()
    : m_listLevel(-1), m_minLabelWidth(0.0), m_spaceBefore(0.0), m_parentId(), m_listId(0) {}
  virtual ~ABWListElement() {}
  virtual void writeOut(librevenge::RVNGPropertyList &propList) const;
  virtual ABWListType getType() const = 0;

  int m_listLevel;
  double m_minLabelWidth;
  double m_spaceBefore;
  int m_parentId;
  //! the list id
  int m_listId;
};
{'fraction_non_alphanumeric': 0.12269092914254205, 'fraction_numerical': 0.007168458781362007, 'mean_word_length': 4.758730158730159, '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': '6850539', 'n_tokens_mistral': 1410, 'n_tokens_neox': 1378, 'n_words': 328}