package jetbrains.mps.samples.secretCompartmentLanguage.editor;

/*Generated by MPS */

import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.openapi.editor.cells.EditorCell;
import jetbrains.mps.nodeEditor.cells.EditorCell_Collection;
import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Vertical;
import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Horizontal;
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.editor.runtime.style.StyleImpl;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
import org.jetbrains.mps.openapi.language.SProperty;
import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo;
import jetbrains.mps.nodeEditor.cells.EditorCell_Property;
import jetbrains.mps.nodeEditor.cells.SPropertyAccessor;
import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor;
import jetbrains.mps.internal.collections.runtime.Sequence;
import jetbrains.mps.internal.collections.runtime.IWhereFilter;
import java.util.Objects;
import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor;
import jetbrains.mps.nodeEditor.EditorManager;
import jetbrains.mps.openapi.editor.update.AttributeKind;
import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
import jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler;
import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler;
import org.jetbrains.mps.openapi.language.SContainmentLink;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo;
import jetbrains.mps.openapi.editor.cells.CellActionType;
import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode;
import org.jetbrains.mps.openapi.language.SReferenceLink;
import jetbrains.mps.lang.editor.cellProviders.SReferenceCellProvider;
import jetbrains.mps.util.Computable;
import jetbrains.mps.editor.runtime.impl.CellUtil;
import jetbrains.mps.nodeEditor.cells.EditorCell_Error;
import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfoSmartReferenceDecorator;
import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfo;
import jetbrains.mps.lang.core.behavior.LinkAttribute__BehaviorDescriptor;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SConcept;

