/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.28
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.chasen.mecab;

public class Tagger {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected Tagger(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Tagger obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      MeCabJNI.delete_Tagger(swigCPtr);
    }
    swigCPtr = 0;
  }

  public String parse(String arg0) {
    return MeCabJNI.Tagger_parse(swigCPtr, arg0);
  }

  public Node parseToNode(String arg0) {
    long cPtr = MeCabJNI.Tagger_parseToNode(swigCPtr, arg0);
    return (cPtr == 0) ? null : new Node(cPtr, false);
  }

  public String parseNBest(long arg0, String arg1) {
    return MeCabJNI.Tagger_parseNBest(swigCPtr, arg0, arg1);
  }

  public boolean parseNBestInit(String arg0) {
    return MeCabJNI.Tagger_parseNBestInit(swigCPtr, arg0);
  }

  public Node nextNode() {
    long cPtr = MeCabJNI.Tagger_nextNode(swigCPtr);
    return (cPtr == 0) ? null : new Node(cPtr, false);
  }

  public String next() {
    return MeCabJNI.Tagger_next(swigCPtr);
  }

  public String formatNode(Node arg0) {
    return MeCabJNI.Tagger_formatNode(swigCPtr, Node.getCPtr(arg0));
  }

  public String what() {
    return MeCabJNI.Tagger_what(swigCPtr);
  }

  public Tagger(String argc) {
    this(MeCabJNI.new_Tagger__SWIG_0(argc), true);
  }

  public Tagger() {
    this(MeCabJNI.new_Tagger__SWIG_1(), true);
  }

  public String parseToString(String str, long length) {
    return MeCabJNI.Tagger_parseToString__SWIG_0(swigCPtr, str, length);
  }

  public String parseToString(String str) {
    return MeCabJNI.Tagger_parseToString__SWIG_1(swigCPtr, str);
  }

}
