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

#ifndef __org_apache_lucene_index_DocumentWriter__
#define __org_apache_lucene_index_DocumentWriter__

#pragma interface

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

extern "Java"
{
  namespace org
  {
    namespace apache
    {
      namespace lucene
      {
        namespace document
        {
          class Document;
        }
        namespace index
        {
          class DocumentWriter;
          class Posting;
          class TermVectorOffsetInfo;
          class IndexWriter;
          class Term;
          class FieldInfos;
        }
        namespace search
        {
          class Similarity;
        }
        namespace store
        {
          class Directory;
        }
        namespace analysis
        {
          class Analyzer;
        }
      }
    }
  }
}

class org::apache::lucene::index::DocumentWriter : public ::java::lang::Object
{
public: // actually package-private
  DocumentWriter (::org::apache::lucene::store::Directory *, ::org::apache::lucene::analysis::Analyzer *, ::org::apache::lucene::search::Similarity *, jint);
  DocumentWriter (::org::apache::lucene::store::Directory *, ::org::apache::lucene::analysis::Analyzer *, ::org::apache::lucene::index::IndexWriter *);
  void addDocument (::java::lang::String *, ::org::apache::lucene::document::Document *);
private:
  void invertDocument (::org::apache::lucene::document::Document *);
  void addPosition (::java::lang::String *, ::java::lang::String *, jint, ::org::apache::lucene::index::TermVectorOffsetInfo *);
  JArray< ::org::apache::lucene::index::Posting *> *sortPostingTable ();
  static void quickSort (JArray< ::org::apache::lucene::index::Posting *> *, jint, jint);
  void writePostings (JArray< ::org::apache::lucene::index::Posting *> *, ::java::lang::String *);
  void writeNorms (::java::lang::String *);
public: // actually package-private
  void setInfoStream (::java::io::PrintStream *);
private:
  ::org::apache::lucene::analysis::Analyzer * __attribute__((aligned(__alignof__( ::java::lang::Object )))) analyzer;
  ::org::apache::lucene::store::Directory *directory;
  ::org::apache::lucene::search::Similarity *similarity;
  ::org::apache::lucene::index::FieldInfos *fieldInfos;
  jint maxFieldLength;
  jint termIndexInterval;
  ::java::io::PrintStream *infoStream;
  ::java::util::Hashtable *postingTable;
  jintArray fieldLengths;
  jintArray fieldPositions;
  jintArray fieldOffsets;
  jfloatArray fieldBoosts;
  ::org::apache::lucene::index::Term *termBuffer;
public:

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

#endif /* __org_apache_lucene_index_DocumentWriter__ */