/*package*/ class StateMachine_EditorBuilder_a extends AbstractEditorBuilder {
  @NotNull
  private SNode myNode;

  public StateMachine_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
    super(context);
    myNode = node;
  }

  @NotNull
  @Override
  public SNode getNode() {
    return myNode;
  }

  /*package*/ EditorCell createCell() {
    return createCollection_0();
  }

  private EditorCell createCollection_0() {
    EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical());
    editorCell.setCellId("Collection_qpt50r_a");
    editorCell.setBig(true);
    setCellContext(editorCell);
    editorCell.addEditorCell(createCollection_1());
    editorCell.addEditorCell(createConstant_1());
    editorCell.addEditorCell(createConstant_2());
    editorCell.addEditorCell(createCollection_2());
    editorCell.addEditorCell(createConstant_4());
    editorCell.addEditorCell(createCollection_3());
    editorCell.addEditorCell(createConstant_6());
    editorCell.addEditorCell(createRefNodeList_1());
    return editorCell;
  }
  private EditorCell createCollection_1() {
    EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
    editorCell.setCellId("Collection_qpt50r_a0");
    Style style = new StyleImpl();
    style.set(StyleAttributes.SELECTABLE, false);
    editorCell.getStyle().putAll(style);
    editorCell.addEditorCell(createProperty_0());
    editorCell.addEditorCell(createConstant_0());
    return editorCell;
  }
  private EditorCell createProperty_0() {
    getCellFactory().pushCellContext();
    try {
      final SProperty property = PROPS.stateMachineName$ztzM;
      getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property));
      EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode);
      editorCell.setDefaultText("<no stateMachineName>");
      editorCell.setCellId("property_stateMachineName");
      editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property));
      setCellContext(editorCell);
      Iterable<SNode> propertyAttributes = SNodeOperations.ofConcept(new IAttributeDescriptor.AllAttributes().list(myNode), CONCEPTS.PropertyAttribute$Gb);
      Iterable<SNode> currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter<SNode>() {
        public boolean accept(SNode it) {
          return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property);
        }
      });
      if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) {
        EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
        return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell);
      } else
      return editorCell;
    } finally {
      getCellFactory().popCellContext();
    }
  }
  private EditorCell createConstant_0() {
    EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "State Machine");
    editorCell.setCellId("Constant_qpt50r_b0a");
    editorCell.setDefaultText("");
    return editorCell;
  }
  private EditorCell createConstant_1() {
    EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
    editorCell.setCellId("Constant_qpt50r_b0");
    editorCell.setDefaultText("");
    return editorCell;
  }
  private EditorCell createConstant_2() {
    EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Events");
    editorCell.setCellId("Constant_qpt50r_c0");
    editorCell.setDefaultText("");
    return editorCell;
  }
  private EditorCell createCollection_2() {
    EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
    editorCell.setCellId("Collection_qpt50r_d0");
    Style style = new StyleImpl();
    style.set(StyleAttributes.SELECTABLE, false);
    editorCell.getStyle().putAll(style);
    editorCell.addEditorCell(createConstant_3());
    editorCell.addEditorCell(createRefNodeList_0());
    return editorCell;
  }
  private EditorCell createConstant_3() {
    EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "  ");
    editorCell.setCellId("Constant_qpt50r_a3a");
    Style style = new StyleImpl();
    style.set(StyleAttributes.SELECTABLE, false);
    editorCell.getStyle().putAll(style);
    editorCell.setDefaultText("");
    return editorCell;
  }
  private EditorCell createRefNodeList_0() {
    AbstractCellListHandler handler = new eventListHandler_qpt50r_b3a(myNode, getEditorContext());
    EditorCell_Collection editorCell = handler.createCells(new CellLayout_Vertical(), false);
    editorCell.setCellId("refNodeList_event");
    editorCell.setSRole(handler.getElementSRole());
    return editorCell;
  }
  private static class eventListHandler_qpt50r_b3a extends RefNodeListHandler {
    @NotNull
    private SNode myNode;

    public eventListHandler_qpt50r_b3a(SNode ownerNode, EditorContext context) {
      super(context, false);
      myNode = ownerNode;
    }

    @NotNull
    public SNode getNode() {
      return myNode;
    }
    public SContainmentLink getSLink() {
      return LINKS.event$fv$P;
    }
    public SAbstractConcept getChildSConcept() {
      return CONCEPTS.Event$Td;
    }

    public EditorCell createNodeCell(SNode elementNode) {
      EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode);
      installElementCellActions(elementNode, elementCell, false);
      return elementCell;
    }
    public EditorCell createEmptyCell() {
      getCellFactory().pushCellContext();
      getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(eventListHandler_qpt50r_b3a.this.getNode(), LINKS.event$fv$P));
      try {
        EditorCell emptyCell = null;
        emptyCell = super.createEmptyCell();
        installElementCellActions(null, emptyCell, true);
        setCellContext(emptyCell);
        return emptyCell;
      } finally {
        getCellFactory().popCellContext();
      }
    }

    private static final Object OBJ = new Object();

    public void installElementCellActions(SNode elementNode, EditorCell elementCell, boolean isEmptyCell) {
      if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_COMPLETE_SET) == null) {
        if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
          elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_COMPLETE_SET, OBJ);
          elementCell.setSubstituteInfo((isEmptyCell ? new SEmptyContainmentSubstituteInfo(elementCell) : new SChildSubstituteInfo(elementCell)));
        }
      }
      if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_DELETE_SET) == null) {
        if (elementNode != null) {
          elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_DELETE_SET, OBJ);
          elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
        }
      }
      if (elementCell.getUserObject(ELEMENT_CELL_BACKSPACE_SET) == null) {
        if (elementNode != null) {
          elementCell.putUserObject(ELEMENT_CELL_BACKSPACE_SET, OBJ);
          elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
        }
      }
      if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) {
        if (elementNode != null) {
          elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, OBJ);
        }
      }
    }
  }
  private EditorCell createConstant_4() {
    EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
    editorCell.setCellId("Constant_qpt50r_e0");
    editorCell.setDefaultText("");
    return editorCell;
  }
  private EditorCell createCollection_3() {
    EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal());
    editorCell.setCellId("Collection_qpt50r_f0");
    Style style = new StyleImpl();
    style.set(StyleAttributes.SELECTABLE, false);
    editorCell.getStyle().putAll(style);
    editorCell.addEditorCell(createConstant_5());
    editorCell.addEditorCell(createRefCell_0());
    return editorCell;
  }
  private EditorCell createConstant_5() {
    EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Start state:");
    editorCell.setCellId("Constant_qpt50r_a5a");
    editorCell.setDefaultText("");
    return editorCell;
  }
  private EditorCell createRefCell_0() {
    final SReferenceLink referenceLink = LINKS.startState$Hixr;
    SReferenceCellProvider provider = new SReferenceCellProvider(getNode(), referenceLink, getEditorContext()) {
      protected EditorCell createReferenceCell(final SNode targetNode) {
        EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable<EditorCell>() {
          public EditorCell compute() {
            return new Inline_Builder0(getEditorContext(), getNode(), targetNode).createCell();
          }
        }, targetNode, LINKS.startState$Hixr);
        CellUtil.setupIDeprecatableStyles(targetNode, cell);
        setSemanticNodeToCells(cell, getNode());
        installDeleteActions_notnull_smartReference(cell);
        return cell;
      }
      @Override
      protected EditorCell createErrorCell(String error) {
        EditorCell_Error cell = new EditorCell_Error(getEditorContext(), getNode(), error, true);
        cell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(getNode(), CellAction_DeleteNode.DeleteDirection.FORWARD));
        cell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(getNode(), CellAction_DeleteNode.DeleteDirection.BACKWARD));
        return cell;
      }
    };

    provider.setNoTargetText("<no startState>");
    EditorCell editorCell = provider.createCell();

    if (editorCell.getSRole() == null) {
      editorCell.setReferenceCell(true);
      editorCell.setSRole(LINKS.startState$Hixr);
    }
    editorCell.setSubstituteInfo(new SReferenceSubstituteInfoSmartReferenceDecorator(new SReferenceSubstituteInfo(editorCell, referenceLink)));
    Iterable<SNode> referenceAttributes = SNodeOperations.ofConcept(new IAttributeDescriptor.AllAttributes().list(myNode), CONCEPTS.LinkAttribute$v_);
    Iterable<SNode> currentReferenceAttributes = Sequence.fromIterable(referenceAttributes).where(new IWhereFilter<SNode>() {
      public boolean accept(SNode it) {
        return Objects.equals(LinkAttribute__BehaviorDescriptor.getLink_id1avfQ4BEFo6.invoke(it), referenceLink);
      }
    });
    if (Sequence.fromIterable(currentReferenceAttributes).isNotEmpty()) {
      EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
      return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentReferenceAttributes).first(), AttributeKind.REFERENCE, editorCell);
    } else
    return editorCell;
  }
  /*package*/ static class Inline_Builder0 extends AbstractEditorBuilder {
    @NotNull
    private SNode myNode;
    private SNode myReferencingNode;

    /*package*/ Inline_Builder0(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) {
      super(context);
      myReferencingNode = referencingNode;
      myNode = node;
    }

    /*package*/ EditorCell createCell() {
      return createProperty_1();
    }

    @NotNull
    @Override
    public SNode getNode() {
      return myNode;
    }

    private EditorCell createProperty_1() {
      getCellFactory().pushCellContext();
      try {
        final SProperty property = PROPS.stateName$8sir;
        getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property));
        EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, true, false), myNode);
        editorCell.setDefaultText("<no stateName>");
        editorCell.setCellId("property_stateName");
        editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property));
        setCellContext(editorCell);
        Iterable<SNode> propertyAttributes = SNodeOperations.ofConcept(new IAttributeDescriptor.AllAttributes().list(myNode), CONCEPTS.PropertyAttribute$Gb);
        Iterable<SNode> currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter<SNode>() {
          public boolean accept(SNode it) {
            return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property);
          }
        });
        if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) {
          EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
          return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell);
        } else
        return editorCell;
      } finally {
        getCellFactory().popCellContext();
      }
    }
  }
  private EditorCell createConstant_6() {
    EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "");
    editorCell.setCellId("Constant_qpt50r_g0");
    editorCell.setDefaultText("");
    return editorCell;
  }
  private EditorCell createRefNodeList_1() {
    AbstractCellListHandler handler = new stateListHandler_qpt50r_h0(myNode, getEditorContext());
    EditorCell_Collection editorCell = handler.createCells(new CellLayout_Vertical(), false);
    editorCell.setCellId("refNodeList_state");
    editorCell.setSRole(handler.getElementSRole());
    return editorCell;
  }
  private static class stateListHandler_qpt50r_h0 extends RefNodeListHandler {
    @NotNull
    private SNode myNode;

    public stateListHandler_qpt50r_h0(SNode ownerNode, EditorContext context) {
      super(context, false);
      myNode = ownerNode;
    }

    @NotNull
    public SNode getNode() {
      return myNode;
    }
    public SContainmentLink getSLink() {
      return LINKS.state$IJa5;
    }
    public SAbstractConcept getChildSConcept() {
      return CONCEPTS.State$dM;
    }

    public EditorCell createNodeCell(SNode elementNode) {
      EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode);
      installElementCellActions(elementNode, elementCell, false);
      return elementCell;
    }
    public EditorCell createEmptyCell() {
      getCellFactory().pushCellContext();
      getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(stateListHandler_qpt50r_h0.this.getNode(), LINKS.state$IJa5));
      try {
        EditorCell emptyCell = null;
        emptyCell = super.createEmptyCell();
        installElementCellActions(null, emptyCell, true);
        setCellContext(emptyCell);
        return emptyCell;
      } finally {
        getCellFactory().popCellContext();
      }
    }

    private static final Object OBJ = new Object();

    public void installElementCellActions(SNode elementNode, EditorCell elementCell, boolean isEmptyCell) {
      if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_COMPLETE_SET) == null) {
        if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
          elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_COMPLETE_SET, OBJ);
          elementCell.setSubstituteInfo((isEmptyCell ? new SEmptyContainmentSubstituteInfo(elementCell) : new SChildSubstituteInfo(elementCell)));
        }
      }
      if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_DELETE_SET) == null) {
        if (elementNode != null) {
          elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_DELETE_SET, OBJ);
          elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
        }
      }
      if (elementCell.getUserObject(ELEMENT_CELL_BACKSPACE_SET) == null) {
        if (elementNode != null) {
          elementCell.putUserObject(ELEMENT_CELL_BACKSPACE_SET, OBJ);
          elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
        }
      }
      if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) {
        if (elementNode != null) {
          elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, OBJ);
        }
      }
    }
  }

  private static final class PROPS {
    /*package*/ static final SProperty stateMachineName$ztzM = MetaAdapterFactory.getProperty(0x6986543d82184ebfL, 0xa2e9565e5049c1ceL, 0x116bbacae3cL, 0x116bcaff7e0L, "stateMachineName");
    /*package*/ static final SProperty stateName$8sir = MetaAdapterFactory.getProperty(0x6986543d82184ebfL, 0xa2e9565e5049c1ceL, 0x116bced8217L, 0x116bcee23ceL, "stateName");
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept PropertyAttribute$Gb = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute");
    /*package*/ static final SConcept Event$Td = MetaAdapterFactory.getConcept(0x6986543d82184ebfL, 0xa2e9565e5049c1ceL, 0x116bcdac91eL, "jetbrains.mps.samples.secretCompartmentLanguage.structure.Event");
    /*package*/ static final SConcept LinkAttribute$v_ = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da51L, "jetbrains.mps.lang.core.structure.LinkAttribute");
    /*package*/ static final SConcept State$dM = MetaAdapterFactory.getConcept(0x6986543d82184ebfL, 0xa2e9565e5049c1ceL, 0x116bced8217L, "jetbrains.mps.samples.secretCompartmentLanguage.structure.State");
  }

  private static final class LINKS {
    /*package*/ static final SContainmentLink event$fv$P = MetaAdapterFactory.getContainmentLink(0x6986543d82184ebfL, 0xa2e9565e5049c1ceL, 0x116bbacae3cL, 0x116bcddb306L, "event");
    /*package*/ static final SReferenceLink startState$Hixr = MetaAdapterFactory.getReferenceLink(0x6986543d82184ebfL, 0xa2e9565e5049c1ceL, 0x116bbacae3cL, 0x116c1078061L, "startState");
    /*package*/ static final SContainmentLink state$IJa5 = MetaAdapterFactory.getContainmentLink(0x6986543d82184ebfL, 0xa2e9565e5049c1ceL, 0x116bbacae3cL, 0x116c00eaeafL, "state");
  }
}

