<commit_before>package org.glob3.mobile.generated; 
//
//  PointCloudsRenderer.cpp
//  G3MiOSSDK
//
//  Created by <NAME> on 8/19/14.
//
//

//
//  PointCloudsRenderer.hpp
//  G3MiOSSDK
//
//  Created by <NAME> on 8/19/14.
//
//




//class IDownloader;
//class Sector;
//class Frustum;

public class PointCloudsRenderer extends DefaultRenderer
{

  public abstract static class PointCloudMetadataListener
  {
    public void dispose()
    {
    }

    public abstract void onMetadata(long pointsCount, Sector sector, double minHeight, double maxHeight);
  }


//  class PointCloudInnerNode;
//  class PointCloudLeafNode;
//
//  class PointCloudNodeVisitor {
//  public:
//    virtual ~PointCloudNodeVisitor() {
//    }
//
//    virtual void visitInnerNode(const PointCloudInnerNode* innerNode) = 0;
//    virtual void visitLeafNode(const PointCloudLeafNode* leafNode) = 0;
//  };




  private static class PointCloudNode
  {

    public final String _id;

    public void dispose()
    {
    }

//    virtual void acceptVisitor(PointCloudNodeVisitor* visitor) = 0;


    protected PointCloudNode(String id)
    {
       _id = id;
    }

  }


//C++ TO JAVA CONVERTER TODO TASK: The implementation of the following type could not be found.
//  class PointCloudLeafNode;

  private static class PointCloudInnerNode extends PointCloudNode
  {
    private PointCloudNode[] _children = new PointCloudNode[4];

    public PointCloudInnerNode(String id)
    {
       super(id);
      _children[0] = null;
      _children[1] = null;
      _children[2] = null;
      _children[3] = null;
    }


    //void PointCloudsRenderer::PointCloudInnerNode::acceptVisitor(PointCloudNodeVisitor* visitor) {
    //  visitor->visitInnerNode(this);
    //
    //  if (_children[0] != NULL) { _children[0]->acceptVisitor(visitor); }
    //  if (_children[1] != NULL) { _children[1]->acceptVisitor(visitor); }
    //  if (_children[2] != NULL) { _children[2]->acceptVisitor(visitor); }
    //  if (_children[3] != NULL) { _children[3]->acceptVisitor(visitor); }
    //}
    //
    //void PointCloudsRenderer::PointCloudLeafNode::acceptVisitor(PointCloudNodeVisitor* visitor) {
    //  visitor->visitLeafNode(this);
    //}
    
    
    public void dispose()
    {
      if (_children[0] != null)
         _children[0].dispose();
      if (_children[1] != null)
         _children[1].dispose();
      if (_children[2] != null)
         _children[2].dispose();
      if (_children[3] != null)
         _children[3].dispose();
      super.dispose();
    }

    public final void addLeafNode(PointCloudLeafNode leafNode)
    {
      final int idLenght = _id.length();
      final int childIndex = leafNode._id.charAt(idLenght) - '0';
      if ((idLenght + 1) == leafNode._id.length())
      {
        if (_children[childIndex] != null)
        {
          throw new RuntimeException("Logic error!");
        }
        _children[childIndex] = leafNode;
      }
      else
      {
        PointCloudInnerNode innerChild = (PointCloudInnerNode)(_children[childIndex]);
        if (innerChild == null)
        {
          IStringBuilder isb = IStringBuilder.newStringBuilder();
          isb.addString(_id);
          isb.addInt(childIndex);
          final String childID = isb.getString();
          if (isb != null)
             isb.dispose();
    
          innerChild = new PointCloudInnerNode(childID);
          _children[childIndex] = innerChild;
        }
        innerChild.addLeafNode(leafNode);
      }
    }

//    void acceptVisitor(PointCloudNodeVisitor* visitor);

  }


  private static class PointCloudLeafNode extends PointCloudNode
  {
    private final int _levelsCountLenght;
    private final int _levelsCount;

    public PointCloudLeafNode(final String id,
                              final int levelsCountLenght,
                              final int[] levelsCount) {
      super(id);
      _levelsCountLenght = levelsCountLenght;
      _levelsCount = levelsCount;
    }


