// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __java_text_Bidi__
#define __java_text_Bidi__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace java
  {
    namespace text
    {
      class Bidi;
      class AttributedCharacterIterator;
    }
  }
}

class java::text::Bidi : public ::java::lang::Object
{
public:
  Bidi (::java::text::AttributedCharacterIterator *);
  Bidi (jcharArray, jint, jbyteArray, jint, jint, jint);
  Bidi (::java::lang::String *, jint);
private:
  void computeTypes ();
  jint computeParagraphEmbeddingLevel ();
  void computeExplicitLevels ();
  void computeRuns ();
  void resolveWeakTypes ();
  void resolveNeutralTypes ();
  void resolveImplicitLevels ();
  void reinsertFormattingCodes ();
  void runBidi ();
public:
  virtual jboolean baseIsLeftToRight ();
  virtual ::java::text::Bidi *createLineBidi (jint, jint);
  virtual jint getBaseLevel () { return baseEmbedding; }
  virtual jint getLength () { return length; }
  virtual jint getLevelAt (jint);
  virtual jint getRunCount ();
  virtual jint getRunLevel (jint);
  virtual jint getRunLimit (jint);
  virtual jint getRunStart (jint);
  virtual jboolean isLeftToRight ();
  virtual jboolean isMixed ();
  virtual jboolean isRightToLeft ();
  virtual ::java::lang::String *toString ();
  static void reorderVisually (jbyteArray, jint, JArray< ::java::lang::Object *> *, jint, jint);
  static jboolean requiresBidi (jcharArray, jint, jint);
  static const jint DIRECTION_DEFAULT_LEFT_TO_RIGHT = -2L;
  static const jint DIRECTION_DEFAULT_RIGHT_TO_LEFT = -1L;
  static const jint DIRECTION_LEFT_TO_RIGHT = 0L;
  static const jint DIRECTION_RIGHT_TO_LEFT = 1L;
private:
  static const jint LTOR = 1L;
  static const jint RTOL = 2L;
  jcharArray __attribute__((aligned(__alignof__( ::java::lang::Object ))))  text;
  jint textOffset;
  jbyteArray embeddings;
  jint embeddingOffset;
  jint length;
  jint flags;
  jint baseEmbedding;
  jbyteArray types;
  jbyteArray levels;
  ::java::util::ArrayList *formatterIndices;
  jintArray runs;
  jint resultFlags;
public:

  static ::java::lang::Class class$;
};

#endif /* __java_text_Bidi__ */