{'repo_name': 'JetBrains/MPS', 'stars': '1070', 'repo_language': 'Java', 'file_name': 'LanguageAspectsEP_extension.java', 'mime_type': 'text/x-java', 'hash': -2534411182522774455, 'source_dataset': 'data'}


class UrlMappings {

	static mappings = {
		"/$controller/$action?/$id?"{
			constraints {
				// apply constraints here
			}
		}

		"500"(view:'/error')
	}
}

{'repo_name': 'swagger-api/swagger-samples', 'stars': '475', 'repo_language': 'JavaScript', 'file_name': 'logback.xml', 'mime_type': 'text/plain', 'hash': 4363833255177487804, 'source_dataset': 'data'}


#include <gpd/candidate/antipodal.h>

namespace gpd {
namespace candidate {

const int Antipodal::NO_GRASP = 0;    // normals point not toward any finger
const int Antipodal::HALF_GRASP = 1;  // normals point towards one finger
const int Antipodal::FULL_GRASP = 2;  // normals point towards both fingers

int Antipodal::evaluateGrasp(const util::PointList &point_list,
                             double extremal_thresh, int lateral_axis,
                             int forward_axis, int vertical_axis) const {
  int result = NO_GRASP;

  const Eigen::Matrix3Xd &pts = point_list.getPoints();
  const Eigen::Matrix3Xd &normals = point_list.getNormals();

  // Select points that are extremal and have their surface normal within the
  // friction cone of the closing direction.
  Eigen::Vector3d l, r;
  if (lateral_axis == 0) {
    l << -1.0, 0.0, 0.0;
    r << 1.0, 0.0, 0.0;
  } else if (lateral_axis == 1) {
    l << 0.0, -1.0, 0.0;
    r << 0.0, 1.0, 0.0;
  }
  double cos_friction_coeff_ = cos(friction_coeff_ * M_PI / 180.0);
  double min_x = pts.row(lateral_axis).minCoeff() + extremal_thresh;
  double max_x = pts.row(lateral_axis).maxCoeff() - extremal_thresh;
  std::vector<int> left_idx_viable, right_idx_viable;

  for (int i = 0; i < pts.cols(); i++) {
    bool is_within_left_close =
        (l.transpose() * normals.col(i)) > cos_friction_coeff_;
    bool is_within_right_close =
        (r.transpose() * normals.col(i)) > cos_friction_coeff_;
    bool is_left_extremal = pts(lateral_axis, i) < min_x;
    bool is_right_extremal = pts(lateral_axis, i) > max_x;

    if (is_within_left_close && is_left_extremal) left_idx_viable.push_back(i);
    if (is_within_right_close && is_right_extremal)
      right_idx_viable.push_back(i);
  }

  if (left_idx_viable.size() > 0 || right_idx_viable.size() > 0)
    result = HALF_GRASP;

  if (left_idx_viable.size() > 0 && right_idx_viable.size() > 0) {
    Eigen::Matrix3Xd left_pts_viable(3, left_idx_viable.size()),
        right_pts_viable(3, right_idx_viable.size());
    for (int i = 0; i < left_idx_viable.size(); i++) {
      left_pts_viable.col(i) = pts.col(left_idx_viable[i]);
    }
    for (int i = 0; i < right_idx_viable.size(); i++) {
      right_pts_viable.col(i) = pts.col(right_idx_viable[i]);
    }

    double top_viable_y =
        std::min(left_pts_viable.row(forward_axis).maxCoeff(),
                 right_pts_viable.row(forward_axis).maxCoeff());
    double bottom_viable_y =
        std::max(left_pts_viable.row(forward_axis).minCoeff(),
                 right_pts_viable.row(forward_axis).minCoeff());

    double top_viable_z =
        std::min(left_pts_viable.row(vertical_axis).maxCoeff(),
                 right_pts_viable.row(vertical_axis).maxCoeff());
    double bottom_viable_z =
        std::max(left_pts_viable.row(vertical_axis).minCoeff(),
                 right_pts_viable.row(vertical_axis).minCoeff());

    int num_viable_left = 0;
    for (int i = 0; i < left_pts_viable.cols(); i++) {
      double y = left_pts_viable(forward_axis, i);
      double z = left_pts_viable(vertical_axis, i);
      if (y >= bottom_viable_y && y <= top_viable_y && z >= bottom_viable_z &&
          z <= top_viable_z)
        num_viable_left++;
    }
    int num_viable_right = 0;
    for (int i = 0; i < right_pts_viable.cols(); i++) {
      double y = right_pts_viable(forward_axis, i);
      double z = right_pts_viable(vertical_axis, i);
      if (y >= bottom_viable_y && y <= top_viable_y && z >= bottom_viable_z &&
          z <= top_viable_z)
        num_viable_right++;
    }

    if (num_viable_left >= min_viable_ && num_viable_right >= min_viable_) {
      result = FULL_GRASP;
    }
  }

  return result;
}

int Antipodal::evaluateGrasp(const Eigen::Matrix3Xd &normals,
                             double thresh_half, double thresh_full) const {
  int num_thresh = 6;
  int grasp = 0;
  double cos_thresh = cos(thresh_half * M_PI / 180.0);
  int numl = 0;
  int numr = 0;
  Eigen::Vector3d l, r;
  l << -1, 0, 0;
  r << 1, 0, 0;
  bool is_half_grasp = false;
  bool is_full_grasp = false;

  // check whether this is a half grasp
  for (int i = 0; i < normals.cols(); i++) {
    if (l.dot(normals.col(i)) > cos_thresh) {
      numl++;
      if (numl > num_thresh) {
        is_half_grasp = true;
        break;
      }
    }

    if (r.dot(normals.col(i)) > cos_thresh) {
      numr++;
      if (numr > num_thresh) {
        is_half_grasp = true;
        break;
      }
    }
  }

  // check whether this is a full grasp
  cos_thresh = cos(thresh_full * M_PI / 180.0);
  numl = 0;
  numr = 0;

  for (int i = 0; i < normals.cols(); i++) {
    if (l.dot(normals.col(i)) > cos_thresh) {
      numl++;
      if (numl > num_thresh && numr > num_thresh) {
        is_full_grasp = true;
        break;
      }
    }

    if (r.dot(normals.col(i)) > cos_thresh) {
      numr++;
      if (numl > num_thresh && numr > num_thresh) {
        is_full_grasp = true;
        break;
      }
    }
  }

  if (is_full_grasp)
    return FULL_GRASP;
  else if (is_half_grasp)
    return HALF_GRASP;

  return NO_GRASP;
}

}  // namespace candidate
}  // namespace gpd

