<commit_before>//
//  CompositeTileImageContribution.hpp
//  G3MiOSSDK
//
//  Created by <NAME> on 4/26/14.
//
//

#ifndef __G3MiOSSDK__CompositeTileImageContribution__
#define __G3MiOSSDK__CompositeTileImageContribution__

#include "TileImageContribution.hpp"
#include <vector>


class CompositeTileImageContribution : public TileImageContribution {
public:

  class ChildContribution {
  public:
    const int                    _childIndex;
    const TileImageContribution* _contribution;

    ChildContribution(const int                    childIndex,
                      const TileImageContribution* contribution);

    ~ChildContribution();
  };


  static const TileImageContribution* create(const std::vector<const ChildContribution*>& contributions);


private:
#ifdef C_CODE
  const std::vector<const ChildContribution*> _contributions;
#endif
#ifdef JAVA_CODE
  private final java.util.ArrayList<ChildContribution> _contributions;
#endif

  CompositeTileImageContribution(const std::vector<const ChildContribution*>& contributions) :
  TileImageContribution(false, 1),
  _contributions(contributions)
  {
  }

public:
  ~CompositeTileImageContribution() {
    const int size = _contributions.size();
    for (int i = 0; i < size; i++) {
#ifdef C_CODE
      const ChildContribution* contribution = _contributions[i];
#endif
#ifdef JAVA_CODE
      final ChildContribution contribution = _contributions.get(i);
#endif
      delete contribution;
    }
  }

  const int size() const {
    return _contributions.size();
  }

  const ChildContribution* get(int index) const {
#ifdef C_CODE
    return _contributions[index];
#endif
#ifdef JAVA_CODE
    return _contributions.get(index);
#endif
  }
  
};

#endif
<commit_msg>Tile's image creation refactoring - NOT YET USABLE<commit_after>//
//  CompositeTileImageContribution.hpp
//  G3MiOSSDK
//
//  Created by <NAME> on 4/26/14.
//
//

#ifndef __G3MiOSSDK__CompositeTileImageContribution__
#define __G3MiOSSDK__CompositeTileImageContribution__

#include "TileImageContribution.hpp"
#include <vector>


class CompositeTileImageContribution : public TileImageContribution {
public:

  class ChildContribution {
  public:
    const int                    _childIndex;
    const TileImageContribution* _contribution;

    ChildContribution(const int                    childIndex,
                      const TileImageContribution* contribution);

    ~ChildContribution();
  };


  static const TileImageContribution* create(const std::vector<const ChildContribution*>& contributions);


private:
#ifdef C_CODE
  const std::vector<const ChildContribution*> _contributions;
#endif
#ifdef JAVA_CODE
  private final java.util.ArrayList<ChildContribution> _contributions;
#endif

  CompositeTileImageContribution(const std::vector<const ChildContribution*>& contributions) :
  TileImageContribution(false, 1),
  _contributions(contributions)
  {
  }

public:
  ~CompositeTileImageContribution() {
    const int size = _contributions.size();
    for (int i = 0; i < size; i++) {
#ifdef C_CODE
      const ChildContribution* contribution = _contributions[i];
      delete contribution;
#endif
#ifdef JAVA_CODE
      final ChildContribution contribution = _contributions.get(i);
      contribution.dispose();
#endif
    }
  }

  const int size() const {
    return _contributions.size();
  }

  const ChildContribution* get(int index) const {
#ifdef C_CODE
    return _contributions[index];
#endif
#ifdef JAVA_CODE
    return _contributions.get(index);
#endif
  }
  
};

#endif

{'fraction_non_alphanumeric': 0.09078014184397164, 'fraction_numerical': 0.005673758865248227, 'mean_word_length': 4.015647226173542, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, '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': '7149491', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1036, 'n_words': 241}