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

#include "CLcomImpl.h"

//constructors
 HRESULT CBooleanQuery::FinalConstruct(){
{
  try {
  __object=_CLNEW lucene::search::BooleanQuery;
 
  }COM_CATCHALL;
 
}
 return S_OK;
 }

//destructors
void CBooleanQuery::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CBooleanQuery::UpCast(IQuery** ret){
  CQuery* cret = new CComObject<CQuery>; 
  cret->setObject((lucene::search::Query*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CBooleanQuery::add(IQuery* axarg1, VARIANT_BOOL axarg2, VARIANT_BOOL axarg3)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 bool arg2=0;
 bool arg3=0;
 
 arg1 = ((CQuery*)axarg1)->__object;

 arg2 = (axarg2==0?false:true); 
 arg3 = (axarg3==0?false:true); 
{    try {     arg1->__cl_addref();
    this->__object->add(arg1, arg2, arg3);
     }COM_CATCHALL;
    }
return S_OK;
}

STDMETHODIMP CBooleanQuery::getClauseCount(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getClauseCount();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CBooleanQuery::rewrite(IIndexReader* axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::search::Query*)this->__object->rewrite(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CBooleanQuery::equals(IQuery* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CBooleanQuery::toString_ex(BSTR axarg1, BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t* result;
BSTR cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t*)this->__object->toString(arg1);
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

//inherited methods
STDMETHODIMP CBooleanQuery::setBoost(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  ((lucene::search::Query*)this->__object)->setBoost(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CBooleanQuery::getBoost(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)((lucene::search::Query*)this->__object)->getBoost();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CBooleanQuery::getSimilarity(ISearcher* axarg1, ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Searcher* arg1=0;
lucene::search::Similarity* result;
CSimilarity* cret;
 
 arg1 = ((CSearcher*)axarg1)->__object;

{
  try {
  result=(lucene::search::Similarity*)((lucene::search::Query*)this->__object)->getSimilarity(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CBooleanQuery::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)((lucene::search::Query*)this->__object)->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}


//constructors
STDMETHODIMP CDateFilter::Initialise(BSTR axarg1, double axarg2, double axarg3)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 int64_t arg2=0;
 int64_t arg3=0;
 arg1 = (wchar_t *)axarg1; 
 arg2 = (int64_t)axarg2; 
 arg3 = (int64_t)axarg3; 
{
  try {
  this->__object = new lucene::search::DateFilter(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CDateFilter::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CDateFilter::UpCast(IFilter** ret){
  CFilter* cret = new CComObject<CFilter>; 
  cret->setObject((lucene::search::Filter*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CDateFilter::bits(IIndexReader* axarg1, IBitSet** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::util::BitSet* result;
CBitSet* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::util::BitSet*)this->__object->bits(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CBitSet>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CDateFilter::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CTerm::Initialise(BSTR axarg1, BSTR axarg2)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 wchar_t* arg2=0;
 arg1 = (wchar_t *)axarg1; 
 arg2 = (wchar_t *)axarg2; 
{
  try {
  this->__object = new lucene::index::Term(arg1, arg2);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CTerm::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CTerm::field(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->field();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

STDMETHODIMP CTerm::text(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->text();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

STDMETHODIMP CTerm::compareTo(ITerm* axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
int32_t result;
LONG cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(int32_t)this->__object->compareTo(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTerm::equals(ITerm* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CTerm::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

//inherited methods

//destructors
void CTermFreqVector::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CTermFreqVector::getField(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->getField();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

STDMETHODIMP CTermFreqVector::size(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->size();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTermFreqVector::getTerms(SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
const wchar_t** result;
SAFEARRAY* cret;
{
  try {
  result=(const wchar_t**)this->__object->getTerms();
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CTermFreqVector::getTermFrequencies(SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
const int32_t* result;
SAFEARRAY* cret;
{
  try {
  result=(const int32_t*)this->__object->getTermFrequencies();
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CTermFreqVector::indexOf(BSTR axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
int32_t result;
LONG cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(int32_t)this->__object->indexOf(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

//inherited methods

//destructors
void CAnalyzer::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CAnalyzer::tokenStream(BSTR axarg1, IReader* axarg2, ITokenStream** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 lucene::util::Reader* arg2=0;
lucene::analysis::TokenStream* result;
CTokenStream* cret;
 arg1 = (wchar_t *)axarg1; 
 
 arg2 = ((CReader*)axarg2)->__object;

{
  try {
  result=(lucene::analysis::TokenStream*)this->__object->tokenStream(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTokenStream>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CStringReader::Initialise(BSTR axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 arg1 = (wchar_t *)axarg1; 
{    try {      arg1= STRDUP_WtoW(arg1);
      this->__object = new lucene::util::StringReader(arg1);
     }COM_CATCHALL;
    }
return S_OK;
}


//destructors
void CStringReader::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CStringReader::UpCast(IReader** ret){
  CReader* cret = new CComObject<CReader>; 
  cret->setObject((lucene::util::Reader*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CStringReader::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

//inherited methods

//destructors
void CSearchable::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CSearchable::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CSearchable::docFreq(ITerm* axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
int32_t result;
LONG cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(int32_t)this->__object->docFreq(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CSearchable::maxDoc(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->maxDoc();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CSearchable::doc(LONG axarg1, IDocument** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
lucene::document::Document* result;
CDocument* cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(lucene::document::Document*)this->__object->doc(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDocument>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CSearchable::explain(IQuery* axarg1, LONG axarg2, IExplanation** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 int32_t arg2=0;
lucene::search::Explanation* result;
CExplanation* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 arg2 = (long)axarg2; 
{
  try {
  result=(lucene::search::Explanation*)this->__object->explain(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CExplanation>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

//inherited methods

//constructors
 HRESULT CExplanation::FinalConstruct(){
{
  try {
  __object=_CLNEW lucene::search::Explanation;
 
  }COM_CATCHALL;
 
}
 return S_OK;
 }

//destructors
void CExplanation::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CExplanation::getValue(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)this->__object->getValue();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CExplanation::setValue(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  this->__object->setValue(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CExplanation::getDescription(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->getDescription();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

STDMETHODIMP CExplanation::addDetail(IExplanation* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Explanation* arg1=0;
 
 arg1 = ((CExplanation*)axarg1)->__object;

{
  try {
  this->__object->addDetail(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CExplanation::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

STDMETHODIMP CExplanation::toHtml(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toHtml();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

//inherited methods

//destructors
void CSimilarity::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CSimilarity::lengthNorm(BSTR axarg1, LONG axarg2, float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 int32_t arg2=0;
float result;
float cret;
 arg1 = (wchar_t *)axarg1; 
 arg2 = (long)axarg2; 
{
  try {
  result=(float)this->__object->lengthNorm(arg1, arg2);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CSimilarity::queryNorm(float axarg1, float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
float result;
float cret;
 arg1 = (float)axarg1; 
{
  try {
  result=(float)this->__object->queryNorm(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CSimilarity::sloppyFreq(LONG axarg1, float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
float result;
float cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(float)this->__object->sloppyFreq(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CSimilarity::coord(LONG axarg1, LONG axarg2, float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 int32_t arg2=0;
float result;
float cret;
 arg1 = (long)axarg1; 
 arg2 = (long)axarg2; 
{
  try {
  result=(float)this->__object->coord(arg1, arg2);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

//inherited methods

//destructors
void CDirectory::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CDirectory::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CField::Initialise(BSTR axarg1, BSTR axarg2, VARIANT_BOOL axarg3, VARIANT_BOOL axarg4, VARIANT_BOOL axarg5, VARIANT_BOOL axarg6)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 wchar_t* arg2=0;
 bool arg3=0;
 bool arg4=0;
 bool arg5=0;
 bool arg6=0;
 arg1 = (wchar_t *)axarg1; 
 arg2 = (wchar_t *)axarg2; 
 arg3 = (axarg3==0?false:true); 
 arg4 = (axarg4==0?false:true); 
 arg5 = (axarg5==0?false:true); 
 arg6 = (axarg6==0?false:true); 
{
  try {
  this->__object = new lucene::document::Field(arg1, arg2, arg3, arg4, arg5, arg6);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CField::InitialiseWithReader(BSTR axarg1, IReader* axarg2, VARIANT_BOOL axarg3, VARIANT_BOOL axarg4, VARIANT_BOOL axarg5, VARIANT_BOOL axarg6)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 lucene::util::Reader* arg2=0;
 bool arg3=0;
 bool arg4=0;
 bool arg5=0;
 bool arg6=0;
 arg1 = (wchar_t *)axarg1; 
 
 arg2 = ((CReader*)axarg2)->__object;

 arg3 = (axarg3==0?false:true); 
 arg4 = (axarg4==0?false:true); 
 arg5 = (axarg5==0?false:true); 
 arg6 = (axarg6==0?false:true); 
{    try {     arg2->__cl_addref();
    this->__object = new lucene::document::Field(arg1, arg2, arg3, arg4, arg5, arg6);
     }COM_CATCHALL;
    }
return S_OK;
}


//destructors
void CField::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CField::name(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->name();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

STDMETHODIMP CField::stringValue(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->stringValue();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

STDMETHODIMP CField::readerValue(IReader** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::util::Reader* result;
CReader* cret;
{
  try {
  result=(lucene::util::Reader*)this->__object->readerValue();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CReader>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CField::isStored(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->isStored();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CField::isIndexed(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->isIndexed();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CField::isTokenized(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->isTokenized();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CField::isTermVectorStored(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->isTermVectorStored();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CField::getBoost(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)this->__object->getBoost();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CField::setBoost(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  this->__object->setBoost(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CField::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CIndexSearcher::Initialise(BSTR axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 char* arg1=0;
 arg1 = STRDUP_TtoA(axarg1); 
{
  try {
  this->__object = new lucene::search::IndexSearcher(arg1);
 
  }COM_CATCHALL;
 
} _CLDELETE_CaARRAY(arg1); 

return S_OK;
}

STDMETHODIMP CIndexSearcher::InitialiseWithDir(IDirectory* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::store::Directory* arg1=0;
 
 arg1 = ((CDirectory*)axarg1)->__object;

{
  try {
  this->__object = new lucene::search::IndexSearcher(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexSearcher::InitialiseWithReader(IIndexReader* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::index::IndexReader* arg1=0;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  this->__object = new lucene::search::IndexSearcher(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CIndexSearcher::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CIndexSearcher::UpCast(ISearcher** ret){
  CSearcher* cret = new CComObject<CSearcher>; 
  cret->setObject((lucene::search::Searcher*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CIndexSearcher::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexSearcher::docFreq(ITerm* axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
int32_t result;
LONG cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(int32_t)this->__object->docFreq(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexSearcher::doc(LONG axarg1, IDocument** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
lucene::document::Document* result;
CDocument* cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(lucene::document::Document*)this->__object->doc(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDocument>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CIndexSearcher::maxDoc(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->maxDoc();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexSearcher::getReader(IIndexReader** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::IndexReader* result;
CIndexReader* cret;
{
  try {
  result=(lucene::index::IndexReader*)this->__object->getReader();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CIndexReader>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CIndexSearcher::explain(IQuery* axarg1, LONG axarg2, IExplanation** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 int32_t arg2=0;
lucene::search::Explanation* result;
CExplanation* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 arg2 = (long)axarg2; 
{
  try {
  result=(lucene::search::Explanation*)this->__object->explain(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CExplanation>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

//inherited methods
STDMETHODIMP CIndexSearcher::search(IQuery* axarg1, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(lucene::search::Hits*)((lucene::search::Searcher*)this->__object)->search(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexSearcher::searchWithFilter(IQuery* axarg1, IFilter* axarg2, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 lucene::search::Filter* arg2=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 
 arg2 = ((CFilter*)axarg2)->__object;

{
  try {
  result=(lucene::search::Hits*)((lucene::search::Searcher*)this->__object)->search(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexSearcher::searchWithSort(IQuery* axarg1, ISort* axarg2, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 lucene::search::Sort* arg2=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 
 arg2 = ((CSort*)axarg2)->__object;

{
  try {
  result=(lucene::search::Hits*)((lucene::search::Searcher*)this->__object)->search(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexSearcher::searchWithFilterAndSort(IQuery* axarg1, IFilter* axarg2, ISort* axarg3, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 lucene::search::Filter* arg2=0;
 lucene::search::Sort* arg3=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 
 arg2 = ((CFilter*)axarg2)->__object;

 
 arg3 = ((CSort*)axarg3)->__object;

{
  try {
  result=(lucene::search::Hits*)((lucene::search::Searcher*)this->__object)->search(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexSearcher::setSimilarity(ISimilarity* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Similarity* arg1=0;
 
 arg1 = ((CSimilarity*)axarg1)->__object;

{
  try {
  ((lucene::search::Searcher*)this->__object)->setSimilarity(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexSearcher::getSimilarity(ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::search::Similarity* result;
CSimilarity* cret;
{
  try {
  result=(lucene::search::Similarity*)((lucene::search::Searcher*)this->__object)->getSimilarity();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}


//constructors
 HRESULT CDateField::FinalConstruct(){
{
  try {
  __object=_CLNEW lucene::document::DateField;
 
  }COM_CATCHALL;
 
}
 return S_OK;
 }

//destructors
void CDateField::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
//inherited methods

//constructors
STDMETHODIMP CSort::Initialise()
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
{
  try {
  this->__object = new lucene::search::Sort();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CSort::InitialiseWithField(BSTR axarg1, VARIANT_BOOL axarg2)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 bool arg2=0;
 arg1 = (wchar_t *)axarg1; 
 arg2 = (axarg2==0?false:true); 
{
  try {
  this->__object = new lucene::search::Sort(arg1, arg2);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CSort::InitialiseWithFields(SAFEARRAY* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 const wchar_t** arg1=0;
  
  HRESULT arg1_cres = COMArrayToCArray<const wchar_t *>::toArray(axarg1, &arg1);
  if ( arg1_cres != S_OK ) return arg1_cres;

{
  try {
  this->__object = new lucene::search::Sort(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CSort::InitialiseWithSortField(ISortField* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::search::SortField* arg1=0;
 
 arg1 = ((CSortField*)axarg1)->__object;

{    try {     arg1->__cl_addref();
    this->__object = new lucene::search::Sort(arg1);
     }COM_CATCHALL;
    }
return S_OK;
}

STDMETHODIMP CSort::InitialiseWithSortFields(SAFEARRAY* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::search::SortField** arg1=0;
  
  HRESULT arg1_cres = COMObjArrayToCArray<lucene::search::SortField *, CSortField>::toArray(axarg1, &arg1);
  if ( arg1_cres != S_OK ) return arg1_cres;

{    try{ int i=0;
      long arg1plen=0;
      while(arg1[arg1plen]!=NULL) arg1plen++;
       lucene::search::SortField** arg1argp = new lucene::search::SortField*[arg1plen+1];
      for ( int i=0;
 i<arg1plen;
 i++ )arg1argp[i]=(arg1[i]->__cl_addref()>=0?arg1[i]:arg1[i]);
      arg1argp[arg1plen]=NULL;
  arg1=arg1argp;
      this->__object = new lucene::search::Sort(arg1);
     }COM_CATCHALL;
    }
return S_OK;
}


//destructors
void CSort::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CSort::setSortToField(BSTR axarg1, VARIANT_BOOL axarg2)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 bool arg2=0;
 arg1 = (wchar_t *)axarg1; 
 arg2 = (axarg2==0?false:true); 
{
  try {
  this->__object->setSort(arg1, arg2);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CSort::setSortToFields(SAFEARRAY* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 const wchar_t** arg1=0;
  
  HRESULT arg1_cres = COMArrayToCArray<const wchar_t *>::toArray(axarg1, &arg1);
  if ( arg1_cres != S_OK ) return arg1_cres;

{
  try {
  this->__object->setSort(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CSort::setSortToSortField(ISortField* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::SortField* arg1=0;
 
 arg1 = ((CSortField*)axarg1)->__object;

{    try {     arg1->__cl_addref();
    this->__object->setSort(arg1);
     }COM_CATCHALL;
    }
return S_OK;
}

STDMETHODIMP CSort::setSortToSrotFields(SAFEARRAY* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::SortField** arg1=0;
  
  HRESULT arg1_cres = COMObjArrayToCArray<lucene::search::SortField *, CSortField>::toArray(axarg1, &arg1);
  if ( arg1_cres != S_OK ) return arg1_cres;

{    try{ int i=0;
      long arg1plen=0;
      while(arg1[arg1plen]!=NULL) arg1plen++;
       lucene::search::SortField** arg1argp = new lucene::search::SortField*[arg1plen+1];
      for ( int i=0;
 i<arg1plen;
 i++ )arg1argp[i]=(arg1[i]->__cl_addref()>=0?arg1[i]:arg1[i]);
      arg1argp[arg1plen]=NULL;
  arg1=arg1argp;
      this->__object->setSort(arg1);
     }COM_CATCHALL;
    }
return S_OK;
}

STDMETHODIMP CSort::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

//inherited methods

//destructors
void CFilter::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CFilter::bits(IIndexReader* axarg1, IBitSet** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::util::BitSet* result;
CBitSet* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::util::BitSet*)this->__object->bits(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CBitSet>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CFilter::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CStopAnalyzer::Initialise()
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
{
  try {
  this->__object = new lucene::analysis::StopAnalyzer();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CStopAnalyzer::InitialiseWithStopWords(SAFEARRAY* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t** arg1=0;
  
  HRESULT arg1_cres = COMArrayToCArray<wchar_t *>::toArray(axarg1, &arg1);
  if ( arg1_cres != S_OK ) return arg1_cres;

{
  try {
  this->__object = new lucene::analysis::StopAnalyzer(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CStopAnalyzer::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CStopAnalyzer::UpCast(IAnalyzer** ret){
  CAnalyzer* cret = new CComObject<CAnalyzer>; 
  cret->setObject((lucene::analysis::Analyzer*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CStopAnalyzer::tokenStream(BSTR axarg1, IReader* axarg2, ITokenStream** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 lucene::util::Reader* arg2=0;
lucene::analysis::TokenStream* result;
CTokenStream* cret;
 arg1 = (wchar_t *)axarg1; 
 
 arg2 = ((CReader*)axarg2)->__object;

{
  try {
  result=(lucene::analysis::TokenStream*)this->__object->tokenStream(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTokenStream>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

//inherited methods

//destructors
void CQuery::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CQuery::setBoost(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  this->__object->setBoost(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CQuery::getBoost(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)this->__object->getBoost();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CQuery::rewrite(IIndexReader* axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::search::Query*)this->__object->rewrite(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CQuery::getSimilarity(ISearcher* axarg1, ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Searcher* arg1=0;
lucene::search::Similarity* result;
CSimilarity* cret;
 
 arg1 = ((CSearcher*)axarg1)->__object;

{
  try {
  result=(lucene::search::Similarity*)this->__object->getSimilarity(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CQuery::toString_ex(BSTR axarg1, BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t* result;
BSTR cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t*)this->__object->toString(arg1);
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

STDMETHODIMP CQuery::equals(IQuery* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CQuery::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

//inherited methods

//destructors
void CIndexReader::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CIndexReader::commit()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->commit();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexReader::undeleteAll()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->undeleteAll();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexReader::getFieldNames(SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t** result;
SAFEARRAY* cret;
{
  try {
  result=(wchar_t**)this->__object->getFieldNames();
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CIndexReader::getFieldNames_ex(VARIANT_BOOL axarg1, SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 bool arg1=0;
wchar_t** result;
SAFEARRAY* cret;
 arg1 = (axarg1==0?false:true); 
{
  try {
  result=(wchar_t**)this->__object->getFieldNames(arg1);
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CIndexReader::getIndexedFieldNames(VARIANT_BOOL axarg1, SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 bool arg1=0;
wchar_t** result;
SAFEARRAY* cret;
 arg1 = (axarg1==0?false:true); 
{
  try {
  result=(wchar_t**)this->__object->getIndexedFieldNames(arg1);
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CIndexReader::norms(BSTR axarg1, SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
uint8_t* result;
SAFEARRAY* cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(uint8_t*)this->__object->norms(arg1);
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CIndexReader::setNormFloat(LONG axarg1, BSTR axarg2, float axarg3)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 wchar_t* arg2=0;
 float arg3=0;
 arg1 = (long)axarg1; 
 arg2 = (wchar_t *)axarg2; 
 arg3 = (float)axarg3; 
{
  try {
  this->__object->setNorm(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexReader::setNormByte(LONG axarg1, BSTR axarg2, BYTE axarg3)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 wchar_t* arg2=0;
 uint8_t arg3=0;
 arg1 = (long)axarg1; 
 arg2 = (wchar_t *)axarg2; 
 arg3 = (unsigned char)axarg3; 
{
  try {
  this->__object->setNorm(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexReader::getTermFreqVectors(LONG axarg1, SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
lucene::index::TermFreqVector** result;
SAFEARRAY* cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(lucene::index::TermFreqVector**)this->__object->getTermFreqVectors(arg1);
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CIndexReader::getTermFreqVector(LONG axarg1, BSTR axarg2, ITermFreqVector** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 wchar_t* arg2=0;
lucene::index::TermFreqVector* result;
CTermFreqVector* cret;
 arg1 = (long)axarg1; 
 arg2 = (wchar_t *)axarg2; 
{
  try {
  result=(lucene::index::TermFreqVector*)this->__object->getTermFreqVector(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermFreqVector>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexReader::numDocs(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->numDocs();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexReader::maxDoc(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->maxDoc();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexReader::document(LONG axarg1, IDocument** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
lucene::document::Document* result;
CDocument* cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(lucene::document::Document*)this->__object->document(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDocument>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CIndexReader::isDeleted(LONG axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
bool result;
VARIANT_BOOL cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(bool)this->__object->isDeleted(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CIndexReader::hasDeletions(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->hasDeletions();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CIndexReader::termsAll(ITermEnum** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::TermEnum* result;
CTermEnum* cret;
{
  try {
  result=(lucene::index::TermEnum*)this->__object->terms();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermEnum>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexReader::terms(ITerm* axarg1, ITermEnum** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
lucene::index::TermEnum* result;
CTermEnum* cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(lucene::index::TermEnum*)this->__object->terms(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermEnum>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexReader::docFreq(ITerm* axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
int32_t result;
LONG cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(int32_t)this->__object->docFreq(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexReader::termPositionsAll(ITermPositions** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::TermPositions* result;
CTermPositions* cret;
{
  try {
  result=(lucene::index::TermPositions*)this->__object->termPositions();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermPositions>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexReader::termPositions(ITerm* axarg1, ITermPositions** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
lucene::index::TermPositions* result;
CTermPositions* cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(lucene::index::TermPositions*)this->__object->termPositions(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermPositions>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexReader::termDocsAll(ITermDocs** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::TermDocs* result;
CTermDocs* cret;
{
  try {
  result=(lucene::index::TermDocs*)this->__object->termDocs();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermDocs>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexReader::termDocsContaining(ITerm* axarg1, ITermDocs** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
lucene::index::TermDocs* result;
CTermDocs* cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(lucene::index::TermDocs*)this->__object->termDocs(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermDocs>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CIndexReader::deleteDoc(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->deleteDoc(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexReader::deleteTerm(ITerm* axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
int32_t result;
LONG cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(int32_t)this->__object->deleteTerm(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexReader::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexReader::getDirectory(IDirectory** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::store::Directory* result;
CDirectory* cret;
{
  try {
  result=(lucene::store::Directory*)this->__object->getDirectory();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDirectory>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

//inherited methods

//destructors
void CTermPositions::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CTermPositions::UpCast(ITermDocs** ret){
  CTermDocs* cret = new CComObject<CTermDocs>; 
  cret->setObject((lucene::index::TermDocs*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CTermPositions::nextPosition(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->nextPosition();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

//inherited methods
STDMETHODIMP CTermPositions::seekTerm(ITerm* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  ((lucene::index::TermDocs*)this->__object)->seek(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTermPositions::seekTermEnum(ITermEnum* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::TermEnum* arg1=0;
 
 arg1 = ((CTermEnum*)axarg1)->__object;

{
  try {
  ((lucene::index::TermDocs*)this->__object)->seek(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTermPositions::doc(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)((lucene::index::TermDocs*)this->__object)->doc();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTermPositions::freq(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)((lucene::index::TermDocs*)this->__object)->freq();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTermPositions::next(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)((lucene::index::TermDocs*)this->__object)->next();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CTermPositions::skipTo(LONG axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
bool result;
VARIANT_BOOL cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(bool)((lucene::index::TermDocs*)this->__object)->skipTo(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CTermPositions::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  ((lucene::index::TermDocs*)this->__object)->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//constructors
STDMETHODIMP CIndexWriter::Initialise(BSTR axarg1, IAnalyzer* axarg2, VARIANT_BOOL axarg3)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 char* arg1=0;
 lucene::analysis::Analyzer* arg2=0;
 bool arg3=0;
 arg1 = STRDUP_TtoA(axarg1); 
 
 arg2 = ((CAnalyzer*)axarg2)->__object;

 arg3 = (axarg3==0?false:true); 
{
  try {
  this->__object = new lucene::index::IndexWriter(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
} _CLDELETE_CaARRAY(arg1); 

return S_OK;
}

STDMETHODIMP CIndexWriter::InitialiseWithDir(IDirectory* axarg1, IAnalyzer* axarg2, VARIANT_BOOL axarg3)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::store::Directory* arg1=0;
 lucene::analysis::Analyzer* arg2=0;
 bool arg3=0;
 
 arg1 = ((CDirectory*)axarg1)->__object;

 
 arg2 = ((CAnalyzer*)axarg2)->__object;

 arg3 = (axarg3==0?false:true); 
{
  try {
  this->__object = new lucene::index::IndexWriter(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CIndexWriter::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CIndexWriter::getMaxFieldLength(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getMaxFieldLength();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexWriter::setMaxFieldLength(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->setMaxFieldLength(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexWriter::getMergeFactor(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getMergeFactor();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexWriter::setMergeFactor(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->setMergeFactor(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexWriter::getMinMergeDocs(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getMinMergeDocs();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexWriter::setMinMergeDocs(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->setMinMergeDocs(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexWriter::getMaxMergeDocs(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getMaxMergeDocs();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexWriter::setMaxMergeDocs(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->setMaxMergeDocs(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexWriter::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexWriter::docCount(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->docCount();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CIndexWriter::addDocument(IDocument* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::document::Document* arg1=0;
 
 arg1 = ((CDocument*)axarg1)->__object;

{
  try {
  this->__object->addDocument(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexWriter::optimize()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->optimize();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexWriter::getDirectory(IDirectory** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::store::Directory* result;
CDirectory* cret;
{
  try {
  result=(lucene::store::Directory*)this->__object->getDirectory();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDirectory>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CIndexWriter::getUseCompoundFile(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->getUseCompoundFile();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CIndexWriter::setUseCompoundFile(VARIANT_BOOL axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 bool arg1=0;
 arg1 = (axarg1==0?false:true); 
{
  try {
  this->__object->setUseCompoundFile(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexWriter::setSimilarity(ISimilarity* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Similarity* arg1=0;
 
 arg1 = ((CSimilarity*)axarg1)->__object;

{
  try {
  this->__object->setSimilarity(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CIndexWriter::getSimilarity(ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::search::Similarity* result;
CSimilarity* cret;
{
  try {
  result=(lucene::search::Similarity*)this->__object->getSimilarity();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CIndexWriter::getAnalyzer(IAnalyzer** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::analysis::Analyzer* result;
CAnalyzer* cret;
{
  try {
  result=(lucene::analysis::Analyzer*)this->__object->getAnalyzer();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CAnalyzer>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CRAMDirectory::Initialise()
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
{
  try {
  this->__object = new lucene::store::RAMDirectory();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CRAMDirectory::InitialiseFromDir(IDirectory* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::store::Directory* arg1=0;
 
 arg1 = ((CDirectory*)axarg1)->__object;

{
  try {
  this->__object = new lucene::store::RAMDirectory(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CRAMDirectory::InitialiseFromPath(BSTR axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 char* arg1=0;
 arg1 = STRDUP_TtoA(axarg1); 
{
  try {
  this->__object = new lucene::store::RAMDirectory(arg1);
 
  }COM_CATCHALL;
 
} _CLDELETE_CaARRAY(arg1); 

return S_OK;
}


//destructors
void CRAMDirectory::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CRAMDirectory::UpCast(IDirectory** ret){
  CDirectory* cret = new CComObject<CDirectory>; 
  cret->setObject((lucene::store::Directory*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CRAMDirectory::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

//inherited methods

//constructors
 HRESULT CPhraseQuery::FinalConstruct(){
{
  try {
  __object=_CLNEW lucene::search::PhraseQuery;
 
  }COM_CATCHALL;
 
}
 return S_OK;
 }

//destructors
void CPhraseQuery::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CPhraseQuery::UpCast(IQuery** ret){
  CQuery* cret = new CComObject<CQuery>; 
  cret->setObject((lucene::search::Query*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CPhraseQuery::setSlop(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->setSlop(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CPhraseQuery::getSlop(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getSlop();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CPhraseQuery::add(ITerm* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  this->__object->add(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CPhraseQuery::addTo(ITerm* axarg1, LONG axarg2)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
 int32_t arg2=0;
 
 arg1 = ((CTerm*)axarg1)->__object;

 arg2 = (long)axarg2; 
{
  try {
  this->__object->add(arg1, arg2);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CPhraseQuery::toString_ex(BSTR axarg1, BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t* result;
BSTR cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t*)this->__object->toString(arg1);
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

STDMETHODIMP CPhraseQuery::equals(IQuery* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

//inherited methods
STDMETHODIMP CPhraseQuery::setBoost(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  ((lucene::search::Query*)this->__object)->setBoost(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CPhraseQuery::getBoost(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)((lucene::search::Query*)this->__object)->getBoost();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CPhraseQuery::rewrite(IIndexReader* axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::search::Query*)((lucene::search::Query*)this->__object)->rewrite(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CPhraseQuery::getSimilarity(ISearcher* axarg1, ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Searcher* arg1=0;
lucene::search::Similarity* result;
CSimilarity* cret;
 
 arg1 = ((CSearcher*)axarg1)->__object;

{
  try {
  result=(lucene::search::Similarity*)((lucene::search::Query*)this->__object)->getSimilarity(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CPhraseQuery::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)((lucene::search::Query*)this->__object)->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}


//constructors
STDMETHODIMP CTermQuery::Initialise(ITerm* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::index::Term* arg1=0;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  this->__object = new lucene::search::TermQuery(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CTermQuery::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CTermQuery::UpCast(IQuery** ret){
  CQuery* cret = new CComObject<CQuery>; 
  cret->setObject((lucene::search::Query*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CTermQuery::getTerm(ITerm** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::Term* result;
CTerm* cret;
{
  try {
  result=(lucene::index::Term*)this->__object->getTerm();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTerm>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CTermQuery::toString_ex(BSTR axarg1, BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t* result;
BSTR cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t*)this->__object->toString(arg1);
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

STDMETHODIMP CTermQuery::equals(IQuery* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

//inherited methods
STDMETHODIMP CTermQuery::setBoost(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  ((lucene::search::Query*)this->__object)->setBoost(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTermQuery::getBoost(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)((lucene::search::Query*)this->__object)->getBoost();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTermQuery::rewrite(IIndexReader* axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::search::Query*)((lucene::search::Query*)this->__object)->rewrite(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CTermQuery::getSimilarity(ISearcher* axarg1, ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Searcher* arg1=0;
lucene::search::Similarity* result;
CSimilarity* cret;
 
 arg1 = ((CSearcher*)axarg1)->__object;

{
  try {
  result=(lucene::search::Similarity*)((lucene::search::Query*)this->__object)->getSimilarity(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CTermQuery::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)((lucene::search::Query*)this->__object)->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}


//constructors
STDMETHODIMP CMultiSearcher::Initialise(SAFEARRAY* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::search::Searchable** arg1=0;
  
  HRESULT arg1_cres = COMObjArrayToCArray<lucene::search::Searchable *, CSearchable>::toArray(axarg1, &arg1);
  if ( arg1_cres != S_OK ) return arg1_cres;

{
  try {
  this->__object = new lucene::search::MultiSearcher(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CMultiSearcher::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CMultiSearcher::UpCast(ISearcher** ret){
  CSearcher* cret = new CComObject<CSearcher>; 
  cret->setObject((lucene::search::Searcher*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CMultiSearcher::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CMultiSearcher::docFreq(ITerm* axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
int32_t result;
LONG cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(int32_t)this->__object->docFreq(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiSearcher::doc(LONG axarg1, IDocument** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
lucene::document::Document* result;
CDocument* cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(lucene::document::Document*)this->__object->doc(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDocument>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CMultiSearcher::searcherIndex(LONG axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
int32_t result;
LONG cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(int32_t)this->__object->searcherIndex(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiSearcher::subSearcher(LONG axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
int32_t result;
LONG cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(int32_t)this->__object->subSearcher(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiSearcher::subDoc(LONG axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
int32_t result;
LONG cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(int32_t)this->__object->subDoc(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiSearcher::maxDoc(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->maxDoc();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiSearcher::explain(IQuery* axarg1, LONG axarg2, IExplanation** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 int32_t arg2=0;
lucene::search::Explanation* result;
CExplanation* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 arg2 = (long)axarg2; 
{
  try {
  result=(lucene::search::Explanation*)this->__object->explain(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CExplanation>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

//inherited methods
STDMETHODIMP CMultiSearcher::search(IQuery* axarg1, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(lucene::search::Hits*)((lucene::search::Searcher*)this->__object)->search(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiSearcher::searchWithFilter(IQuery* axarg1, IFilter* axarg2, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 lucene::search::Filter* arg2=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 
 arg2 = ((CFilter*)axarg2)->__object;

{
  try {
  result=(lucene::search::Hits*)((lucene::search::Searcher*)this->__object)->search(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiSearcher::searchWithSort(IQuery* axarg1, ISort* axarg2, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 lucene::search::Sort* arg2=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 
 arg2 = ((CSort*)axarg2)->__object;

{
  try {
  result=(lucene::search::Hits*)((lucene::search::Searcher*)this->__object)->search(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiSearcher::searchWithFilterAndSort(IQuery* axarg1, IFilter* axarg2, ISort* axarg3, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 lucene::search::Filter* arg2=0;
 lucene::search::Sort* arg3=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 
 arg2 = ((CFilter*)axarg2)->__object;

 
 arg3 = ((CSort*)axarg3)->__object;

{
  try {
  result=(lucene::search::Hits*)((lucene::search::Searcher*)this->__object)->search(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiSearcher::setSimilarity(ISimilarity* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Similarity* arg1=0;
 
 arg1 = ((CSimilarity*)axarg1)->__object;

{
  try {
  ((lucene::search::Searcher*)this->__object)->setSimilarity(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CMultiSearcher::getSimilarity(ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::search::Similarity* result;
CSimilarity* cret;
{
  try {
  result=(lucene::search::Similarity*)((lucene::search::Searcher*)this->__object)->getSimilarity();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}


//constructors
STDMETHODIMP CToken::Initialise(BSTR axarg1, LONG axarg2, LONG axarg3, BSTR axarg4)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 int32_t arg2=0;
 int32_t arg3=0;
 wchar_t* arg4=0;
 arg1 = (wchar_t *)axarg1; 
 arg2 = (long)axarg2; 
 arg3 = (long)axarg3; 
 arg4 = (wchar_t *)axarg4; 
{
  try {
  this->__object = new lucene::analysis::Token(arg1, arg2, arg3, arg4);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CToken::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CToken::setPositionIncrement(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->setPositionIncrement(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CToken::getPositionIncrement(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getPositionIncrement();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CToken::termText(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->termText();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

STDMETHODIMP CToken::startOffset(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->startOffset();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CToken::endOffset(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->endOffset();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CToken::type(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->type();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CRangeQuery::Initialise(ITerm* axarg1, ITerm* axarg2, VARIANT_BOOL axarg3)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::index::Term* arg1=0;
 lucene::index::Term* arg2=0;
 bool arg3=0;
 
 arg1 = ((CTerm*)axarg1)->__object;

 
 arg2 = ((CTerm*)axarg2)->__object;

 arg3 = (axarg3==0?false:true); 
{
  try {
  this->__object = new lucene::search::RangeQuery(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CRangeQuery::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CRangeQuery::UpCast(IQuery** ret){
  CQuery* cret = new CComObject<CQuery>; 
  cret->setObject((lucene::search::Query*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CRangeQuery::rewrite(IIndexReader* axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::search::Query*)this->__object->rewrite(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CRangeQuery::toString_ex(BSTR axarg1, BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t* result;
BSTR cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t*)this->__object->toString(arg1);
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

STDMETHODIMP CRangeQuery::equals(IQuery* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CRangeQuery::getLowerTerm(ITerm** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::Term* result;
CTerm* cret;
{
  try {
  result=(lucene::index::Term*)this->__object->getLowerTerm();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTerm>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CRangeQuery::getUpperTerm(ITerm** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::Term* result;
CTerm* cret;
{
  try {
  result=(lucene::index::Term*)this->__object->getUpperTerm();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTerm>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CRangeQuery::isInclusive(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->isInclusive();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CRangeQuery::getField(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->getField();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

//inherited methods
STDMETHODIMP CRangeQuery::setBoost(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  ((lucene::search::Query*)this->__object)->setBoost(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CRangeQuery::getBoost(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)((lucene::search::Query*)this->__object)->getBoost();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CRangeQuery::getSimilarity(ISearcher* axarg1, ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Searcher* arg1=0;
lucene::search::Similarity* result;
CSimilarity* cret;
 
 arg1 = ((CSearcher*)axarg1)->__object;

{
  try {
  result=(lucene::search::Similarity*)((lucene::search::Query*)this->__object)->getSimilarity(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CRangeQuery::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)((lucene::search::Query*)this->__object)->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}


//destructors
void CTokenStream::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CTokenStream::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTokenStream::next(IToken** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::analysis::Token* result;
CToken* cret;
{
  try {
  result=(lucene::analysis::Token*)this->__object->next();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CToken>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CMultiReader::Initialise(SAFEARRAY* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::index::IndexReader** arg1=0;
  
  HRESULT arg1_cres = COMObjArrayToCArray<lucene::index::IndexReader *, CIndexReader>::toArray(axarg1, &arg1);
  if ( arg1_cres != S_OK ) return arg1_cres;

{
  try {
  this->__object = new lucene::index::MultiReader(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CMultiReader::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CMultiReader::UpCast(IIndexReader** ret){
  CIndexReader* cret = new CComObject<CIndexReader>; 
  cret->setObject((lucene::index::IndexReader*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CMultiReader::getTermFreqVectors(LONG axarg1, SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
lucene::index::TermFreqVector** result;
SAFEARRAY* cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(lucene::index::TermFreqVector**)this->__object->getTermFreqVectors(arg1);
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CMultiReader::getTermFreqVector(LONG axarg1, BSTR axarg2, ITermFreqVector** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 wchar_t* arg2=0;
lucene::index::TermFreqVector* result;
CTermFreqVector* cret;
 arg1 = (long)axarg1; 
 arg2 = (wchar_t *)axarg2; 
{
  try {
  result=(lucene::index::TermFreqVector*)this->__object->getTermFreqVector(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermFreqVector>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiReader::numDocs(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->numDocs();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiReader::maxDoc(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->maxDoc();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiReader::document(LONG axarg1, IDocument** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
lucene::document::Document* result;
CDocument* cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(lucene::document::Document*)this->__object->document(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDocument>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CMultiReader::isDeleted(LONG axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
bool result;
VARIANT_BOOL cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(bool)this->__object->isDeleted(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CMultiReader::hasDeletions(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->hasDeletions();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CMultiReader::norms(BSTR axarg1, SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
uint8_t* result;
SAFEARRAY* cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(uint8_t*)this->__object->norms(arg1);
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CMultiReader::termsAll(ITermEnum** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::TermEnum* result;
CTermEnum* cret;
{
  try {
  result=(lucene::index::TermEnum*)this->__object->terms();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermEnum>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiReader::terms(ITerm* axarg1, ITermEnum** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
lucene::index::TermEnum* result;
CTermEnum* cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(lucene::index::TermEnum*)this->__object->terms(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermEnum>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiReader::docFreq(ITerm* axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
int32_t result;
LONG cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(int32_t)this->__object->docFreq(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiReader::termDocsAll(ITermDocs** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::TermDocs* result;
CTermDocs* cret;
{
  try {
  result=(lucene::index::TermDocs*)this->__object->termDocs();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermDocs>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiReader::termPositionsAll(ITermPositions** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::TermPositions* result;
CTermPositions* cret;
{
  try {
  result=(lucene::index::TermPositions*)this->__object->termPositions();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermPositions>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiReader::getFieldNames(SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t** result;
SAFEARRAY* cret;
{
  try {
  result=(wchar_t**)this->__object->getFieldNames();
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CMultiReader::getFieldNames_ex(VARIANT_BOOL axarg1, SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 bool arg1=0;
wchar_t** result;
SAFEARRAY* cret;
 arg1 = (axarg1==0?false:true); 
{
  try {
  result=(wchar_t**)this->__object->getFieldNames(arg1);
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

STDMETHODIMP CMultiReader::getIndexedFieldNames(VARIANT_BOOL axarg1, SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 bool arg1=0;
wchar_t** result;
SAFEARRAY* cret;
 arg1 = (axarg1==0?false:true); 
{
  try {
  result=(wchar_t**)this->__object->getIndexedFieldNames(arg1);
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

//inherited methods
STDMETHODIMP CMultiReader::commit()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  ((lucene::index::IndexReader*)this->__object)->commit();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CMultiReader::undeleteAll()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  ((lucene::index::IndexReader*)this->__object)->undeleteAll();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CMultiReader::setNormFloat(LONG axarg1, BSTR axarg2, float axarg3)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 wchar_t* arg2=0;
 float arg3=0;
 arg1 = (long)axarg1; 
 arg2 = (wchar_t *)axarg2; 
 arg3 = (float)axarg3; 
{
  try {
  ((lucene::index::IndexReader*)this->__object)->setNorm(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CMultiReader::setNormByte(LONG axarg1, BSTR axarg2, BYTE axarg3)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 wchar_t* arg2=0;
 uint8_t arg3=0;
 arg1 = (long)axarg1; 
 arg2 = (wchar_t *)axarg2; 
 arg3 = (unsigned char)axarg3; 
{
  try {
  ((lucene::index::IndexReader*)this->__object)->setNorm(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CMultiReader::termPositions(ITerm* axarg1, ITermPositions** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
lucene::index::TermPositions* result;
CTermPositions* cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(lucene::index::TermPositions*)((lucene::index::IndexReader*)this->__object)->termPositions(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermPositions>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiReader::termDocsContaining(ITerm* axarg1, ITermDocs** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
lucene::index::TermDocs* result;
CTermDocs* cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(lucene::index::TermDocs*)((lucene::index::IndexReader*)this->__object)->termDocs(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTermDocs>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CMultiReader::deleteDoc(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  ((lucene::index::IndexReader*)this->__object)->deleteDoc(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CMultiReader::deleteTerm(ITerm* axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
int32_t result;
LONG cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(int32_t)((lucene::index::IndexReader*)this->__object)->deleteTerm(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiReader::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  ((lucene::index::IndexReader*)this->__object)->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CMultiReader::getDirectory(IDirectory** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::store::Directory* result;
CDirectory* cret;
{
  try {
  result=(lucene::store::Directory*)((lucene::index::IndexReader*)this->__object)->getDirectory();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDirectory>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}


//constructors
STDMETHODIMP CStandardAnalyzer::Initialise()
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
{
  try {
  this->__object = new lucene::analysis::standard::StandardAnalyzer();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CStandardAnalyzer::InitialiseWithStopWords(SAFEARRAY* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t** arg1=0;
  
  HRESULT arg1_cres = COMArrayToCArray<wchar_t *>::toArray(axarg1, &arg1);
  if ( arg1_cres != S_OK ) return arg1_cres;

{
  try {
  this->__object = new lucene::analysis::standard::StandardAnalyzer(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CStandardAnalyzer::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CStandardAnalyzer::UpCast(IAnalyzer** ret){
  CAnalyzer* cret = new CComObject<CAnalyzer>; 
  cret->setObject((lucene::analysis::Analyzer*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CStandardAnalyzer::tokenStream(BSTR axarg1, IReader* axarg2, ITokenStream** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 lucene::util::Reader* arg2=0;
lucene::analysis::TokenStream* result;
CTokenStream* cret;
 arg1 = (wchar_t *)axarg1; 
 
 arg2 = ((CReader*)axarg2)->__object;

{
  try {
  result=(lucene::analysis::TokenStream*)this->__object->tokenStream(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTokenStream>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CWildcardQuery::Initialise(ITerm* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::index::Term* arg1=0;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  this->__object = new lucene::search::WildcardQuery(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CWildcardQuery::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CWildcardQuery::UpCast(IMultiTermQuery** ret){
  CMultiTermQuery* cret = new CComObject<CMultiTermQuery>; 
  cret->setObject((lucene::search::MultiTermQuery*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CWildcardQuery::equals(IQuery* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

//inherited methods
STDMETHODIMP CWildcardQuery::getTerm(ITerm** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::Term* result;
CTerm* cret;
{
  try {
  result=(lucene::index::Term*)((lucene::search::MultiTermQuery*)this->__object)->getTerm();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTerm>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CWildcardQuery::toString_ex(BSTR axarg1, BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t* result;
BSTR cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t*)((lucene::search::MultiTermQuery*)this->__object)->toString(arg1);
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

STDMETHODIMP CWildcardQuery::rewrite(IIndexReader* axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::search::Query*)((lucene::search::MultiTermQuery*)this->__object)->rewrite(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}


//constructors

//destructors
void CFSDirectory::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CFSDirectory::UpCast(IDirectory** ret){
  CDirectory* cret = new CComObject<CDirectory>; 
  cret->setObject((lucene::store::Directory*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CFSDirectory::getDirName(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
char* result;
BSTR cret;
{
  try {
  result=(char*)this->__object->getDirName();
 
  }COM_CATCHALL;
 
} 
 TCHAR* tmp_ret = STRDUP_AtoT(result);
  *ret = ::SysAllocString(tmp_ret); 
  _CLDELETE_CaARRAY(tmp_ret);


return S_OK;
}

STDMETHODIMP CFSDirectory::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CPrefixQuery::Initialise(ITerm* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::index::Term* arg1=0;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  this->__object = new lucene::search::PrefixQuery(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CPrefixQuery::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CPrefixQuery::UpCast(IQuery** ret){
  CQuery* cret = new CComObject<CQuery>; 
  cret->setObject((lucene::search::Query*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CPrefixQuery::getPrefix(ITerm** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::Term* result;
CTerm* cret;
{
  try {
  result=(lucene::index::Term*)this->__object->getPrefix();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTerm>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CPrefixQuery::rewrite(IIndexReader* axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::search::Query*)this->__object->rewrite(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CPrefixQuery::equals(IQuery* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CPrefixQuery::toString_ex(BSTR axarg1, BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t* result;
BSTR cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t*)this->__object->toString(arg1);
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

//inherited methods
STDMETHODIMP CPrefixQuery::setBoost(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  ((lucene::search::Query*)this->__object)->setBoost(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CPrefixQuery::getBoost(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)((lucene::search::Query*)this->__object)->getBoost();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CPrefixQuery::getSimilarity(ISearcher* axarg1, ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Searcher* arg1=0;
lucene::search::Similarity* result;
CSimilarity* cret;
 
 arg1 = ((CSearcher*)axarg1)->__object;

{
  try {
  result=(lucene::search::Similarity*)((lucene::search::Query*)this->__object)->getSimilarity(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CPrefixQuery::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)((lucene::search::Query*)this->__object)->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}


//destructors
void CReader::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CReader::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

//inherited methods

//destructors
void CTermDocs::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CTermDocs::seekTerm(ITerm* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  this->__object->seek(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTermDocs::seekTermEnum(ITermEnum* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::TermEnum* arg1=0;
 
 arg1 = ((CTermEnum*)axarg1)->__object;

{
  try {
  this->__object->seek(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTermDocs::doc(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->doc();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTermDocs::freq(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->freq();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTermDocs::next(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->next();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CTermDocs::skipTo(LONG axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
bool result;
VARIANT_BOOL cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(bool)this->__object->skipTo(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CTermDocs::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

//inherited methods

//destructors
void CTermEnum::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CTermEnum::next(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->next();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CTermEnum::term(ITerm** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::Term* result;
CTerm* cret;
{
  try {
  result=(lucene::index::Term*)this->__object->term();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTerm>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CTermEnum::docFreq(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->docFreq();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTermEnum::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTermEnum::skipTo(ITerm* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->skipTo(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CBitSet::Initialise(LONG axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object = new lucene::util::BitSet(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CBitSet::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CBitSet::get(LONG axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
bool result;
VARIANT_BOOL cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(bool)this->__object->get(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CBitSet::set(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->set(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CBitSet::size(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->size();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CFileReader::InitialiseWithEncoding(BSTR axarg1, BSTR axarg2)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 char* arg1=0;
 char* arg2=0;
 arg1 = STRDUP_TtoA(axarg1); 
 arg2 = STRDUP_TtoA(axarg2); 
{
  try {
  this->__object = new lucene::util::FileReader(arg1, arg2);
 
  }COM_CATCHALL;
 
} _CLDELETE_CaARRAY(arg1); 
 _CLDELETE_CaARRAY(arg2); 

return S_OK;
}

STDMETHODIMP CFileReader::Initialise(BSTR axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 char* arg1=0;
 arg1 = STRDUP_TtoA(axarg1); 
{
  try {
  this->__object = new lucene::util::FileReader(arg1);
 
  }COM_CATCHALL;
 
} _CLDELETE_CaARRAY(arg1); 

return S_OK;
}


//destructors
void CFileReader::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CFileReader::UpCast(IReader** ret){
  CReader* cret = new CComObject<CReader>; 
  cret->setObject((lucene::util::Reader*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CFileReader::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  this->__object->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

//inherited methods

//constructors
 HRESULT CWhitespaceAnalyzer::FinalConstruct(){
{
  try {
  __object=_CLNEW lucene::analysis::WhitespaceAnalyzer;
 
  }COM_CATCHALL;
 
}
 return S_OK;
 }

//destructors
void CWhitespaceAnalyzer::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CWhitespaceAnalyzer::UpCast(IAnalyzer** ret){
  CAnalyzer* cret = new CComObject<CAnalyzer>; 
  cret->setObject((lucene::analysis::Analyzer*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CWhitespaceAnalyzer::tokenStream(BSTR axarg1, IReader* axarg2, ITokenStream** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 lucene::util::Reader* arg2=0;
lucene::analysis::TokenStream* result;
CTokenStream* cret;
 arg1 = (wchar_t *)axarg1; 
 
 arg2 = ((CReader*)axarg2)->__object;

{
  try {
  result=(lucene::analysis::TokenStream*)this->__object->tokenStream(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTokenStream>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CSortField::Initialise(BSTR axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  this->__object = new lucene::search::SortField(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CSortField::Initialise_ex2(BSTR axarg1, LONG axarg2, VARIANT_BOOL axarg3)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 int32_t arg2=0;
 bool arg3=0;
 arg1 = (wchar_t *)axarg1; 
 arg2 = (long)axarg2; 
 arg3 = (axarg3==0?false:true); 
{
  try {
  this->__object = new lucene::search::SortField(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CSortField::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CSortField::getField(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->getField();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

STDMETHODIMP CSortField::getType(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getType();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CSortField::getReverse(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->getReverse();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CSortField::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CQueryParser::Initialise(BSTR axarg1, IAnalyzer* axarg2)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 wchar_t* arg1=0;
 lucene::analysis::Analyzer* arg2=0;
 arg1 = (wchar_t *)axarg1; 
 
 arg2 = ((CAnalyzer*)axarg2)->__object;

{
  try {
  this->__object = new lucene::queryParser::QueryParser(arg1, arg2);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CQueryParser::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CQueryParser::parseString(BSTR axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(lucene::search::Query*)this->__object->parse(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CQueryParser::parseReader(IReader* axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::util::Reader* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 
 arg1 = ((CReader*)axarg1)->__object;

{
  try {
  result=(lucene::search::Query*)this->__object->parse(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CQueryParser::setLowercaseWildcardTerms(VARIANT_BOOL axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 bool arg1=0;
 arg1 = (axarg1==0?false:true); 
{
  try {
  this->__object->setLowercaseWildcardTerms(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CQueryParser::gGetLowercaseWildcardTerms(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->gGetLowercaseWildcardTerms();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

//inherited methods

//constructors
 HRESULT CSimpleAnalyzer::FinalConstruct(){
{
  try {
  __object=_CLNEW lucene::analysis::SimpleAnalyzer;
 
  }COM_CATCHALL;
 
}
 return S_OK;
 }

//destructors
void CSimpleAnalyzer::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CSimpleAnalyzer::UpCast(IAnalyzer** ret){
  CAnalyzer* cret = new CComObject<CAnalyzer>; 
  cret->setObject((lucene::analysis::Analyzer*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CSimpleAnalyzer::tokenStream(BSTR axarg1, IReader* axarg2, ITokenStream** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 lucene::util::Reader* arg2=0;
lucene::analysis::TokenStream* result;
CTokenStream* cret;
 arg1 = (wchar_t *)axarg1; 
 
 arg2 = ((CReader*)axarg2)->__object;

{
  try {
  result=(lucene::analysis::TokenStream*)this->__object->tokenStream(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTokenStream>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

//inherited methods

//destructors
void CSearcher::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CSearcher::UpCast(ISearchable** ret){
  CSearchable* cret = new CComObject<CSearchable>; 
  cret->setObject((lucene::search::Searchable*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CSearcher::search(IQuery* axarg1, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(lucene::search::Hits*)this->__object->search(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CSearcher::searchWithFilter(IQuery* axarg1, IFilter* axarg2, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 lucene::search::Filter* arg2=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 
 arg2 = ((CFilter*)axarg2)->__object;

{
  try {
  result=(lucene::search::Hits*)this->__object->search(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CSearcher::searchWithSort(IQuery* axarg1, ISort* axarg2, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 lucene::search::Sort* arg2=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 
 arg2 = ((CSort*)axarg2)->__object;

{
  try {
  result=(lucene::search::Hits*)this->__object->search(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CSearcher::searchWithFilterAndSort(IQuery* axarg1, IFilter* axarg2, ISort* axarg3, IHits** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 lucene::search::Filter* arg2=0;
 lucene::search::Sort* arg3=0;
lucene::search::Hits* result;
CHits* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 
 arg2 = ((CFilter*)axarg2)->__object;

 
 arg3 = ((CSort*)axarg3)->__object;

{
  try {
  result=(lucene::search::Hits*)this->__object->search(arg1, arg2, arg3);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CHits>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CSearcher::setSimilarity(ISimilarity* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Similarity* arg1=0;
 
 arg1 = ((CSimilarity*)axarg1)->__object;

{
  try {
  this->__object->setSimilarity(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CSearcher::getSimilarity(ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::search::Similarity* result;
CSimilarity* cret;
{
  try {
  result=(lucene::search::Similarity*)this->__object->getSimilarity();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

//inherited methods
STDMETHODIMP CSearcher::close()
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
{
  try {
  ((lucene::search::Searchable*)this->__object)->close();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CSearcher::docFreq(ITerm* axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::Term* arg1=0;
int32_t result;
LONG cret;
 
 arg1 = ((CTerm*)axarg1)->__object;

{
  try {
  result=(int32_t)((lucene::search::Searchable*)this->__object)->docFreq(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CSearcher::maxDoc(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)((lucene::search::Searchable*)this->__object)->maxDoc();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CSearcher::doc(LONG axarg1, IDocument** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
lucene::document::Document* result;
CDocument* cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(lucene::document::Document*)((lucene::search::Searchable*)this->__object)->doc(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDocument>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CSearcher::explain(IQuery* axarg1, LONG axarg2, IExplanation** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
 int32_t arg2=0;
lucene::search::Explanation* result;
CExplanation* cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

 arg2 = (long)axarg2; 
{
  try {
  result=(lucene::search::Explanation*)((lucene::search::Searchable*)this->__object)->explain(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CExplanation>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}


//constructors

//destructors
void CHits::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CHits::length(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->length();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CHits::doc(LONG axarg1, IDocument** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
lucene::document::Document* result;
CDocument* cret;
 arg1 = (long)axarg1; 
{
  try {
  lucene::document::Document& _result_ref=this->__object->doc(arg1);
  result=(lucene::document::Document*)& _result_ref;
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDocument>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CHits::id(LONG axarg1, LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
int32_t result;
LONG cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(int32_t)this->__object->id(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CHits::score(LONG axarg1, float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
float result;
float cret;
 arg1 = (long)axarg1; 
{
  try {
  result=(float)this->__object->score(arg1);
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

//inherited methods

//constructors
 HRESULT CDocument::FinalConstruct(){
{
  try {
  __object=_CLNEW lucene::document::Document;
 
  }COM_CATCHALL;
 
}
 return S_OK;
 }

//destructors
void CDocument::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CDocument::add(IField* axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::document::Field* arg1=0;
 
 arg1 = ((CField*)axarg1)->__object;

{    try {     arg1->__cl_addref();
    this->__object->add(*arg1);
     }COM_CATCHALL;
    }
return S_OK;
}

STDMETHODIMP CDocument::getField(BSTR axarg1, IField** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
lucene::document::Field* result;
CField* cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(lucene::document::Field*)this->__object->getField(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CField>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CDocument::get(BSTR axarg1, BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t* result;
BSTR cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t*)this->__object->get(arg1);
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 

return S_OK;
}

STDMETHODIMP CDocument::fields(IDocumentFieldEnumeration** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::document::DocumentFieldEnumeration* result;
CDocumentFieldEnumeration* cret;
{
  try {
  result=(lucene::document::DocumentFieldEnumeration*)this->__object->fields();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CDocumentFieldEnumeration>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

STDMETHODIMP CDocument::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)this->__object->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

STDMETHODIMP CDocument::setBoost(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  this->__object->setBoost(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CDocument::getBoost(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)this->__object->getBoost();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CDocument::removeField(BSTR axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  this->__object->removeField(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CDocument::removeFields(BSTR axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  this->__object->removeFields(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CDocument::getValues(BSTR axarg1, SAFEARRAY** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t** result;
SAFEARRAY* cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t**)this->__object->getValues(arg1);
 
  }COM_CATCHALL;
 
}  
 


return S_OK;
}

//inherited methods

//constructors

//destructors
void CDocumentFieldEnumeration::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CDocumentFieldEnumeration::hasMoreElements(VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
bool result;
VARIANT_BOOL cret;
{
  try {
  result=(bool)this->__object->hasMoreElements();
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CDocumentFieldEnumeration::nextElement(IField** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::document::Field* result;
CField* cret;
{
  try {
  result=(lucene::document::Field*)this->__object->nextElement();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CField>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

//inherited methods

//constructors
STDMETHODIMP CPerFieldAnalyzerWrapper::Initialise(IAnalyzer* axarg1)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 lucene::analysis::Analyzer* arg1=0;
 
 arg1 = ((CAnalyzer*)axarg1)->__object;

{
  try {
  this->__object = new lucene::analysis::PerFieldAnalyzerWrapper(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CPerFieldAnalyzerWrapper::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CPerFieldAnalyzerWrapper::UpCast(IAnalyzer** ret){
  CAnalyzer* cret = new CComObject<CAnalyzer>; 
  cret->setObject((lucene::analysis::Analyzer*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CPerFieldAnalyzerWrapper::addAnalyzer(BSTR axarg1, IAnalyzer* axarg2)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 lucene::analysis::Analyzer* arg2=0;
 arg1 = (wchar_t *)axarg1; 
 
 arg2 = ((CAnalyzer*)axarg2)->__object;

{
  try {
  this->__object->addAnalyzer(arg1, arg2);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CPerFieldAnalyzerWrapper::tokenStream(BSTR axarg1, IReader* axarg2, ITokenStream** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
 lucene::util::Reader* arg2=0;
lucene::analysis::TokenStream* result;
CTokenStream* cret;
 arg1 = (wchar_t *)axarg1; 
 
 arg2 = ((CReader*)axarg2)->__object;

{
  try {
  result=(lucene::analysis::TokenStream*)this->__object->tokenStream(arg1, arg2);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTokenStream>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

//inherited methods

//destructors
void CMultiTermQuery::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//castors
 HRESULT CMultiTermQuery::UpCast(IQuery** ret){
  CQuery* cret = new CComObject<CQuery>; 
  cret->setObject((lucene::search::Query*)this->__object); 
  *ret=cret; cret->AddRef();
  cret->__object->__cl_addref();
 return S_OK;
 }

//methods
STDMETHODIMP CMultiTermQuery::getTerm(ITerm** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
lucene::index::Term* result;
CTerm* cret;
{
  try {
  result=(lucene::index::Term*)this->__object->getTerm();
 
  }COM_CATCHALL;
 
} cret = new CComObject<CTerm>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CMultiTermQuery::toString_ex(BSTR axarg1, BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 wchar_t* arg1=0;
wchar_t* result;
BSTR cret;
 arg1 = (wchar_t *)axarg1; 
{
  try {
  result=(wchar_t*)this->__object->toString(arg1);
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}

STDMETHODIMP CMultiTermQuery::rewrite(IIndexReader* axarg1, IQuery** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::IndexReader* arg1=0;
lucene::search::Query* result;
CQuery* cret;
 
 arg1 = ((CIndexReader*)axarg1)->__object;

{
  try {
  result=(lucene::search::Query*)this->__object->rewrite(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CQuery>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();

 cret->__object->__cl_decref();


return S_OK;
}

//inherited methods
STDMETHODIMP CMultiTermQuery::setBoost(float axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 float arg1=0;
 arg1 = (float)axarg1; 
{
  try {
  ((lucene::search::Query*)this->__object)->setBoost(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CMultiTermQuery::getBoost(float* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
float result;
float cret;
{
  try {
  result=(float)((lucene::search::Query*)this->__object)->getBoost();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CMultiTermQuery::getSimilarity(ISearcher* axarg1, ISimilarity** ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Searcher* arg1=0;
lucene::search::Similarity* result;
CSimilarity* cret;
 
 arg1 = ((CSearcher*)axarg1)->__object;

{
  try {
  result=(lucene::search::Similarity*)((lucene::search::Query*)this->__object)->getSimilarity(arg1);
 
  }COM_CATCHALL;
 
} cret = new CComObject<CSimilarity>; 
 cret->setObject(result); 
 *ret=cret;
 result->__cl_addref();
 cret->AddRef();


return S_OK;
}

STDMETHODIMP CMultiTermQuery::equals(IQuery* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::search::Query* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CQuery*)axarg1)->__object;

{
  try {
  result=(bool)((lucene::search::Query*)this->__object)->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

STDMETHODIMP CMultiTermQuery::toString(BSTR* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
wchar_t* result;
BSTR cret;
{
  try {
  result=(wchar_t*)((lucene::search::Query*)this->__object)->toString();
 
  }COM_CATCHALL;
 
} *ret = ::SysAllocString(result); 
 _CLDELETE_CARRAY(result);


return S_OK;
}


//constructors
STDMETHODIMP CTermVectorOffsetInfo::Initialise()
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
{
  try {
  this->__object = new lucene::index::TermVectorOffsetInfo();
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTermVectorOffsetInfo::Initialise__SWIG_1(LONG axarg1, LONG axarg2)
{
 if(__object!=NULL) return ::AtlReportError(GetObjectCLSID(), "Object already initialised");
 int32_t arg1=0;
 int32_t arg2=0;
 arg1 = (long)axarg1; 
 arg2 = (long)axarg2; 
{
  try {
  this->__object = new lucene::index::TermVectorOffsetInfo(arg1, arg2);
 
  }COM_CATCHALL;
 
}
return S_OK;
}


//destructors
void CTermVectorOffsetInfo::FinalRelease(){
if ( ownMemory ){ _CLDELETE(this->__object); }
}


//methods
STDMETHODIMP CTermVectorOffsetInfo::getEndOffset(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getEndOffset();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTermVectorOffsetInfo::setEndOffset(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->setEndOffset(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTermVectorOffsetInfo::getStartOffset(LONG* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
int32_t result;
LONG cret;
{
  try {
  result=(int32_t)this->__object->getStartOffset();
 
  }COM_CATCHALL;
 
} *ret = result; 

return S_OK;
}

STDMETHODIMP CTermVectorOffsetInfo::setStartOffset(LONG axarg1)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 int32_t arg1=0;
 arg1 = (long)axarg1; 
{
  try {
  this->__object->setStartOffset(arg1);
 
  }COM_CATCHALL;
 
}
return S_OK;
}

STDMETHODIMP CTermVectorOffsetInfo::equals(ITermVectorOffsetInfo* axarg1, VARIANT_BOOL* ret)
{
 if(__object==NULL) return ::AtlReportError(GetObjectCLSID(), "Object not initialised");
 lucene::index::TermVectorOffsetInfo* arg1=0;
bool result;
VARIANT_BOOL cret;
 
 arg1 = ((CTermVectorOffsetInfo*)axarg1)->__object;

{
  try {
  result=(bool)this->__object->equals(arg1);
 
  }COM_CATCHALL;
 
} *ret = (result?-1:0); 

return S_OK;
}

//inherited methods


