// This will be used to generate the XS MODULE line
%module{Search::Fzf::AlgoCpp};
// Enable default XS typemaps
%loadplugin{feature::default_xs_typemap};
%typemap{AV *}{simple};
%typemap{SV *}{simple};
%typemap{PerlIO *}{simple};
// Associate a perl class with a C++ class
%name{Search::Fzf::AlgoCpp} class AlgoCpp
{
// can be called in Perl as Search::Fzf::AlgoCpp->new( ... );
AlgoCpp(int tac, int caseInsensitive, int headerLines);
// Search::Fzf::AlgoCpp->newAlgoCpp( ... );
// %name can be used to assign methods a different name in Perl
// %name{newAlgoCpp} AlgoCpp(const char* str, int arg);
%name{newAlgoCpp} AlgoCpp(int tac, int caseInsensitive, int headerLines, int nth, char* delim, AV* filter);
// standard DESTROY method
~AlgoCpp();
// Will be available from Perl given that the types appear in the typemap
// int GetInt();
// const char* GetString ();
// void mainMethod();
// SetValue is polymorphic. We want separate methods in Perl
//%name{SetString} void SetValue( const char* arg = NULL );
//%name{SetInt} void SetValue( int arg );
%name{matchList} AV* matchList(const char* patt, int isSort, int caseInsensitive, int algo, int THRS);
//%name{renewArray} void renewArray(AV* perlArr);
%name{read} void read(AV* perlArr);
%name{asynRead} void asynRead(PerlIO* fileH);
%name{asynLock} void asynLock();
%name{asynUnLock} void asynUnLock();
%name{getReaderStatus} int getReaderStatus();
%name{sendExitSign} void sendExitSign() ;
%name{getStr} SV* getStr(int index);
%name{getCatArraySize} int getCatArraySize();
%name{getNullMatchList} AV* getNullMatchList();
%name{getMaxLength} int getMaxLength();
%name{getHeaderStr} AV* getHeaderStr();
%name{setMarkLabel} void setMarkLabel(int id);
%name{setAllMarkLabel} void setAllMarkLabel();
%name{unSetMarkLabel} void unSetMarkLabel(int id);
%name{unSetAllMarkLabel} void unSetAllMarkLabel();
%name{toggleMarkLabel} void toggleMarkLabel(int id);
%name{toggleAllMarkLabel} void toggleAllMarkLabel();
%name{getMarkedStr} AV* getMarkedStr();
%name{getMarkLabel} int getMarkLable(int id);
%name{getMarkedCount} int getMarkedCount();
%name{clearMatchResult} void clearMatchResult();
// Supply a C<CODE:> or C<CLEANUP:> block for the XS
// int Sum( int a, int b )
// %code{% RETVAL = a + b; %}
// %cleanup{% /* do something */ %};
};