{'repo_name': 'atenpas/gpd', 'stars': '261', 'repo_language': 'C++', 'file_name': 'image_geometry_1channels.cfg', 'mime_type': 'text/plain', 'hash': -6299267834286602506, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.wjj.demo">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

{'repo_name': 'ddwhan0123/BlogSample', 'stars': '167', 'repo_language': 'JavaScript', 'file_name': 'ExampleUnitTest.java', 'mime_type': 'text/x-java', 'hash': -3040024601981819456, 'source_dataset': 'data'}


'use strict';

const {
  isMainThread,
  parentPort,
  Worker,
  workerData,
} = require('worker_threads');
const {
  getDefaultRollupConfig,
} = require('../bundler/default-rollup-config.js');
const { importModule } = require('../utils/module.js');
const { rollup } = require('rollup');
// @ts-ignore
const virtual = require('@rollup/plugin-virtual');

class BundleWorker {
  /**
   * Constructor
   *
   * @param { string } [rollupConfigPath]
   */
  constructor(rollupConfigPath) {
    const defaultConfig = getDefaultRollupConfig();

    this.rollupConfig = rollupConfigPath
      ? mergeRollupConfig(defaultConfig, importModule(rollupConfigPath))
      : defaultConfig;
    this.worker;

    if (isMainThread) {
      // Load this file in Worker thread, passing `rollupConfigPath` as data
      this.worker = new Worker(__filename, { workerData: rollupConfigPath });
    }
  }

  /**
   * Bundle file at "inputPath"
   *
   * @param { string } inputPath
   * @param { string } outputPath
   * @param { string } sourcePrefix
   * @param { Array<string> } [namedExports]
   */
  async bundle(inputPath, outputPath, sourcePrefix, namedExports) {
    if (this.worker) {
      return new Promise((resolve, reject) => {
        if (this.worker) {
          this.worker.postMessage({
            inputPath,
            outputPath,
            sourcePrefix,
            namedExports,
          });
          this.worker.once('message', (err) => {
            err ? reject(err) : resolve();
          });
        } else {
          reject(Error('No bundle worker instance found'));
        }
      });
    }

    const banner = sourcePrefix + inputPath;
    const parsedOptions = parseRollupOptions(banner, this.rollupConfig);
    const inputOptions = {
      ...parsedOptions.input,
      input: inputPath,
    };
    const outputOptions = {
      ...parsedOptions.output,
      file: outputPath,
    };

    if (namedExports && inputOptions.plugins) {
      inputOptions.plugins.unshift(
        virtual({
          entry: `import entry from '${inputPath}';
        export default entry;
        export {${namedExports.join(', ')}} from '${inputPath}';`,
        }),
      );
      inputOptions.input = 'entry';
    }

    const bundled = await rollup(inputOptions);
    await bundled.write(outputOptions);
  }

  /**
   * Destroy instance
   *
   * @returns { Promise<void> }
   */
  destroy() {
    if (this.worker) {
      // @ts-ignore
      return this.worker.terminate();
    }
    return Promise.resolve();
  }
}

module.exports = BundleWorker;

// Create instance if run in Worker thread
if (!isMainThread && parentPort) {
  /** @type { string | undefined } */
  const rollupConfigPath = workerData;
  const bundleWorker = new BundleWorker(rollupConfigPath);

  parentPort.on('message', async (
    /** @type { BundleWorkerMessage } */ message,
  ) => {
    const { inputPath, outputPath, sourcePrefix, namedExports } = message;

    try {
      await bundleWorker.bundle(
        inputPath,
        outputPath,
        sourcePrefix,
        namedExports,
      );
      parentPort.postMessage(false);
    } catch (err) {
      parentPort.postMessage(err);
    }
  });
}

/**
 * Merge user rollup.config with default
 *
 * @param { RollupOptions } defaultConfig
 * @param { RollupOptions } newConfig
 * @returns { RollupOptions }
 */
function mergeRollupConfig(defaultConfig, newConfig) {
  const {
    output: requiredOutput,
    plugins: defaultPlugins = [],
    ...defaultOptions
  } = defaultConfig;
  const { output, plugins = [], ...options } = newConfig;
  /** @type { { [name: string]: import('rollup').Plugin }}  */
  const newPluginsByName = plugins.reduce((newPluginsByName, plugin) => {
    // @ts-ignore
    newPluginsByName[plugin.name] = plugin;
    return newPluginsByName;
  }, {});
  let mergedPlugins = [];

  // Replace default plugin with new if it has the same name
  for (const plugin of defaultPlugins) {
    const { name } = plugin;
    mergedPlugins.push(
      name in newPluginsByName ? newPluginsByName[name] : plugin,
    );
  }

  return {
    ...defaultOptions,
    ...options,
    plugins: mergedPlugins,
    output: { ...output, ...requiredOutput },
  };
}

/**
 * Parse Rollup options
 *
 * @param { string } banner
 * @param { RollupOptions } options
 * @returns { { input: RollupInputOptions, output: RollupOutputOptions } }
 */
function parseRollupOptions(banner, options) {
  if (!options) {
    return { input: {}, output: { banner } };
  }

  let { input, treeshake, output = {}, watch, ...inputOverride } = options;

  if (Array.isArray(output)) {
    output = output[0];
  }

  const { file, format, sourcemap, ...outputOverride } = output;

  if ('banner' in outputOverride) {
    outputOverride.banner = banner + outputOverride.banner;
  } else {
    outputOverride.banner = banner;
  }

  // Shallow copy plugins
  if (inputOverride.plugins) {
    inputOverride.plugins = [...inputOverride.plugins];
  }

  return { input: inputOverride, output: outputOverride };
}

{'repo_name': 'popeindustries/dvlp', 'stars': '105', 'repo_language': 'JavaScript', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -3401060623395312688, 'source_dataset': 'data'}


//
//  TFClip.cpp
//  MNNConverter
//
//  Created by MNN on 2020/07/09.
//  Copyright © 2018, Alibaba Group Holding Limited
//

#include "TFExtraManager.hpp"
#include "MNN_generated.h"

namespace MNN {
namespace Express {
class ClipTransform : public TFExtraManager::Transform {
public:
    virtual EXPRP onExecute(EXPRP expr) const override {
        auto inputs = expr->inputs();
        if (inputs.size() != 3) {
            MNN_ERROR("ClipByValue should has 3 inputs\n");
            return nullptr;
        }
        float minValue = 0.0f;
        float maxValue = 0.0f;
        {
            auto minInfo = inputs[1]->getInfo();
            auto maxInfo = inputs[2]->getInfo();
            auto minP = inputs[1]->readMap<float>();
            auto maxP = inputs[2]->readMap<float>();
            if (nullptr == minP || nullptr == maxP || 1 != minInfo->size || 1 != maxInfo->size) {
                // Not const clip op, use max(min) instead
                auto sameVar = _Minimum(_Maximum(inputs[0], inputs[1]), inputs[2]);
                sameVar->setName(expr->name());
                return sameVar->expr().first;
            }
            minValue = *minP;
            maxValue = *maxP;
        }
        std::vector<VARP> subInputs = {inputs[0]};
        std::unique_ptr<MNN::OpT> clipOp(new OpT);
        clipOp->type = OpType_ReLU6;
        clipOp->main.type = OpParameter_Relu6;
        clipOp->main.value = new Relu6T;
        auto param = clipOp->main.AsRelu6();
        {
            param->maxValue = maxValue;
            param->minValue = minValue;
        }
        auto newExpr = Expr::create(clipOp.get(), subInputs, 1);
        newExpr->setName(expr->name());
        return newExpr;
    }
};
static auto gRegister = []() {
    TFExtraManager::get()->insert("ClipByValue", std::shared_ptr<TFExtraManager::Transform>(new ClipTransform));
    return true;
}();
}
} // namespace MNN

{'repo_name': 'alibaba/MNN', 'stars': '4341', 'repo_language': 'C++', 'file_name': 'dummy.cpp', 'mime_type': 'text/plain', 'hash': -2019800290779188860, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<GenericTest name="QuickGraphAsmMeta" storage="c:\users\maf\cci1\foxtrot\tests\quickgraph\quickgraphasmmeta.generictest" id="9d63f380-1d34-48eb-8e50-d34ba2d29d3b" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2006">
  <Css projectStructure="" iteration="" />
  <Owners>
    <Owner name="" />
  </Owners>
  <Command filename="..\..\..\Microsoft.Research\ImportedCCI2\asmmeta.exe" arguments="Quickgraph.dll" workingDirectory="%testlocation%\bin\debug" />
  <SummaryXmlFile path="%TestOutputDirectory%\<Enter summary file name here>" />
</GenericTest>

{'repo_name': 'microsoft/CodeContracts', 'stars': '833', 'repo_language': 'C#', 'file_name': 'AssemblyInfo.cs', 'mime_type': 'text/plain', 'hash': 7944833107589238925, 'source_dataset': 'data'}


libavcodec/xbmdec.o: libavcodec/xbmdec.c libavutil/avstring.h \
 libavutil/attributes.h libavcodec/avcodec.h libavutil/samplefmt.h \
 libavutil/avutil.h libavutil/common.h libavutil/macros.h \
 libavutil/version.h libavutil/avconfig.h config.h libavutil/intmath.h \
 libavutil/mem.h libavutil/error.h libavutil/internal.h libavutil/timer.h \
 libavutil/log.h libavutil/cpu.h libavutil/dict.h libavutil/pixfmt.h \
 libavutil/libm.h libavutil/intfloat.h libavutil/mathematics.h \
 libavutil/rational.h libavutil/attributes.h libavutil/avutil.h \
 libavutil/buffer.h libavutil/cpu.h libavutil/channel_layout.h \
 libavutil/dict.h libavutil/frame.h libavutil/buffer.h \
 libavutil/samplefmt.h libavutil/log.h libavutil/pixfmt.h \
 libavutil/rational.h libavcodec/version.h libavutil/version.h \
 libavcodec/internal.h libavutil/mathematics.h libavcodec/mathops.h \
 libavutil/common.h

{'repo_name': 'mabeijianxi/FFmpeg4Android', 'stars': '440', 'repo_language': 'C', 'file_name': 'libvpx-1080p50_60.ffpreset', 'mime_type': 'text/plain', 'hash': 8925830528848119125, 'source_dataset': 'data'}


# A.9. Tipe Data

Go mengenal beberapa jenis tipe data, diantaranya adalah tipe data numerik (desimal & non-desimal), string, dan boolean.

Di bab-bab sebelumnya secara tak sadar kita sudah mengaplikasikan beberapa tipe data, seperti `string` dan tipe numerik `int`.

Pada bab ini akan dijelaskan beberapa macam tipe data standar yang disediakan oleh Go, beserta cara penggunaannya.

## A.9.1. Tipe Data Numerik Non-Desimal

Tipe data numerik non-desimal atau **non floating point** di Go ada beberapa jenis. Secara umum ada 2 tipe data kategori ini yang perlu diketahui.

 - `uint`, tipe data untuk bilangan cacah (bilangan positif).
 - `int`, tipe data untuk bilangan bulat (bilangan negatif dan positif).

Kedua tipe data di atas kemudian dibagi lagi menjadi beberapa jenis, dengan pembagian berdasarkan lebar cakupan nilainya, detailnya bisa dilihat di tabel berikut.

| Tipe data | Cakupan bilangan |
| :-------: | :---- |
| `uint8` | 0 ↔ 255 |
| `uint16` | 0 ↔ 65535 |
| `uint32` | 0 ↔ 4294967295 |
| `uint64` | 0 ↔ 18446744073709551615 |
| `uint` | sama dengan `uint32` atau `uint64` (tergantung nilai) |
| `byte` | sama dengan `uint8` |
| `int8` | -128 ↔ 127 |
| `int16` | -32768 ↔ 32767 |
| `int32` | -2147483648 ↔ 2147483647 |
| `int64` | -9223372036854775808 ↔ 9223372036854775807 |
| `int` | sama dengan `int32` atau `int64` (tergantung nilai) |
| `rune` | sama dengan `int32` |

Dianjurkan untuk tidak sembarangan dalam menentukan tipe data variabel, sebisa mungkin tipe yang dipilih harus disesuaikan dengan nilainya, karena efeknya adalah ke alokasi memori variabel. Pemilihan tipe data yang tepat akan membuat pemakaian memori lebih optimal, tidak berlebihan.

```go
var positiveNumber uint8 = 89
var negativeNumber = -1243423644

fmt.Printf("bilangan positif: %d\n", positiveNumber)
fmt.Printf("bilangan negatif: %d\n", negativeNumber)
```

Variabel `positiveNumber` bertipe `uint8` dengan nilai awal `89`. Sedangkan variabel `negativeNumber` dideklarasikan dengan nilai awal `-1243423644`. Compiler secara cerdas akan menentukan tipe data variabel tersebut sebagai `int32` (karena angka tersebut masuk ke cakupan tipe data `int32`).

Template `%d` pada `fmt.Printf()` digunakan untuk memformat data numerik non-desimal.

## A.9.2. Tipe Data Numerik Desimal

Tipe data numerik desimal yang perlu diketahui ada 2, `float32` dan `float64`. Perbedaan kedua tipe data tersebut berada di lebar cakupan nilai desimal yang bisa ditampung. Untuk lebih jelasnya bisa merujuk ke spesifikasi [IEEE-754 32-bit floating-point numbers](http://www.h-schmidt.net/FloatConverter/IEEE754.html).

```go
var decimalNumber = 2.62

fmt.Printf("bilangan desimal: %f\n", decimalNumber)
fmt.Printf("bilangan desimal: %.3f\n", decimalNumber)
```

Pada kode di atas, variabel `decimalNumber` akan memiliki tipe data `float32`, karena nilainya berada di cakupan tipe data tersebut.

![Tipe data numerik desimal](images/A.9_1_decimal_data_type.png)

Template `%f` digunakan untuk memformat data numerik desimal menjadi string. Digit desimal yang akan dihasilkan adalah **6 digit**. Pada contoh di atas, hasil format variabel `decimalNumber` adalah `2.620000`. Jumlah digit yang muncul bisa dikontrol menggunakan `%.nf`, tinggal ganti `n` dengan angka yang diinginkan. Contoh: `%.3f` maka akan menghasilkan 3 digit desimal, `%.10f` maka akan menghasilkan 10 digit desimal.

## A.9.3. Tipe Data `bool` (Boolean)

Tipe data `bool` berisikan hanya 2 variansi nilai, `true` dan `false`. Tipe data ini biasa dimanfaatkan dalam seleksi kondisi dan perulangan (yang nantinya akan kita bahas pada bab 12 dan bab 13).

```go
var exist bool = true
fmt.Printf("exist? %t \n", exist)
```

Gunakan `%t` untuk memformat data `bool` menggunakan fungsi `fmt.Printf()`.

## A.9.4. Tipe Data `string`

Ciri khas dari tipe data string adalah nilainya di apit oleh tanda *quote* atau petik dua (`"`). Contoh penerapannya:

```go
var message string = "Halo"
fmt.Printf("message: %s \n", message)
```

Selain menggunakan tanda quote, deklarasi string juga bisa dengan tanda *grave accent/backticks* (`</code>), tanda ini terletak di sebelah kiri tombol 1. Keistimewaan string yang dideklarasikan menggunakan backtics adalah membuat semua karakter didalamnya **tidak di escape**, termasuk `\n`, tanda petik dua dan tanda petik satu, baris baru, dan lainnya. Semua akan terdeteksi sebagai string.

```go
var message = `Nama saya "John Wick".
Salam kenal.
Mari belajar "Golang".`

fmt.Println(message)
```

Ketika dijalankan, output akan muncul sama persisi sesuai nilai variabel `message` di atas. Tanda petik dua akan muncul, baris baru juga muncul, sama persis.

![String menggunakan grave accent](images/A.9_2_unescaped_string.png)

## A.9.5. Nilai `nil` & Zero Value

`nil` bukan merupakan tipe data, melainkan sebuah nilai. Variabel yang isi nilainya `nil` berarti memiliki nilai kosong.

Semua tipe data yang sudah dibahas di atas memiliki zero value (nilai default tipe data). Artinya meskipun variabel dideklarasikan dengan tanpa nilai awal, tetap akan ada nilai default-nya.

 - Zero value dari `string` adalah `""` (string kosong).
 - Zero value dari `bool` adalah `false`.
 - Zero value dari tipe numerik non-desimal adalah `0`.
 - Zero value dari tipe numerik desimal adalah `0.0`.

Zero value berbeda dengan `nil`. `Nil` adalah nilai kosong, benar-benar kosong. `nil` tidak bisa digunakan pada tipe data yang sudah dibahas di atas. Ada beberapa tipe data yang bisa di-set nilainya dengan `nil`, diantaranya:

- pointer
- tipe data fungsi
- slice
- `map`
- `channel`
- interface kosong atau `interface{}`

Nantinya kita akan sering bertemu dengan `nil` setelah masuk pada pembahasan bab-bab tersebut.

---

Source code praktek pada bab ini tersedia di Github

    https://github.com/novalagung/dasarpemrogramangolang-example/.../chapter-A.9...

{'repo_name': 'novalagung/dasarpemrogramangolang', 'stars': '398', 'repo_language': 'Go', 'file_name': 'lint.yml', 'mime_type': 'text/plain', 'hash': -7406699444997961574, 'source_dataset': 'data'}


package com.viadee.sonarquest.repositories;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.viadee.sonarquest.entities.World;

public interface WorldRepository extends JpaRepository<World, Long> {

    World findByProject(String project);

    List<World> findByActiveTrue();

}

{'repo_name': 'viadee/sonarQuest', 'stars': '103', 'repo_language': 'TypeScript', 'file_name': '20180420-171640.583.xml', 'mime_type': 'text/xml', 'hash': -3396501817345460463, 'source_dataset': 'data'}


/*
===========================================================================

Copyright (c) 2010-2015 Darkstar Dev Teams

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/

This file is part of DarkStar-server source code.

===========================================================================
*/

#ifndef _CRAISE_STATE_H
#define _CRAISE_STATE_H

#include "state.h"

class CRaiseState : public CState
{
public:
    CRaiseState(CBattleEntity* PEntity);

    //state logic done per tick - returns whether to exit the state or not
    virtual bool Update(time_point tick) override;

    virtual void Cleanup(time_point tick) override {}
    //whether the state can be changed by normal means
    virtual bool CanChangeState() override { return false; };
    virtual bool CanFollowPath() override { return false; };
    virtual bool CanInterrupt() override { return false; }

private:
    CBattleEntity* const m_PEntity;
};

#endif

{'repo_name': 'DarkstarProject/darkstar', 'stars': '463', 'repo_language': 'TSQL', 'file_name': 'Harvestman.lua', 'mime_type': 'text/plain', 'hash': 337380784775539737, 'source_dataset': 'data'}