    @Override
    public void dispose() {
      super.dispose();
    }

//    void acceptVisitor(PointCloudNodeVisitor* visitor);

  }<commit_msg>Generated<commit_after>package org.glob3.mobile.generated; 
//
//  PointCloudsRenderer.cpp
//  G3MiOSSDK
//
//  Created by <NAME> on 8/19/14.
//
//

//
//  PointCloudsRenderer.hpp
//  G3MiOSSDK
//
//  Created by <NAME> on 8/19/14.
//
//




//class IDownloader;
//class Sector;
//class Frustum;

public class PointCloudsRenderer extends DefaultRenderer
{

  public abstract static class PointCloudMetadataListener
  {
    public void dispose()
    {
    }

    public abstract void onMetadata(long pointsCount, Sector sector, double minHeight, double maxHeight);
  }


//  class PointCloudInnerNode;
//  class PointCloudLeafNode;
//
//  class PointCloudNodeVisitor {
//  public:
//    virtual ~PointCloudNodeVisitor() {
//    }
//
//    virtual void visitInnerNode(const PointCloudInnerNode* innerNode) = 0;
//    virtual void visitLeafNode(const PointCloudLeafNode* leafNode) = 0;
//  };




  private static class PointCloudNode
  {

    public final String _id;

    public void dispose()
    {
    }

//    virtual void acceptVisitor(PointCloudNodeVisitor* visitor) = 0;


    protected PointCloudNode(String id)
    {
       _id = id;
    }

  }


//C++ TO JAVA CONVERTER TODO TASK: The implementation of the following type could not be found.
//  class PointCloudLeafNode;

  private static class PointCloudInnerNode extends PointCloudNode
  {
    private PointCloudNode[] _children = new PointCloudNode[4];

    public PointCloudInnerNode(String id)
    {
       super(id);
      _children[0] = null;
      _children[1] = null;
      _children[2] = null;
      _children[3] = null;
    }


    //void PointCloudsRenderer::PointCloudInnerNode::acceptVisitor(PointCloudNodeVisitor* visitor) {
    //  visitor->visitInnerNode(this);
    //
    //  if (_children[0] != NULL) { _children[0]->acceptVisitor(visitor); }
    //  if (_children[1] != NULL) { _children[1]->acceptVisitor(visitor); }
    //  if (_children[2] != NULL) { _children[2]->acceptVisitor(visitor); }
    //  if (_children[3] != NULL) { _children[3]->acceptVisitor(visitor); }
    //}
    //
    //void PointCloudsRenderer::PointCloudLeafNode::acceptVisitor(PointCloudNodeVisitor* visitor) {
    //  visitor->visitLeafNode(this);
    //}
    
    
    public void dispose()
    {
      if (_children[0] != null)
         _children[0].dispose();
      if (_children[1] != null)
         _children[1].dispose();
      if (_children[2] != null)
         _children[2].dispose();
      if (_children[3] != null)
         _children[3].dispose();
      super.dispose();
    }

    public final void addLeafNode(PointCloudLeafNode leafNode)
    {
      final int idLenght = _id.length();
      final int childIndex = leafNode._id.charAt(idLenght) - '0';
      if ((idLenght + 1) == leafNode._id.length())
      {
        if (_children[childIndex] != null)
        {
          throw new RuntimeException("Logic error!");
        }
        _children[childIndex] = leafNode;
      }
      else
      {
        PointCloudInnerNode innerChild = (PointCloudInnerNode)(_children[childIndex]);
        if (innerChild == null)
        {
          IStringBuilder isb = IStringBuilder.newStringBuilder();
          isb.addString(_id);
          isb.addInt(childIndex);
          final String childID = isb.getString();
          if (isb != null)
             isb.dispose();
    
          innerChild = new PointCloudInnerNode(childID);
          _children[childIndex] = innerChild;
        }
        innerChild.addLeafNode(leafNode);
      }
    }

//    void acceptVisitor(PointCloudNodeVisitor* visitor);

  }


  private static class PointCloudLeafNode extends PointCloudNode
  {
    private final int _levelsCountLenght;
    private final int[] _levelsCount;

    public PointCloudLeafNode(final String id,
                              final int levelsCountLenght,
                              final int[] levelsCount) {
      super(id);
      _levelsCountLenght = levelsCountLenght;
      _levelsCount = levelsCount;
    }


    @Override
    public void dispose() {
      super.dispose();
    }

//    void acceptVisitor(PointCloudNodeVisitor* visitor);

  }
{'fraction_non_alphanumeric': 0.11750424860403011, 'fraction_numerical': 0.009468317552804079, 'mean_word_length': 2.471976401179941, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6891747', 'n_tokens_mistral': 2584, 'n_tokens_neox': 2476, 'n_words': 532}