source/QtUiTools: updated

source/QtUiTools: updated

Modified:
source/QtUiTools/QUiLoader.prg

/*

  Qt4xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 4

  Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>

*/

/*
  DO NOT EDIT THIS FILE - the content was created using a source code generator
*/

#include "hbclass.ch"

#ifndef QT4XHB_NO_REQUESTS
REQUEST QACTION
REQUEST QACTIONGROUP
REQUEST QDIR
REQUEST QLAYOUT
REQUEST QWIDGET
#endif

CLASS QUiLoader INHERIT QObject

   METHOD new
   METHOD delete
   METHOD addPluginPath
   METHOD availableLayouts
   METHOD availableWidgets
   METHOD clearPluginPaths
   METHOD createAction
   METHOD createActionGroup
   METHOD createLayout
   METHOD createWidget
   METHOD isLanguageChangeEnabled
   METHOD load
   METHOD pluginPaths
   METHOD setLanguageChangeEnabled
   METHOD setWorkingDirectory
   METHOD workingDirectory

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject() CLASS QUiLoader
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <QtUiTools/QUiLoader>

#include "qt4xhb_common.h"
#include "qt4xhb_macros.h"
#include "qt4xhb_utils.h"
#include "qt4xhb_events.h"
#include "qt4xhb_signals.h"

#include <QtCore/QStringList>
#include <QtCore/QDir>
#include <QtGui/QAction>
#include <QtGui/QLayout>

/*
QUiLoader ( QObject * parent = 0 )
*/
HB_FUNC_STATIC( QUILOADER_NEW )
{
  if( ISBETWEEN(0,1) && (ISQOBJECT(1)||ISNIL(1)) )
  {
    QUiLoader * obj = new QUiLoader( OPQOBJECT(1,0) );
    Qt4xHb::returnNewObject( obj, false );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

HB_FUNC_STATIC( QUILOADER_DELETE )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
    Qt4xHb::Events_disconnect_all_events( obj, true );
    Qt4xHb::Signals_disconnect_all_signals( obj, true );
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
void addPluginPath( const QString & path )
*/
HB_FUNC_STATIC( QUILOADER_ADDPLUGINPATH )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(1) && ISCHAR(1) )
    {
#endif
      obj->addPluginPath( PQSTRING(1) );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QStringList availableLayouts() const
*/
HB_FUNC_STATIC( QUILOADER_AVAILABLELAYOUTS )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      RQSTRINGLIST( obj->availableLayouts() );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
QStringList availableWidgets() const
*/
HB_FUNC_STATIC( QUILOADER_AVAILABLEWIDGETS )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      RQSTRINGLIST( obj->availableWidgets() );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
void clearPluginPaths()
*/
HB_FUNC_STATIC( QUILOADER_CLEARPLUGINPATHS )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      obj->clearPluginPaths();
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
virtual QAction * createAction( QObject * parent = 0, const QString & name = QString() )
*/
HB_FUNC_STATIC( QUILOADER_CREATEACTION )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(0,2) && (ISQOBJECT(1)||ISNIL(1)) && ISOPTCHAR(2) )
    {
#endif
      QAction * ptr = obj->createAction( OPQOBJECT(1,0), OPQSTRING(2,QString()) );
      Qt4xHb::createReturnQObjectClass( ptr, "QACTION" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
virtual QActionGroup * createActionGroup( QObject * parent = 0, const QString & name = QString() )
*/
HB_FUNC_STATIC( QUILOADER_CREATEACTIONGROUP )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(0,2) && (ISQOBJECT(1)||ISNIL(1)) && ISOPTCHAR(2) )
    {
#endif
      QActionGroup * ptr = obj->createActionGroup( OPQOBJECT(1,0), OPQSTRING(2,QString()) );
      Qt4xHb::createReturnQObjectClass( ptr, "QACTIONGROUP" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
virtual QLayout * createLayout( const QString & className, QObject * parent = 0, const QString & name = QString() )
*/
HB_FUNC_STATIC( QUILOADER_CREATELAYOUT )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(1,3) && ISCHAR(1) && (ISQOBJECT(2)||ISNIL(2)) && ISOPTCHAR(3) )
    {
#endif
      QLayout * ptr = obj->createLayout( PQSTRING(1), OPQOBJECT(2,0), OPQSTRING(3,QString()) );
      Qt4xHb::createReturnQObjectClass( ptr, "QLAYOUT" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
virtual QWidget * createWidget( const QString & className, QWidget * parent = 0, const QString & name = QString() )
*/
HB_FUNC_STATIC( QUILOADER_CREATEWIDGET )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(1,3) && ISCHAR(1) && (ISQWIDGET(2)||ISNIL(2)) && ISOPTCHAR(3) )
    {
#endif
      QWidget * ptr = obj->createWidget( PQSTRING(1), OPQWIDGET(2,0), OPQSTRING(3,QString()) );
      Qt4xHb::createReturnQWidgetClass( ptr, "QWIDGET" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
bool isLanguageChangeEnabled() const
*/
HB_FUNC_STATIC( QUILOADER_ISLANGUAGECHANGEENABLED )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      RBOOL( obj->isLanguageChangeEnabled() );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
QWidget * load( QIODevice * device, QWidget * parentWidget = 0 )
*/
HB_FUNC_STATIC( QUILOADER_LOAD )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(1,2) && ISQIODEVICE(1) && (ISQWIDGET(2)||ISNIL(2)) )
    {
#endif
      QWidget * ptr = obj->load( PQIODEVICE(1), OPQWIDGET(2,0) );
      Qt4xHb::createReturnQWidgetClass( ptr, "QWIDGET" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
QStringList pluginPaths() const
*/
HB_FUNC_STATIC( QUILOADER_PLUGINPATHS )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      RQSTRINGLIST( obj->pluginPaths() );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
void setLanguageChangeEnabled( bool enabled )
*/
HB_FUNC_STATIC( QUILOADER_SETLANGUAGECHANGEENABLED )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(1) && ISLOG(1) )
    {
#endif
      obj->setLanguageChangeEnabled( PBOOL(1) );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
void setWorkingDirectory( const QDir & dir )
*/
HB_FUNC_STATIC( QUILOADER_SETWORKINGDIRECTORY )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(1) && ISQDIR(1) )
    {
#endif
      obj->setWorkingDirectory( *PQDIR(1) );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QDir workingDirectory() const
*/
HB_FUNC_STATIC( QUILOADER_WORKINGDIRECTORY )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      QDir * ptr = new QDir( obj->workingDirectory() );
      Qt4xHb::createReturnClass( ptr, "QDIR", true );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

#pragma ENDDUMP

/*

  Qt4xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 4

  Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>

*/

/*
  DO NOT EDIT THIS FILE - the content was created using a source code generator
*/

#include "hbclass.ch"

#ifndef QT4XHB_NO_REQUESTS
REQUEST QACTION
REQUEST QACTIONGROUP
REQUEST QDIR
REQUEST QLAYOUT
REQUEST QWIDGET
#endif

CLASS QUiLoader INHERIT QObject

   METHOD new
   METHOD delete
   METHOD addPluginPath
   METHOD availableLayouts
   METHOD availableWidgets
   METHOD clearPluginPaths
   METHOD createAction
   METHOD createActionGroup
   METHOD createLayout
   METHOD createWidget
   METHOD isLanguageChangeEnabled
   METHOD load
   METHOD pluginPaths
   METHOD setLanguageChangeEnabled
   METHOD setWorkingDirectory
   METHOD workingDirectory

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject() CLASS QUiLoader
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <QtUiTools/QUiLoader>

#include "qt4xhb_common.h"
#include "qt4xhb_macros.h"
#include "qt4xhb_utils.h"
#include "qt4xhb_events.h"
#include "qt4xhb_signals.h"

#include <QtCore/QStringList>
#include <QtCore/QDir>
#include <QtGui/QAction>
#include <QtGui/QLayout>

/*
QUiLoader ( QObject * parent = 0 )
*/
HB_FUNC_STATIC( QUILOADER_NEW )
{
  if( ISBETWEEN(0,1) && (ISQOBJECT(1)||ISNIL(1)) )
  {
    QUiLoader * obj = new QUiLoader( OPQOBJECT(1,0) );
    Qt4xHb::returnNewObject( obj, false );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

HB_FUNC_STATIC( QUILOADER_DELETE )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
    Qt4xHb::Events_disconnect_all_events( obj, true );
    Qt4xHb::Signals_disconnect_all_signals( obj, true );
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
void addPluginPath( const QString & path )
*/
HB_FUNC_STATIC( QUILOADER_ADDPLUGINPATH )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(1) && ISCHAR(1) )
    {
#endif
      obj->addPluginPath( PQSTRING(1) );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QStringList availableLayouts() const
*/
HB_FUNC_STATIC( QUILOADER_AVAILABLELAYOUTS )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      RQSTRINGLIST( obj->availableLayouts() );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
QStringList availableWidgets() const
*/
HB_FUNC_STATIC( QUILOADER_AVAILABLEWIDGETS )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      RQSTRINGLIST( obj->availableWidgets() );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
void clearPluginPaths()
*/
HB_FUNC_STATIC( QUILOADER_CLEARPLUGINPATHS )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      obj->clearPluginPaths();
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
virtual QAction * createAction ( QObject * parent = 0, const QString & name = QString() )
*/
HB_FUNC_STATIC( QUILOADER_CREATEACTION )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(0,2) && (ISQOBJECT(1)||ISNIL(1)) && ISOPTCHAR(2) )
    {
#endif
      QAction * ptr = obj->createAction( OPQOBJECT(1,0), OPQSTRING(2,QString()) );
      Qt4xHb::createReturnQObjectClass( ptr, "QACTION" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
virtual QActionGroup * createActionGroup ( QObject * parent = 0, const QString & name = QString() )
*/
HB_FUNC_STATIC( QUILOADER_CREATEACTIONGROUP )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(0,2) && (ISQOBJECT(1)||ISNIL(1)) && ISOPTCHAR(2) )
    {
#endif
      QActionGroup * ptr = obj->createActionGroup( OPQOBJECT(1,0), OPQSTRING(2,QString()) );
      Qt4xHb::createReturnQObjectClass( ptr, "QACTIONGROUP" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
virtual QLayout * createLayout ( const QString & className, QObject * parent = 0, const QString & name = QString() )
*/
HB_FUNC_STATIC( QUILOADER_CREATELAYOUT )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(1,3) && ISCHAR(1) && (ISQOBJECT(2)||ISNIL(2)) && ISOPTCHAR(3) )
    {
#endif
      QLayout * ptr = obj->createLayout( PQSTRING(1), OPQOBJECT(2,0), OPQSTRING(3,QString()) );
      Qt4xHb::createReturnQObjectClass( ptr, "QLAYOUT" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
virtual QWidget * createWidget ( const QString & className, QWidget * parent = 0, const QString & name = QString() )
*/
HB_FUNC_STATIC( QUILOADER_CREATEWIDGET )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(1,3) && ISCHAR(1) && (ISQWIDGET(2)||ISNIL(2)) && ISOPTCHAR(3) )
    {
#endif
      QWidget * ptr = obj->createWidget( PQSTRING(1), OPQWIDGET(2,0), OPQSTRING(3,QString()) );
      Qt4xHb::createReturnQWidgetClass( ptr, "QWIDGET" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
bool isLanguageChangeEnabled() const
*/
HB_FUNC_STATIC( QUILOADER_ISLANGUAGECHANGEENABLED )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      RBOOL( obj->isLanguageChangeEnabled() );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
QWidget * load ( QIODevice * device, QWidget * parentWidget = 0 )
*/
HB_FUNC_STATIC( QUILOADER_LOAD )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISBETWEEN(1,2) && ISQIODEVICE(1) && (ISQWIDGET(2)||ISNIL(2)) )
    {
#endif
      QWidget * ptr = obj->load( PQIODEVICE(1), OPQWIDGET(2,0) );
      Qt4xHb::createReturnQWidgetClass( ptr, "QWIDGET" );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
QStringList pluginPaths() const
*/
HB_FUNC_STATIC( QUILOADER_PLUGINPATHS )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      RQSTRINGLIST( obj->pluginPaths() );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

/*
void setLanguageChangeEnabled( bool enabled )
*/
HB_FUNC_STATIC( QUILOADER_SETLANGUAGECHANGEENABLED )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(1) && ISLOG(1) )
    {
#endif
      obj->setLanguageChangeEnabled( PBOOL(1) );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
void setWorkingDirectory( const QDir & dir )
*/
HB_FUNC_STATIC( QUILOADER_SETWORKINGDIRECTORY )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(1) && ISQDIR(1) )
    {
#endif
      obj->setWorkingDirectory( *PQDIR(1) );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
}

/*
QDir workingDirectory() const
*/
HB_FUNC_STATIC( QUILOADER_WORKINGDIRECTORY )
{
  QUiLoader * obj = (QUiLoader *) Qt4xHb::itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
    {
#endif
      QDir * ptr = new QDir( obj->workingDirectory() );
      Qt4xHb::createReturnClass( ptr, "QDIR", true );
#ifndef QT4XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }
}

#pragma ENDDUMP


QtXml: module updated to use ISOPTCHAR

QtXml: module updated to use ISOPTCHAR

/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2012-2017 Marcos Antonio Gambeta <marcosgambeta@uol.com.br>

*/

#include "hbclass.ch"
#include "qt5xhb_clsid.ch"

CLASS QXmlParseException

   DATA pointer
   DATA class_id INIT Class_Id_QXmlParseException
   DATA class_flags INIT 0
   DATA self_destruction INIT .F.

   METHOD new1
   METHOD new2
   METHOD new
   METHOD delete
   METHOD columnNumber
   METHOD lineNumber
   METHOD message
   METHOD publicId
   METHOD systemId

   METHOD newFrom
   METHOD newFromObject
   METHOD newFromPointer
   METHOD selfDestruction
   METHOD setSelfDestruction

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QXmlParseException
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#include <QXmlParseException>
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_clsid.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#include <QXmlParseException>
#endif

/*
QXmlParseException ( const QString & name = QString(), int c = -1, int l = -1, const QString & p = QString(), const QString & s = QString() )
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEW1 )
{
  QString par1 = ISNIL(1)? QString() : QLatin1String( hb_parc(1) );
  int par2 = ISNIL(2)? -1 : hb_parni(2);
  int par3 = ISNIL(3)? -1 : hb_parni(3);
  QString par4 = ISNIL(4)? QString() : QLatin1String( hb_parc(4) );
  QString par5 = ISNIL(5)? QString() : QLatin1String( hb_parc(5) );
  QXmlParseException * o = new QXmlParseException ( par1, par2, par3, par4, par5 );
  _qt5xhb_storePointerAndFlag( o, true );
}

/*
QXmlParseException ( const QXmlParseException & other )
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEW2 )
{
  QXmlParseException * par1 = (QXmlParseException *) _qt5xhb_itemGetPtr(1);
  QXmlParseException * o = new QXmlParseException ( *par1 );
  _qt5xhb_storePointerAndFlag( o, true );
}

//[1]QXmlParseException ( const QString & name = QString(), int c = -1, int l = -1, const QString & p = QString(), const QString & s = QString() )
//[2]QXmlParseException ( const QXmlParseException & other )

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEW )
{
  if( ISBETWEEN(0,5) && ISOPTCHAR(1) && ISOPTNUM(2) && ISOPTNUM(3) && ISOPTCHAR(4) && ISOPTNUM(5) )
  {
    HB_FUNC_EXEC( QXMLPARSEEXCEPTION_NEW1 );
  }
  else if( ISNUMPAR(1) && ISQXMLPARSEEXCEPTION(1) )
  {
    HB_FUNC_EXEC( QXMLPARSEEXCEPTION_NEW2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_DELETE )
{
  QXmlParseException * obj = (QXmlParseException *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );
  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
int columnNumber () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_COLUMNNUMBER )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->columnNumber (  ) );
  }
}

/*
int lineNumber () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_LINENUMBER )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->lineNumber (  ) );
  }
}

/*
QString message () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_MESSAGE )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retc( (const char *) obj->message (  ).toLatin1().data() );
  }
}

/*
QString publicId () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_PUBLICID )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retc( (const char *) obj->publicId (  ).toLatin1().data() );
  }
}

/*
QString systemId () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_SYSTEMID )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retc( (const char *) obj->systemId (  ).toLatin1().data() );
  }
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEWFROM )
{
  PHB_ITEM self = hb_stackSelfItem();
  if( hb_pcount() == 1 && ISOBJECT(1) )
  {
    PHB_ITEM ptr = hb_itemPutPtr( NULL, (void *) hb_itemGetPtr( hb_objSendMsg( hb_param(1, HB_IT_OBJECT ), "POINTER", 0 ) ) );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
    PHB_ITEM des = hb_itemPutL( NULL, false );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  else if( hb_pcount() == 1 && ISPOINTER(1) )
  {
    PHB_ITEM ptr = hb_itemPutPtr( NULL, (void *) hb_itemGetPtr( hb_param(1, HB_IT_POINTER ) ) );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
    PHB_ITEM des = hb_itemPutL( NULL, false );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  hb_itemReturn( self );
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEWFROMOBJECT )
{
  HB_FUNC_EXEC( QXMLPARSEEXCEPTION_NEWFROM );
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEWFROMPOINTER )
{
  HB_FUNC_EXEC( QXMLPARSEEXCEPTION_NEWFROM );
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_SELFDESTRUCTION )
{
  hb_retl( (bool) hb_itemGetL( hb_objSendMsg( hb_stackSelfItem(), "SELF_DESTRUCTION", 0 ) ) );
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_SETSELFDESTRUCTION )
{
  PHB_ITEM self = hb_stackSelfItem();
  if( hb_pcount() == 1 && ISLOG(1) )
  {
    PHB_ITEM des = hb_itemPutL( NULL, hb_parl(1) );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  hb_itemReturn( self );
}

#pragma ENDDUMP

/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2012-2017 Marcos Antonio Gambeta <marcosgambeta@uol.com.br>

*/

#include "hbclass.ch"
#include "qt5xhb_clsid.ch"

CLASS QXmlParseException

   DATA pointer
   DATA class_id INIT Class_Id_QXmlParseException
   DATA class_flags INIT 0
   DATA self_destruction INIT .F.

   METHOD new1
   METHOD new2
   METHOD new
   METHOD delete
   METHOD columnNumber
   METHOD lineNumber
   METHOD message
   METHOD publicId
   METHOD systemId

   METHOD newFrom
   METHOD newFromObject
   METHOD newFromPointer
   METHOD selfDestruction
   METHOD setSelfDestruction

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QXmlParseException
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#include <QXmlParseException>
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_clsid.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#include <QXmlParseException>
#endif

/*
QXmlParseException ( const QString & name = QString(), int c = -1, int l = -1, const QString & p = QString(), const QString & s = QString() )
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEW1 )
{
  QString par1 = ISNIL(1)? QString() : QLatin1String( hb_parc(1) );
  int par2 = ISNIL(2)? -1 : hb_parni(2);
  int par3 = ISNIL(3)? -1 : hb_parni(3);
  QString par4 = ISNIL(4)? QString() : QLatin1String( hb_parc(4) );
  QString par5 = ISNIL(5)? QString() : QLatin1String( hb_parc(5) );
  QXmlParseException * o = new QXmlParseException ( par1, par2, par3, par4, par5 );
  _qt5xhb_storePointerAndFlag( o, true );
}

/*
QXmlParseException ( const QXmlParseException & other )
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEW2 )
{
  QXmlParseException * par1 = (QXmlParseException *) _qt5xhb_itemGetPtr(1);
  QXmlParseException * o = new QXmlParseException ( *par1 );
  _qt5xhb_storePointerAndFlag( o, true );
}

//[1]QXmlParseException ( const QString & name = QString(), int c = -1, int l = -1, const QString & p = QString(), const QString & s = QString() )
//[2]QXmlParseException ( const QXmlParseException & other )

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEW )
{
  if( ISBETWEEN(0,5) && (ISCHAR(1)||ISNIL(1)) && ISOPTNUM(2) && ISOPTNUM(3) && (ISCHAR(4)||ISNIL(4)) && ISOPTNUM(5) )
  {
    HB_FUNC_EXEC( QXMLPARSEEXCEPTION_NEW1 );
  }
  else if( ISNUMPAR(1) && ISQXMLPARSEEXCEPTION(1) )
  {
    HB_FUNC_EXEC( QXMLPARSEEXCEPTION_NEW2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_DELETE )
{
  QXmlParseException * obj = (QXmlParseException *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );
  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }
  hb_itemReturn( hb_stackSelfItem() );
}

/*
int columnNumber () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_COLUMNNUMBER )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->columnNumber (  ) );
  }
}

/*
int lineNumber () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_LINENUMBER )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->lineNumber (  ) );
  }
}

/*
QString message () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_MESSAGE )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retc( (const char *) obj->message (  ).toLatin1().data() );
  }
}

/*
QString publicId () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_PUBLICID )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retc( (const char *) obj->publicId (  ).toLatin1().data() );
  }
}

/*
QString systemId () const
*/
HB_FUNC_STATIC( QXMLPARSEEXCEPTION_SYSTEMID )
{
  QXmlParseException * obj = (QXmlParseException *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retc( (const char *) obj->systemId (  ).toLatin1().data() );
  }
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEWFROM )
{
  PHB_ITEM self = hb_stackSelfItem();
  if( hb_pcount() == 1 && ISOBJECT(1) )
  {
    PHB_ITEM ptr = hb_itemPutPtr( NULL, (void *) hb_itemGetPtr( hb_objSendMsg( hb_param(1, HB_IT_OBJECT ), "POINTER", 0 ) ) );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
    PHB_ITEM des = hb_itemPutL( NULL, false );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  else if( hb_pcount() == 1 && ISPOINTER(1) )
  {
    PHB_ITEM ptr = hb_itemPutPtr( NULL, (void *) hb_itemGetPtr( hb_param(1, HB_IT_POINTER ) ) );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
    PHB_ITEM des = hb_itemPutL( NULL, false );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  hb_itemReturn( self );
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEWFROMOBJECT )
{
  HB_FUNC_EXEC( QXMLPARSEEXCEPTION_NEWFROM );
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_NEWFROMPOINTER )
{
  HB_FUNC_EXEC( QXMLPARSEEXCEPTION_NEWFROM );
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_SELFDESTRUCTION )
{
  hb_retl( (bool) hb_itemGetL( hb_objSendMsg( hb_stackSelfItem(), "SELF_DESTRUCTION", 0 ) ) );
}

HB_FUNC_STATIC( QXMLPARSEEXCEPTION_SETSELFDESTRUCTION )
{
  PHB_ITEM self = hb_stackSelfItem();
  if( hb_pcount() == 1 && ISLOG(1) )
  {
    PHB_ITEM des = hb_itemPutL( NULL, hb_parl(1) );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  hb_itemReturn( self );
}

#pragma ENDDUMP


QtHelp: data for code generation updated

Modified:
codegen/QtHelp/QHelpEngineCore.prg

$header

#include "hbclass.ch"

#ifndef QT4XHB_NO_REQUESTS
REQUEST QVARIANT
REQUEST QBYTEARRAY
REQUEST QURL
#endif

CLASS QHelpEngineCore INHERIT QObject

   METHOD new
   METHOD delete
   METHOD addCustomFilter
   METHOD autoSaveFilter
   METHOD collectionFile
   METHOD copyCollectionFile
   METHOD currentFilter
   METHOD customFilters
   METHOD customValue
   METHOD documentationFileName
   METHOD error
   METHOD fileData
   METHOD files
   METHOD filterAttributes1
   METHOD filterAttributes2
   METHOD filterAttributes
   METHOD findFile
   METHOD registerDocumentation
   METHOD registeredDocumentations
   METHOD removeCustomFilter
   METHOD removeCustomValue
   METHOD setAutoSaveFilter
   METHOD setCollectionFile
   METHOD setCurrentFilter
   METHOD setCustomValue
   METHOD setupData
   METHOD unregisterDocumentation
   METHOD metaData
   METHOD namespaceName

   METHOD onCurrentFilterChanged
   METHOD onSetupFinished
   METHOD onSetupStarted
   METHOD onWarning

   DESTRUCTOR destroyObject

END CLASS

$destructor

#pragma BEGINDUMP

#include <QHelpEngineCore>

#include "qt4xhb_common.h"
#include "qt4xhb_macros.h"
#include "qt4xhb_utils.h"

#include <QStringList>

/*
QHelpEngineCore ( const QString & collectionFile, QObject * parent = 0 )
*/
$constructor=|new|const QString &,QObject *=0

$deleteMethod

/*
bool addCustomFilter ( const QString & filterName, const QStringList & attributes )
*/
$method=|bool|addCustomFilter|const QString &,const QStringList &

/*
bool autoSaveFilter () const
*/
$method=|bool|autoSaveFilter|

/*
QString collectionFile () const
*/
$method=|QString|collectionFile|

/*
bool copyCollectionFile ( const QString & fileName )
*/
$method=|bool|copyCollectionFile|const QString &

/*
QString currentFilter () const
*/
$method=|QString|currentFilter|

/*
QStringList customFilters () const
*/
$method=|QStringList|customFilters|

/*
QVariant customValue ( const QString & key, const QVariant & defaultValue = QVariant() ) const
*/
$method=|QVariant|customValue|const QString &,const QVariant &=QVariant()

/*
QString documentationFileName ( const QString & namespaceName )
*/
$method=|QString|documentationFileName|const QString &

/*
QString error () const
*/
$method=|QString|error|

/*
QByteArray fileData ( const QUrl & url ) const
*/
$method=|QByteArray|fileData|const QUrl &

/*
QList<QUrl> files ( const QString namespaceName, const QStringList & filterAttributes, const QString & extensionFilter = QString() )
*/
HB_FUNC_STATIC( QHELPENGINECORE_FILES )
{
  QHelpEngineCore * obj = (QHelpEngineCore *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );

  if( obj )
  {
    QList<QUrl> list = obj->files ( PQSTRING(1), PQSTRINGLIST(2), OPQSTRING(3,QString()) );
    PHB_DYNS pDynSym;
    #ifdef __XHARBOUR__
    pDynSym = hb_dynsymFind( "QURL" );
    #else
    pDynSym = hb_dynsymFindName( "QURL" );
    #endif
    PHB_ITEM pArray;
    pArray = hb_itemArrayNew(0);
    int i;
    for(i=0;i<list.count();i++)
    {
      if( pDynSym )
      {
        #ifdef __XHARBOUR__
        hb_vmPushSymbol( pDynSym->pSymbol );
        #else
        hb_vmPushDynSym( pDynSym );
        #endif
        hb_vmPushNil();
        hb_vmDo( 0 );
        PHB_ITEM pObject = hb_itemNew( NULL );
        hb_itemCopy( pObject, hb_stackReturnItem() );
        PHB_ITEM pItem = hb_itemNew( NULL );
        hb_itemPutPtr( pItem, (QUrl *) new QUrl ( list[i] ) );
        hb_objSendMsg( pObject, "_POINTER", 1, pItem );
        hb_itemRelease( pItem );
        PHB_ITEM pDestroy = hb_itemNew( NULL );
        hb_itemPutL( pDestroy, true );
        hb_objSendMsg( pObject, "_SELF_DESTRUCTION", 1, pDestroy );
        hb_itemRelease( pDestroy );
        hb_arrayAddForward( pArray, pObject );
        hb_itemRelease( pObject );
      }
    }
    hb_itemReturnRelease(pArray);
  }
}

/*
QStringList filterAttributes () const
*/
$method=|QStringList|filterAttributes,filterAttributes1|

/*
QStringList filterAttributes ( const QString & filterName ) const
*/
$method=|QStringList|filterAttributes,filterAttributes2|const QString &

//[1]QStringList filterAttributes () const
//[2]QStringList filterAttributes ( const QString & filterName ) const

HB_FUNC_STATIC( QHELPENGINECORE_FILTERATTRIBUTES )
{
  if( ISNUMPAR(0) )
  {
    HB_FUNC_EXEC( QHELPENGINECORE_FILTERATTRIBUTES1 );
  }
  else if( ISNUMPAR(1) && ISCHAR(1) )
  {
    HB_FUNC_EXEC( QHELPENGINECORE_FILTERATTRIBUTES2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
QUrl findFile ( const QUrl & url ) const
*/
$method=|QUrl|findFile|const QUrl &

/*
bool registerDocumentation ( const QString & documentationFileName )
*/
$method=|bool|registerDocumentation|const QString &

/*
QStringList registeredDocumentations () const
*/
$method=|QStringList|registeredDocumentations|

/*
bool removeCustomFilter ( const QString & filterName )
*/
$method=|bool|removeCustomFilter|const QString &

/*
bool removeCustomValue ( const QString & key )
*/
$method=|bool|removeCustomValue|const QString &

/*
void setAutoSaveFilter ( bool save )
*/
$method=|void|setAutoSaveFilter|bool

/*
void setCollectionFile ( const QString & fileName )
*/
$method=|void|setCollectionFile|const QString &

/*
void setCurrentFilter ( const QString & filterName )
*/
$method=|void|setCurrentFilter|const QString &

/*
bool setCustomValue ( const QString & key, const QVariant & value )
*/
$method=|bool|setCustomValue|const QString &,const QVariant &

/*
bool setupData ()
*/
$method=|bool|setupData|

/*
bool unregisterDocumentation ( const QString & namespaceName )
*/
$method=|bool|unregisterDocumentation|const QString &

/*
static QVariant metaData ( const QString & documentationFileName, const QString & name )
*/
$staticMethod=|QVariant|metaData|const QString &,const QString &

/*
static QString namespaceName ( const QString & documentationFileName )
*/
$staticMethod=|QString|namespaceName|const QString &

#pragma ENDDUMP

$header

#include "hbclass.ch"

#ifndef QT4XHB_NO_REQUESTS
REQUEST QVARIANT
REQUEST QBYTEARRAY
REQUEST QURL
#endif

CLASS QHelpEngineCore INHERIT QObject

   METHOD new
   METHOD delete
   METHOD addCustomFilter
   METHOD autoSaveFilter
   METHOD collectionFile
   METHOD copyCollectionFile
   METHOD currentFilter
   METHOD customFilters
   METHOD customValue
   METHOD documentationFileName
   METHOD error
   METHOD fileData
   METHOD files
   METHOD filterAttributes1
   METHOD filterAttributes2
   METHOD filterAttributes
   METHOD findFile
   METHOD registerDocumentation
   METHOD registeredDocumentations
   METHOD removeCustomFilter
   METHOD removeCustomValue
   METHOD setAutoSaveFilter
   METHOD setCollectionFile
   METHOD setCurrentFilter
   METHOD setCustomValue
   METHOD setupData
   METHOD unregisterDocumentation
   METHOD metaData
   METHOD namespaceName

   METHOD onCurrentFilterChanged
   METHOD onSetupFinished
   METHOD onSetupStarted
   METHOD onWarning

   DESTRUCTOR destroyObject

END CLASS

$destructor

#pragma BEGINDUMP

#include <QHelpEngineCore>

#include "qt4xhb_common.h"
#include "qt4xhb_macros.h"
#include "qt4xhb_utils.h"

#include <QStringList>

/*
QHelpEngineCore ( const QString & collectionFile, QObject * parent = 0 )
*/
$constructor=|new|const QString &,QObject *=0

$deleteMethod

/*
bool addCustomFilter ( const QString & filterName, const QStringList & attributes )
*/
$method=|bool|addCustomFilter|const QString &,const QStringList &

/*
bool autoSaveFilter () const
*/
$method=|bool|autoSaveFilter|

/*
QString collectionFile () const
*/
$method=|QString|collectionFile|

/*
bool copyCollectionFile ( const QString & fileName )
*/
$method=|bool|copyCollectionFile|const QString &

/*
QString currentFilter () const
*/
$method=|QString|currentFilter|

/*
QStringList customFilters () const
*/
$method=|QStringList|customFilters|

/*
QVariant customValue ( const QString & key, const QVariant & defaultValue = QVariant() ) const
*/
$method=|QVariant|customValue|const QString &,const QVariant &=QVariant()

/*
QString documentationFileName ( const QString & namespaceName )
*/
$method=|QString|documentationFileName|const QString &

/*
QString error () const
*/
$method=|QString|error|

/*
QByteArray fileData ( const QUrl & url ) const
*/
$method=|QByteArray|fileData|const QUrl &

/*
QList<QUrl> files ( const QString namespaceName, const QStringList & filterAttributes, const QString & extensionFilter = QString() )
*/
HB_FUNC_STATIC( QHELPENGINECORE_FILES )
{
  QHelpEngineCore * obj = (QHelpEngineCore *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );

  if( obj )
  {
    QList<QUrl> list = obj->files ( PQSTRING(1), PQSTRINGLIST(2), OPQSTRING(3,QString()) );
    PHB_DYNS pDynSym;
    #ifdef __XHARBOUR__
    pDynSym = hb_dynsymFind( "QURL" );
    #else
    pDynSym = hb_dynsymFindName( "QURL" );
    #endif
    PHB_ITEM pArray;
    pArray = hb_itemArrayNew(0);
    int i;
    for(i=0;i<list.count();i++)
    {
      if( pDynSym )
      {
        #ifdef __XHARBOUR__
        hb_vmPushSymbol( pDynSym->pSymbol );
        #else
        hb_vmPushDynSym( pDynSym );
        #endif
        hb_vmPushNil();
        hb_vmDo( 0 );
        PHB_ITEM pObject = hb_itemNew( NULL );
        hb_itemCopy( pObject, hb_stackReturnItem() );
        PHB_ITEM pItem = hb_itemNew( NULL );
        hb_itemPutPtr( pItem, (QUrl *) new QUrl ( list[i] ) );
        hb_objSendMsg( pObject, "_POINTER", 1, pItem );
        hb_itemRelease( pItem );
        PHB_ITEM pDestroy = hb_itemNew( NULL );
        hb_itemPutL( pDestroy, true );
        hb_objSendMsg( pObject, "_SELF_DESTRUCTION", 1, pDestroy );
        hb_itemRelease( pDestroy );
        hb_arrayAddForward( pArray, pObject );
        hb_itemRelease( pObject );
      }
    }
    hb_itemReturnRelease(pArray);
  }
}

/*
QStringList filterAttributes () const
*/
$method=|QStringList|filterAttributes,filterAttributes1|

/*
QStringList filterAttributes ( const QString & filterName ) const
*/
$method=|QStringList|filterAttributes,filterAttributes2|const QString &

//[1]QStringList filterAttributes () const
//[2]QStringList filterAttributes ( const QString & filterName ) const

HB_FUNC_STATIC( QHELPENGINECORE_FILTERATTRIBUTES )
{
  if( ISNUMPAR(0) )
  {
    HB_FUNC_EXEC( QHELPENGINECORE_FILTERATTRIBUTES1 );
  }
  else if( ISNUMPAR(1) && ISCHAR(1) )
  {
    HB_FUNC_EXEC( QHELPENGINECORE_FILTERATTRIBUTES2 );
  }
}

/*
QUrl findFile ( const QUrl & url ) const
*/
$method=|QUrl|findFile|const QUrl &

/*
bool registerDocumentation ( const QString & documentationFileName )
*/
$method=|bool|registerDocumentation|const QString &

/*
QStringList registeredDocumentations () const
*/
$method=|QStringList|registeredDocumentations|

/*
bool removeCustomFilter ( const QString & filterName )
*/
$method=|bool|removeCustomFilter|const QString &

/*
bool removeCustomValue ( const QString & key )
*/
$method=|bool|removeCustomValue|const QString &

/*
void setAutoSaveFilter ( bool save )
*/
$method=|void|setAutoSaveFilter|bool

/*
void setCollectionFile ( const QString & fileName )
*/
$method=|void|setCollectionFile|const QString &

/*
void setCurrentFilter ( const QString & filterName )
*/
$method=|void|setCurrentFilter|const QString &

/*
bool setCustomValue ( const QString & key, const QVariant & value )
*/
$method=|bool|setCustomValue|const QString &,const QVariant &

/*
bool setupData ()
*/
$method=|bool|setupData|

/*
bool unregisterDocumentation ( const QString & namespaceName )
*/
$method=|bool|unregisterDocumentation|const QString &

/*
static QVariant metaData ( const QString & documentationFileName, const QString & name )
*/
$staticMethod=|QVariant|metaData|const QString &,const QString &

/*
static QString namespaceName ( const QString & documentationFileName )
*/
$staticMethod=|QString|namespaceName|const QString &

#pragma ENDDUMP


[Vfp] Updated GetWord functions to use a constant for the delimiters and updated documentation comments

USING System
USING System.Collections.Generic
USING System.Text

BEGIN NAMESPACE XSharp.VFP
    DELEGATE __IsInDelimiterArray(tc2Check AS Char) AS LOGIC
    DELEGATE __GetWordCountActive(tcString AS STRING) AS LONG

    DEFINE Asc_A_Low := 097 && Asc_A + 32
    DEFINE Asc_Z_Low := 122 && Asc_Z + 32

    INTERFACE IGetWord
        METHOD GetWordCount(tcString AS STRING) AS LONG
        METHOD GetWordNum(tcString AS STRING, tnWordNum AS INT) AS STRING
        METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
        METHOD SetStru() AS VOID
    END INTERFACE

    CLASS GetVfpDefault
        PUBLIC CONST _cSpace := c' '    AS Char && _Chr(ASC_BLANK)  Chr(032)[0]
        PUBLIC CONST _c_LinF := c'\n'   AS Char && _Chr(ASC_LF)     Chr(010)[0]
        PUBLIC CONST _c__Tab := c'\t'   AS Char && _Chr(ASC_Tab)    Chr(009)[0]
        * public const _c_CRet := c'\r'   as Char && _Chr(ASC_CR)     Chr(013)[0]

        PUBLIC  oParent AS GetWordHandler

        VIRTUAL METHOD GetWordCount(tcString AS STRING) AS LONG
            // Start with a Word?
            LOCAL lnCount  := iif(SELF:IsDelimiter(tcString[0]), 0, 1) AS INT
            LOCAL lnSLast := tcString:Length-1 AS INT
            FOR LOCAL lnI := 0 AS INT TO lnSLast
                IF SELF:IsDelimiter(tcString[lnI])
                    //remove any delimiters following in row, like Space(2)
			        DO WHILE lnI < lnSLast
				        lnI := lnI + 1
	    		        IF !SELF:IsDelimiter(tcString[lnI])
                            *-- we have next normal chars considered "in word"
		    		        lnCount := lnCount+1
					        EXIT
				        ENDIF
			        ENDDO
		        ENDIF
	        NEXT
	        RETURN lnCount

        VIRTUAL METHOD GetWordNum(tcString AS STRING, tnWordNum AS INT) AS STRING
            *-- Checked: throws on .Null.
            *-- undocumented and differing vom vfp: if tnIndex is 0, return "" (as in vfp9)
            *-- but set WordCount as out Parameter to use in GetWordNum
            *-- pure stringdancing, stay with those methods
            * ? tcRefString, tnRefIndex, tcDelimiters:Length, tcDelimiters
            // Start with a Word?
            LOCAL lnCount := iif(SELF:IsDelimiter(tcString[0]), 0, 1) AS INT
            LOCAL lnSLast := tcString:Length-1 AS INT
            LOCAL lnStart := 0 AS INT, lnStop AS INT
            FOR LOCAL lnI := 0 AS INT TO lnSLast
                * ? tcRefString:Substring(lnI,1), tcDelimiters:Contains( tcRefString:Substring(lnI,1))
                IF SELF:IsDelimiter(tcString[lnI])
                    // Skip all other delimiters until next Word is found
                    DO WHILE lnI < lnSLast
                        lnI := lnI+1
                        IF !SELF:IsDelimiter(tcString[lnI])
                            *-- gets interesting... found a word
                            IF tnWordNum=lnCount
                                *-- if we start at a word and RefIndex is 1 we reach this here
                                lnStop := lnI-1
                            ELSE
                                lnCount := lnCount + 1
                                lnStart = lnI
                                FOR lnStop := lnI+1 TO lnSLast
                                    IF SELF:IsDelimiter(tcString[lnStop])
                                        EXIT
                                    ENDIF
                                NEXT
                            ENDIF
                            IF tnWordNum=lnCount
                                *-- here we HAVE correct word on both starts if tnIndex>0 and will RETURN
                                RETURN tcString:Substring(lnStart, lnStop-lnStart)
                            ELSE
                                *-- Add already found non-White
                                lnI := lnStop - 1
                                EXIT
                            ENDIF
                        ENDIF
                    ENDDO
                ENDIF
            NEXT
            *-- return empty as in vfp, as real payload takes inner exit
            RETURN ""

        VIRTUAL METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            /// direct switch checking against constants
            /// ToDo: flagged version, flags set on SetDict? Measure setup time!
            SWITCH  tc2Check
                CASE _cSpace
                CASE _c_LinF
                CASE _c__Tab
                    RETURN .t.
                OTHERWISE
                    RETURN .f.
            END SWITCH

        VIRTUAL METHOD SetStru() AS VOID
            RETURN

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
             SELF:oParent := toParent
             RETURN
        END Constructor
    END CLASS

    CLASS GetDotNetWhite INHERIT GetVfpDefault

        OVERRIDE METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            RETURN System:Char:IsWhiteSpace(tc2Check)

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)
    END CLASS

    CLASS GetSingle INHERIT GetVfpDefault
        *-- Single delimiter Comparison options
        PUBLIC cCmp AS Char

        OVERRIDE METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            RETURN SELF:cCmp:Equals(tc2Check)

        OVERRIDE METHOD SetStru() AS VOID
            SELF:cCmp := SELF:oParent:cRawStr[0]
            RETURN

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)
    END CLASS

    CLASS GetSingleOpt INHERIT GetSingle
        // Direct call to Char:Equals without calling IsDelimiter gives sizable boost
        OVERRIDE METHOD GetWordCount(tcString AS STRING) AS LONG
            // Start with a Word?
            LOCAL lnCount  := iif(SELF:cCmp:Equals(tcString[0]), 0, 1) AS INT
            LOCAL lnSLast := tcString:Length-1 AS INT
            FOR LOCAL lnI := 0 AS INT TO lnSLast
                IF SELF:cCmp:Equals(tcString[lnI])
                    //remove any delimiters following in row, like Space(2)
			        DO WHILE lnI < lnSLast
				        lnI := lnI + 1
	    		        IF !SELF:cCmp:Equals(tcString[lnI])
                            *-- we have next normal chars considered "in word"
		    		        lnCount := lnCount+1
					        EXIT
				        ENDIF
			        ENDDO
		        ENDIF
	        NEXT
	        RETURN lnCount

        OVERRIDE METHOD GetWordNum(tcString AS STRING, tnWordNum AS INT) AS STRING
            *-- Checked: throws on .Null.
            *-- undocumented and differing vom vfp: if tnIndex is 0, return "" (as in vfp9)
            *-- but set WordCount as out Parameter to use in GetWordNum
            *-- pure stringdancing, stay with those methods
            * ? tcRefString, tnRefIndex, tcDelimiters:Length, tcDelimiters
            // Start with a Word?
            LOCAL lnCount := iif(SELF:cCmp:Equals(tcString[0]), 0, 1) AS INT
            LOCAL lnSLast := tcString:Length-1 AS INT
            LOCAL lnStart := 0 AS INT, lnStop AS INT
            FOR LOCAL lnI := 0 AS INT TO lnSLast
                * ? tcRefString:Substring(lnI,1), tcDelimiters:Contains( tcRefString:Substring(lnI,1))
                IF SELF:cCmp:Equals(tcString[lnI])
                    // Skip all other delimiters until next Word is found
                    DO WHILE lnI < lnSLast
                        lnI := lnI+1
                        IF !SELF:cCmp:Equals(tcString[lnI])
                            *-- gets interesting... found a word
                            IF tnWordNum=lnCount
                                *-- if we start at a word and RefIndex is 1 we reach this here
                                lnStop := lnI-1
                            ELSE
                                lnCount := lnCount + 1
                                lnStart = lnI
                                FOR lnStop := lnI+1 TO lnSLast
                                    IF SELF:IsDelimiter(tcString[lnStop])
                                        EXIT
                                    ENDIF
                                NEXT
                            ENDIF
                            IF tnWordNum=lnCount
                                *-- here we HAVE correct word on both starts if tnIndex>0 and will RETURN
                                RETURN tcString:Substring(lnStart, lnStop-lnStart)
                            ELSE
                                *-- Add already found non-White
                                lnI := lnStop - 1
                                EXIT
                            ENDIF
                        ENDIF
                    ENDDO
                ENDIF
            NEXT
            *-- return empty as in vfp, as real payload takes inner exit
            RETURN ""

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)

    END CLASS

    CLASS GetMultiple INHERIT GetVfpDefault
        *-- if not single char, DotNetWhite or VfpWhite:
        PRIVATE CONST _c_A126 := (Char) 126 AS Char && _Chr(ASC_Z_Low)  Chr(126)[0], cut off ~ TO be safe on 1 off
        PRIVATE CONST _i_ArSz := 135 AS INT
        PRIVATE CONST _i_ArOf := _i_ArSz - 2 AS INT

        PUBLIC nInDict AS INT
	    PUBLIC alFlg AS LOGIC[]
	    PUBLIC hcCmp AS Dictionary <Char, BYTE>
        OVERRIDE METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            /// this way I don't have to care if lowest bits are filled via different encoding
            /// as comparison is made to one of the ASCII char identical to Unicode
            /// Array plus offest calculated with some spare room so no combination of bad luck
            /// can create index error
            LOCAL lnI := tc2Check:CompareTo(_c_A126) AS INT
            IF lnI<0
                *-- it is GUARANTEED OBJECT below Ascii 126
                *-- make certain, no index Error can slip in
                RETURN SELF:alFlg[_i_ArOf + lnI]
            ELSEIF SELF:nInDict>0
                *-- guard for other alphabets
                RETURN  SELF:hcCmp:ContainsKey(tc2Check)
            ENDIF
            RETURN .f.

        OVERRIDE METHOD SetStru() AS VOID
            *-- chk different version of setdict in 2. run of timings
            *-- when often calling routine for short takes, many rows in table
            SELF:nInDict := 0
            SELF:hcCmp := Dictionary<Char,BYTE>{}
            SELF:alFlg := LOGIC[]{_i_ArSz}
            *-- ? instead try timing
            * Self:hcCmp:Clear()
            * self:alFlg:Clear()

            LOCAL lcAdd AS Char
            LOCAL lnI AS INT
            FOR LOCAL lnRun := 0 AS INT TO SELF:oParent:cRawStr:Length-1  && Att: ARRAY base 1, STRING Base 0!!!
                lcAdd := SELF:oParent:cRawStr[lnRun]
                *-- Alternative coding with Try/Catch faster?? usually the Catch part incurs runtime hit?
                *-- but feels less clean, as source of problem (duplicate keys in string) known
                lnI := lcAdd:CompareTo(_c_A126)
                IF lnI<0
                    *-- it is GUARANTEED OBJECT below Ascii 126
                    *-- make certain, no index Error can slip in
                    SELF:alFlg[_i_ArOf + lnI] := .t.
                ELSEIF !SELF:hcCmp:ContainsKey(lcAdd)
                    *-- Do NOT add lcAdds already in earlier structure(s)
                    *-- to enable total block of dict access if zero delimiters outside checked range given
                    *-- but checked text consists mostly of unicode chars outside Latin:
                    *-- Greek, Cyrillic, Hirigana, Katagana, whatever
                    SELF:hcCmp:Add(lcAdd,0)
                    Self.nInDict := Self.nInDict + 1
                ENDIF
            NEXT

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)
    END CLASS

    CLASS GetMoreLanguage INHERIT GetMultiple
        *-- exchange with Range for Greek or Cyrillic alphabet
        PRIVATE CONST _c_Up_A := c'A'    AS Char && _Chr(ASC_A)      Chr(065)[0]
        PRIVATE CONST _c_Up_Z := c'Z'    AS Char && _Chr(ASC_Z)      Chr(090)[0]
        PRIVATE CONST _c_Lw_a := c'a'    AS Char && _Chr(ASC_A_Low)  Chr(097)[0]
        PRIVATE CONST _c_Lw_z := c'z'    AS Char && _Chr(ASC_Z_Low)  Chr(122)[0]

        OVERRIDE METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            *-- even better would be 1 Compare, then checking against known numeric range,
            *-- or checking several ranges, perhaps even adding DotNet.IsWhiteSpace into the fray
            *-- generating+compiling "specific" IsDelimiter() on the fly
            *-- either generating whole class dynamic only predicate delegate IsDelimiter
            * local liCompared2BigAlpha :=
           IF  tc2Check:CompareTo(_c_Lw_a)>=0 .and. tc2Check:CompareTo(_c_Lw_z)<=0    && lower letters first, AS ocurring more often
                RETURN .f.
            ELSEIF  tc2Check:CompareTo(_c_Up_A)>=0 .and. tc2Check:CompareTo(_c_Up_Z)<=0
                RETURN .f.
            ELSEIF  .t. && SELF:isVfpWhiteSwitchChar(tc2Check)
                /// Flag Check Version???
                RETURN .t.
            ENDIF
            RETURN  SELF:hcCmp:ContainsKey(tc2Check)

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)
    END CLASS

	CLASS GetWordHandler
	    /// Single
        /// lMany:
        /// todo: Check new dict+array vs. :clear
        *-- gets faster runtime if declared immutable? Not really...
        PUBLIC cRawStr AS STRING
        PUBLIC iMethod := 0 AS INT
        PUBLIC lAuto := .t. AS LOGIC
        PRIVATE CONST Delimiters := e" \n\t" AS STRING

        ///implemented as lazy loading in :SetActive, perhaps more DotNetStyle
        ///would be a property or access method creating an instance in member location slot
        ///when accessed and still .Null.
        PUBLIC oVfpDefault := NULL AS GetVfpDefault
        PUBLIC oDotWhiteSp := NULL AS GetDotNetWhite
        PUBLIC oSingleChar := NULL AS GetSingle
        PUBLIC oSingle_Opt := NULL AS GetSingleOpt
        PUBLIC oMultipleCs := NULL AS GetMultiple
        PUBLIC oActiveObjc := NULL AS OBJECT && IGetWord AS common INTERFACE would be cleaner

        *-- plus a few special methods to set different delimiters,
        *-- causing the object to "reoptimize" the code used to analyze/extract the string (
        PUBLIC METHOD SetDelimiter(tcDelimiter AS STRING) AS VOID
            *-- Somewhat ugly: here no option to set DotNetWhite or VfpDefault via "best" mode
            *-- of course setting :iMethod directly works, and "special" values
            *-- like "" for vfpFeault and .Null. for DotNetWhite have their own messy code smell
            *-- what is missing for alines() ? Perhaps implement alines(taArr, tcString, tnFlags, tcCHAR_List as Char[]) overload?
            *-- List of STRING Parameters, Flags: in own code Chr(13)+Chr(10) most often used "String"
            SELF:cRawStr := tcDelimiter
            IF tcDelimiter:Length=1
                IF SELF:iMethod <0
                    *-- guard for manual sets
                    SELF:iMethod := -SELF:iMethod
                ELSE
                    SELF:iMethod := 1
                ENDIF
            ELSEIF  tcDelimiter:Length=3 and tcDelimiter:IndexOf(GetVfpDefault:_cSpace)>=0 ;
                and tcDelimiter:IndexOf(GetVfpDefault:_c_LinF)>=0 ;
                and tcDelimiter:IndexOf(GetVfpDefault:_c__Tab)>=0
                *-- ToDo: find most efficient check for Permutations of Tab, LF, Space(1)
                *-- Will switcg over to correct subobject
                *-- min() taking usuals not an option
                IF SELF:iMethod <0
                    *-- guard for manual sets
                    SELF:iMethod := -SELF:iMethod
                ELSE
                    SELF:iMethod := 22
                ENDIF
            ELSE
                SELF:iMethod := 37
            ENDIF
            IF SELF:lAuto
                SELF:SetActive()
            ENDIF

        PUBLIC METHOD SetActive() AS VOID
            // more elegant NullCheck+Create via property ?
            // Speed difference caused by property vs. field access ?
            // Different ways to check for .Null.?
            SWITCH SELF:iMethod
                CASE  -4
                    IF ReferenceEquals(SELF:oDotWhiteSp, NULL)
                        SELF:oDotWhiteSp := GetDotNetWhite{SELF}
                    ENDIF
                    SELF:oActiveObjc :=  (OBJECT) SELF:oDotWhiteSp
                CASE  1
                    *if !Self:oSingle_Opt != null
                    *if Self:oSingle_Opt is null
                    IF ReferenceEquals(SELF:oSingle_Opt, NULL)
                        SELF:oSingle_Opt := GetSingleOpt{SELF}
                    ENDIF
                    SELF:oActiveObjc :=  (OBJECT) SELF:oSingle_Opt
                CASE  3
                    IF ReferenceEquals(SELF:oSingleChar, NULL)
                        SELF:oSingleChar := GetSingle{SELF}
                    ENDIF
                    SELF:oActiveObjc :=  (OBJECT) SELF:oSingleChar
                CASE 22
                    SELF:cRawStr := Delimiters
                    IF ReferenceEquals(SELF:oVfpDefault, NULL)
                        SELF:oVfpDefault := GetVfpDefault{SELF}
                    ENDIF
                    SELF:oActiveObjc := (OBJECT) SELF:oVfpDefault &&
                * case 34
                    * Hook for additional Char sets like Greek, Cyrillic...
                    * self:IsDelimiter := Self:isViaDictGuarded
                OTHERWISE
                    IF ReferenceEquals(SELF:oMultipleCs, NULL)
                        SELF:oMultipleCs := GetMultiple{SELF}
                    ENDIF
                    SELF:oActiveObjc := (OBJECT) SELF:oMultipleCs
                END SWITCH
                IF SELF:lAuto
                    *-- better imp via additional interface for 3(1)&37, 22/4 don't need empty method
                    *-- no additional code as 1 inherits 3, but
                    *-- then have to guard via call "as" plus check for returned null
                    SELF:SetStru()
                ENDIF
            RETURN

        INTERNAL METHOD SetStru() AS VOID
            SELF:oActiveObjc:SetStru()

        INTERNAL METHOD isViaStr(tc2Check AS Char) AS LOGIC
            RETURN .t. && SELF:cRawStr:Contains((STRING) tc2Check)

    CONSTRUCTOR()
         *self:GetWordCount := self:GetWordCountMeth
         *self:GetWordNum := self:GetWordNumMeth
         *self:IsDelimiter := Self:isVia1Char
         RETURN

	END CLASS

END NAMESPACE // XSharp.VFP

/// <include file="VFPDocs.xml" path="Runtimefunctions/getwordcount/*" />
STATIC FUNCTION GetDefaultHandler()  AS GetWordHandler
    LOCAL loSrch := GetWordHandler{} AS GetWordHandler
    loSrch:iMethod := 22    && Sidestepping check on cRawStr
    loSrch:SetActive()
    RETURN loSrch

/// <include file="VFPDocs.xml" path="Runtimefunctions/getwordcount/*" />
FUNCTION GetWordCount( tcString AS STRING) AS LONG
    LOCAL loSrch := GetDefaultHandler() AS GetWordHandler
    RETURN loSrch:oActiveObjc:GetWordCount( tcString)

/// <include file="VFPDocs.xml" path="Runtimefunctions/getwordcount/*" />
FUNCTION GetWordCount( tcString AS STRING, tcDelimiters AS STRING) AS LONG
    LOCAL lnRefSwitch := 0 AS INT
    LOCAL lcTrack := "" AS STRING
    RETURN GetWordCount( tcString , tcDelimiters, lnRefSwitch, lcTrack)

/// <include file="VFPDocs.xml" path="Runtimefunctions/getwordcount/*" />
FUNCTION GetWordCount( tcString AS STRING, tcDelimiters AS STRING, tnSwitch REF INT, tcTrack REF STRING) AS LONG
    *-- Checked: throws on .Null.
    *-- when moving class based optimized, presearch optimization times are avoided
    *-- so no systematic error to do up front when checking efficiency
    LOCAL lnReturn AS INT
    LOCAL loSrch := GetWordHandler{} AS GetWordHandler
    IF tnSwitch<0
            loSrch:iMethod := tnSwitch
    ENDIF
    = loSrch:SetDelimiter(tcDelimiters)
    tnSwitch := loSrch:iMethod
    tnSwitch := loSrch:iMethod
    tcTrack := loSrch:oActiveObjc:GetType():Name
    lnReturn := loSrch:oActiveObjc:GetWordCount(tcString)
    RETURN lnReturn

/// <include file="VFPDocs.xml" path="Runtimefunctions/getwordnum/*" />
FUNCTION GetWordNum( tcString AS STRING, tnIndex AS INT) AS STRING
    LOCAL loSrch := GetDefaultHandler() AS GetWordHandler
    RETURN loSrch:oActiveObjc:GetWordNum( tcString, tnIndex)

/// <include file="VFPDocs.xml" path="Runtimefunctions/getwordnum/*" />
FUNCTION GetWordNum( tcString AS STRING, tnIndex AS INT, tcDelimiters AS STRING) AS STRING
    *-- Checked: throws on .Null.
    LOCAL lnRefSwitch := 0 AS INT
    LOCAL lcTrack := "" AS STRING
    RETURN  GetWordNum( tcString, tnIndex, tcDelimiters, lnRefSwitch, lcTrack)

/// <include file="VFPDocs.xml" path="Runtimefunctions/getwordnum/*" />
FUNCTION GetWordNum( tcString AS STRING, tnIndex AS INT, tcDelimiters AS STRING, tnSwitch REF INT, tcTrack REF STRING) AS STRING
    *-- Checked: throws on .Null., lcReturn still here to debug
    LOCAL lcReturn AS STRING
    LOCAL loSrch AS GetWordHandler
    loSrch := GetWordHandler {}
    = loSrch:SetDelimiter(tcDelimiters)
    tnSwitch := loSrch:iMethod
    tcTrack := loSrch:oActiveObjc:GetType():Name
    lcReturn := loSrch:oActiveObjc:GetWordNum(tcString, tnIndex)
    RETURN lcReturn

    //STATIC FUNCTION __GetDelimiters() AS STRING
    //RETURN e" \n\t"
    //RETURN Space(1) + Chr(10) + Chr(9) && + Chr(13) CarriageReturn not included IN vfp9!

USING System
USING System.Collections.Generic
USING System.Text

BEGIN NAMESPACE XSharp.VFP
    DELEGATE __IsInDelimiterArray(tc2Check AS Char) AS LOGIC
    DELEGATE __GetWordCountActive(tcString AS STRING) AS LONG
	///
    /// The Class1 class.
    ///
    DEFINE Asc_A_Low := 097 && Asc_A + 32
    DEFINE Asc_Z_Low := 122 && Asc_Z + 32

    INTERFACE IGetWord
        METHOD GetWordCount(tcString AS STRING) AS LONG
        METHOD GetWordNum(tcString AS STRING, tnWordNum AS INT) AS STRING
        METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
        METHOD SetStru() AS VOID
    END INTERFACE

    CLASS GetVfpDefault
        PUBLIC CONST _cSpace := c' '    AS Char && _Chr(ASC_BLANK)  Chr(032)[0]
        PUBLIC CONST _c_LinF := c'\n'   AS Char && _Chr(ASC_LF)     Chr(010)[0]
        PUBLIC CONST _c__Tab := c'\t'   AS Char && _Chr(ASC_Tab)    Chr(009)[0]
        * public const _c_CRet := c'\r'   as Char && _Chr(ASC_CR)     Chr(013)[0]

        PUBLIC  oParent AS GetWordHandler

        VIRTUAL METHOD GetWordCount(tcString AS STRING) AS LONG
            // Start with a Word?
            LOCAL lnCount  := iif(SELF:IsDelimiter(tcString[0]), 0, 1) AS INT
            LOCAL lnSLast := tcString:Length-1 AS INT
            FOR LOCAL lnI := 0 AS INT TO lnSLast
                IF SELF:IsDelimiter(tcString[lnI])
                    //remove any delimiters following in row, like Space(2)
			        DO WHILE lnI < lnSLast
				        lnI := lnI + 1
	    		        IF !SELF:IsDelimiter(tcString[lnI])
                            *-- we have next normal chars considered "in word"
		    		        lnCount := lnCount+1
					        EXIT
				        ENDIF
			        ENDDO
		        ENDIF
	        NEXT
	        RETURN lnCount

        VIRTUAL METHOD GetWordNum(tcString AS STRING, tnWordNum AS INT) AS STRING
            *-- Checked: throws on .Null.
            *-- undocumented and differing vom vfp: if tnIndex is 0, return "" (as in vfp9)
            *-- but set WordCount as out Parameter to use in GetWordNum
            *-- pure stringdancing, stay with those methods
            * ? tcRefString, tnRefIndex, tcDelimiters:Length, tcDelimiters
            // Start with a Word?
            LOCAL lnCount := iif(SELF:IsDelimiter(tcString[0]), 0, 1) AS INT
            LOCAL lnSLast := tcString:Length-1 AS INT
            LOCAL lnStart := 0 AS INT, lnStop AS INT
            FOR LOCAL lnI := 0 AS INT TO lnSLast
                * ? tcRefString:Substring(lnI,1), tcDelimiters:Contains( tcRefString:Substring(lnI,1))
                IF SELF:IsDelimiter(tcString[lnI])
                    // Skip all other delimiters until next Word is found
                    DO WHILE lnI < lnSLast
                        lnI := lnI+1
                        IF !SELF:IsDelimiter(tcString[lnI])
                            *-- gets interesting... found a word
                            IF tnWordNum=lnCount
                                *-- if we start at a word and RefIndex is 1 we reach this here
                                lnStop := lnI-1
                            ELSE
                                lnCount := lnCount + 1
                                lnStart = lnI
                                FOR lnStop := lnI+1 TO lnSLast
                                    IF SELF:IsDelimiter(tcString[lnStop])
                                        EXIT
                                    ENDIF
                                NEXT
                            ENDIF
                            IF tnWordNum=lnCount
                                *-- here we HAVE correct word on both starts if tnIndex>0 and will RETURN
                                RETURN tcString:Substring(lnStart, lnStop-lnStart)
                            ELSE
                                *-- Add already found non-White
                                lnI := lnStop - 1
                                EXIT
                            ENDIF
                        ENDIF
                    ENDDO
                ENDIF
            NEXT
            *-- return empty as in vfp, as real payload takes inner exit
            RETURN ""

        VIRTUAL METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            /// direct switch checking against constants
            /// ToDo: flagged version, flags set on SetDict? Measure setup time!
            SWITCH  tc2Check
                CASE _cSpace
                CASE _c_LinF
                CASE _c__Tab
                    RETURN .t.
                OTHERWISE
                    RETURN .f.
            END SWITCH

        VIRTUAL METHOD SetStru() AS VOID
            RETURN

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
             SELF:oParent := toParent
             RETURN
        END Constructor
    END CLASS

    CLASS GetDotNetWhite INHERIT GetVfpDefault

        OVERRIDE METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            RETURN System:Char:IsWhiteSpace(tc2Check)

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)
    END CLASS

    CLASS GetSingle INHERIT GetVfpDefault
        *-- Single delimiter Comparison options
        PUBLIC cCmp AS Char

        OVERRIDE METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            RETURN SELF:cCmp:Equals(tc2Check)

        OVERRIDE METHOD SetStru() AS VOID
            SELF:cCmp := SELF:oParent:cRawStr[0]
            RETURN

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)
    END CLASS

    CLASS GetSingleOpt INHERIT GetSingle
        // Direct call to Char:Equals without calling IsDelimiter gives sizable boost
        OVERRIDE METHOD GetWordCount(tcString AS STRING) AS LONG
            // Start with a Word?
            LOCAL lnCount  := iif(SELF:cCmp:Equals(tcString[0]), 0, 1) AS INT
            LOCAL lnSLast := tcString:Length-1 AS INT
            FOR LOCAL lnI := 0 AS INT TO lnSLast
                IF SELF:cCmp:Equals(tcString[lnI])
                    //remove any delimiters following in row, like Space(2)
			        DO WHILE lnI < lnSLast
				        lnI := lnI + 1
	    		        IF !SELF:cCmp:Equals(tcString[lnI])
                            *-- we have next normal chars considered "in word"
		    		        lnCount := lnCount+1
					        EXIT
				        ENDIF
			        ENDDO
		        ENDIF
	        NEXT
	        RETURN lnCount

        OVERRIDE METHOD GetWordNum(tcString AS STRING, tnWordNum AS INT) AS STRING
            *-- Checked: throws on .Null.
            *-- undocumented and differing vom vfp: if tnIndex is 0, return "" (as in vfp9)
            *-- but set WordCount as out Parameter to use in GetWordNum
            *-- pure stringdancing, stay with those methods
            * ? tcRefString, tnRefIndex, tcDelimiters:Length, tcDelimiters
            // Start with a Word?
            LOCAL lnCount := iif(SELF:cCmp:Equals(tcString[0]), 0, 1) AS INT
            LOCAL lnSLast := tcString:Length-1 AS INT
            LOCAL lnStart := 0 AS INT, lnStop AS INT
            FOR LOCAL lnI := 0 AS INT TO lnSLast
                * ? tcRefString:Substring(lnI,1), tcDelimiters:Contains( tcRefString:Substring(lnI,1))
                IF SELF:cCmp:Equals(tcString[lnI])
                    // Skip all other delimiters until next Word is found
                    DO WHILE lnI < lnSLast
                        lnI := lnI+1
                        IF !SELF:cCmp:Equals(tcString[lnI])
                            *-- gets interesting... found a word
                            IF tnWordNum=lnCount
                                *-- if we start at a word and RefIndex is 1 we reach this here
                                lnStop := lnI-1
                            ELSE
                                lnCount := lnCount + 1
                                lnStart = lnI
                                FOR lnStop := lnI+1 TO lnSLast
                                    IF SELF:IsDelimiter(tcString[lnStop])
                                        EXIT
                                    ENDIF
                                NEXT
                            ENDIF
                            IF tnWordNum=lnCount
                                *-- here we HAVE correct word on both starts if tnIndex>0 and will RETURN
                                RETURN tcString:Substring(lnStart, lnStop-lnStart)
                            ELSE
                                *-- Add already found non-White
                                lnI := lnStop - 1
                                EXIT
                            ENDIF
                        ENDIF
                    ENDDO
                ENDIF
            NEXT
            *-- return empty as in vfp, as real payload takes inner exit
            RETURN ""

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)

    END CLASS

    CLASS GetMultiple INHERIT GetVfpDefault
        *-- if not single char, DotNetWhite or VfpWhite:
        PRIVATE CONST _c_A126 := (Char) 126 AS Char && _Chr(ASC_Z_Low)  Chr(126)[0], cut off ~ TO be safe on 1 off
        PRIVATE CONST _i_ArSz := 135 AS INT
        PRIVATE CONST _i_ArOf := _i_ArSz - 2 AS INT

        PUBLIC nInDict AS INT
	    PUBLIC alFlg AS LOGIC[]
	    PUBLIC hcCmp AS Dictionary <Char, BYTE>
        OVERRIDE METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            /// this way I don't have to care if lowest bits are filled via different encoding
            /// as comparison is made to one of the ASCII char identical to Unicode
            /// Array plus offest calculated with some spare room so no combination of bad luck
            /// can create index error
            LOCAL lnI := tc2Check:CompareTo(_c_A126) AS INT
            IF lnI<0
                *-- it is GUARANTEED OBJECT below Ascii 126
                *-- make certain, no index Error can slip in
                RETURN SELF:alFlg[_i_ArOf + lnI]
            ELSEIF SELF:nInDict>0
                *-- guard for other alphabets
                RETURN  SELF:hcCmp:ContainsKey(tc2Check)
            ENDIF
            RETURN .f.

        OVERRIDE METHOD SetStru() AS VOID
            *-- chk different version of setdict in 2. run of timings
            *-- when often calling routine for short takes, many rows in table
            SELF:nInDict := 0
            SELF:hcCmp := Dictionary<Char,BYTE>{}
            SELF:alFlg := LOGIC[]{_i_ArSz}
            *-- ? instead try timing
            * Self:hcCmp:Clear()
            * self:alFlg:Clear()

            LOCAL lcAdd AS Char
            LOCAL lnI AS INT
            FOR LOCAL lnRun := 0 AS INT TO SELF:oParent:cRawStr:Length-1  && Att: ARRAY base 1, STRING Base 0!!!
                lcAdd := SELF:oParent:cRawStr[lnRun]
                *-- Alternative coding with Try/Catch faster?? usually the Catch part incurs runtime hit?
                *-- but feels less clean, as source of problem (duplicate keys in string) known
                lnI := lcAdd:CompareTo(_c_A126)
                IF lnI<0
                    *-- it is GUARANTEED OBJECT below Ascii 126
                    *-- make certain, no index Error can slip in
                    SELF:alFlg[_i_ArOf + lnI] := .t.
                ELSEIF !SELF:hcCmp:ContainsKey(lcAdd)
                    *-- Do NOT add lcAdds already in earlier structure(s)
                    *-- to enable total block of dict access if zero delimiters outside checked range given
                    *-- but checked text consists mostly of unicode chars outside Latin:
                    *-- Greek, Cyrillic, Hirigana, Katagana, whatever
                    SELF:hcCmp:Add(lcAdd,0)
                    Self.nInDict := Self.nInDict + 1
                ENDIF
            NEXT

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)
    END CLASS

    CLASS GetMoreLanguage INHERIT GetMultiple
        *-- exchange with Range for Greek or Cyrillic alphabet
        PRIVATE CONST _c_Up_A := c'A'    AS Char && _Chr(ASC_A)      Chr(065)[0]
        PRIVATE CONST _c_Up_Z := c'Z'    AS Char && _Chr(ASC_Z)      Chr(090)[0]
        PRIVATE CONST _c_Lw_a := c'a'    AS Char && _Chr(ASC_A_Low)  Chr(097)[0]
        PRIVATE CONST _c_Lw_z := c'z'    AS Char && _Chr(ASC_Z_Low)  Chr(122)[0]

        OVERRIDE METHOD IsDelimiter(tc2Check AS Char) AS LOGIC
            *-- even better would be 1 Compare, then checking against known numeric range,
            *-- or checking several ranges, perhaps even adding DotNet.IsWhiteSpace into the fray
            *-- generating+compiling "specific" IsDelimiter() on the fly
            *-- either generating whole class dynamic only predicate delegate IsDelimiter
            * local liCompared2BigAlpha :=
           IF  tc2Check:CompareTo(_c_Lw_a)>=0 .and. tc2Check:CompareTo(_c_Lw_z)<=0    && lower letters first, AS ocurring more often
                RETURN .f.
            ELSEIF  tc2Check:CompareTo(_c_Up_A)>=0 .and. tc2Check:CompareTo(_c_Up_Z)<=0
                RETURN .f.
            ELSEIF  .t. && SELF:isVfpWhiteSwitchChar(tc2Check)
                /// Flag Check Version???
                RETURN .t.
            ENDIF
            RETURN  SELF:hcCmp:ContainsKey(tc2Check)

        CONSTRUCTOR(toParent AS GetWordHandler) AS VOID
            SUPER(toParent)
    END CLASS

	CLASS GetWordHandler
	    /// Single
        /// lMany:
        /// todo: Check new dict+array vs. :clear
        *-- gets faster runtime if declared immutable? Not really...
        PUBLIC cRawStr AS STRING
        PUBLIC iMethod := 0 AS INT
        PUBLIC lAuto := .t. AS LOGIC

        ///implemented as lazy loading in :SetActive, perhaps more DotNetStyle
        ///would be a property or access method creating an instance in member location slot
        ///when accessed and still .Null.
        PUBLIC oVfpDefault := NULL AS GetVfpDefault
        PUBLIC oDotWhiteSp := NULL AS GetDotNetWhite
        PUBLIC oSingleChar := NULL AS GetSingle
        PUBLIC oSingle_Opt := NULL AS GetSingleOpt
        PUBLIC oMultipleCs := NULL AS GetMultiple
        PUBLIC oActiveObjc := NULL AS OBJECT && IGetWord AS common INTERFACE would be cleaner

        *-- plus a few special methods to set different delimiters,
        *-- causing the object to "reoptimize" the code used to analyze/extract the string (
        PUBLIC METHOD SetDelimiter(tcDelimiter AS STRING) AS VOID
            *-- Somewhat ugly: here no option to set DotNetWhite or VfpDefault via "best" mode
            *-- of course setting :iMethod directly works, and "special" values
            *-- like "" for vfpFeault and .Null. for DotNetWhite have their own messy code smell
            *-- what is missing for alines() ? Perhaps implement alines(taArr, tcString, tnFlags, tcCHAR_List as Char[]) overload?
            *-- List of STRING Parameters, Flags: in own code Chr(13)+Chr(10) most often used "String"
            SELF:cRawStr := tcDelimiter
            IF tcDelimiter:Length=1
                IF SELF:iMethod <0
                    *-- guard for manual sets
                    SELF:iMethod := -SELF:iMethod
                ELSE
                    SELF:iMethod := 1
                ENDIF
            ELSEIF  tcDelimiter:Length=3 and tcDelimiter:IndexOf(GetVfpDefault:_cSpace)>=0 ;
                and tcDelimiter:IndexOf(GetVfpDefault:_c_LinF)>=0 ;
                and tcDelimiter:IndexOf(GetVfpDefault:_c__Tab)>=0
                *-- ToDo: find most efficient check for Permutations of Tab, LF, Space(1)
                *-- Will switcg over to correct subobject
                *-- min() taking usuals not an option
                IF SELF:iMethod <0
                    *-- guard for manual sets
                    SELF:iMethod := -SELF:iMethod
                ELSE
                    SELF:iMethod := 22
                ENDIF
            ELSE
                SELF:iMethod := 37
            ENDIF
            IF SELF:lAuto
                SELF:SetActive()
            ENDIF

        PUBLIC METHOD SetActive() AS VOID
            // more elegant NullCheck+Create via property ?
            // Speed difference caused by property vs. field access ?
            // Different ways to check for .Null.?
            SWITCH SELF:iMethod
                CASE  -4
                    IF ReferenceEquals(SELF:oDotWhiteSp, NULL)
                        SELF:oDotWhiteSp := GetDotNetWhite{SELF}
                    ENDIF
                    SELF:oActiveObjc :=  (OBJECT) SELF:oDotWhiteSp
                CASE  1
                    *if !Self:oSingle_Opt != null
                    *if Self:oSingle_Opt is null
                    IF ReferenceEquals(SELF:oSingle_Opt, NULL)
                        SELF:oSingle_Opt := GetSingleOpt{SELF}
                    ENDIF
                    SELF:oActiveObjc :=  (OBJECT) SELF:oSingle_Opt
                CASE  3
                    IF ReferenceEquals(SELF:oSingleChar, NULL)
                        SELF:oSingleChar := GetSingle{SELF}
                    ENDIF
                    SELF:oActiveObjc :=  (OBJECT) SELF:oSingleChar
                CASE 22
                    SELF:cRawStr := __GetDelimiters()
                    IF ReferenceEquals(SELF:oVfpDefault, NULL)
                        SELF:oVfpDefault := GetVfpDefault{SELF}
                    ENDIF
                    SELF:oActiveObjc := (OBJECT) SELF:oVfpDefault &&
                * case 34
                    * Hook for additional Char sets like Greek, Cyrillic...
                    * self:IsDelimiter := Self:isViaDictGuarded
                OTHERWISE
                    IF ReferenceEquals(SELF:oMultipleCs, NULL)
                        SELF:oMultipleCs := GetMultiple{SELF}
                    ENDIF
                    SELF:oActiveObjc := (OBJECT) SELF:oMultipleCs
                END SWITCH
                IF SELF:lAuto
                    *-- better imp via additional interface for 3(1)&37, 22/4 don't need empty method
                    *-- no additional code as 1 inherits 3, but
                    *-- then have to guard via call "as" plus check for returned null
                    SELF:SetStru()
                ENDIF
            RETURN

        INTERNAL METHOD SetStru() AS VOID
            SELF:oActiveObjc:SetStru()

        INTERNAL METHOD isViaStr(tc2Check AS Char) AS LOGIC
            RETURN .t. && SELF:cRawStr:Contains((STRING) tc2Check)

    CONSTRUCTOR()
         *self:GetWordCount := self:GetWordCountMeth
         *self:GetWordNum := self:GetWordNumMeth
         *self:IsDelimiter := Self:isVia1Char
         RETURN

	END CLASS

/// <include file="VFPDocs.xml" path="Runtimefunctions/getwordcount/*" />
    STATIC FUNCTION GetDefaultHandler()  AS GetWordHandler
        LOCAL loSrch := GetWordHandler{} AS GetWordHandler
        loSrch:iMethod := 22    && Sidestepping check on cRawStr
        loSrch:SetActive()
        RETURN loSrch

    /// -- todo --
    /// <include file="VFPDocs.xml" path="Runtimefunctions/getwordcount/*" />

    FUNCTION GetWordCount( tcString AS STRING) AS LONG
        LOCAL loSrch := GetDefaultHandler() AS GetWordHandler
        RETURN loSrch:oActiveObjc:GetWordCount( tcString)

    /// -- todo --
    /// <include file="VFPDocs.xml" path="Runtimefunctions/getwordcount/*" />

    FUNCTION GetWordCount( tcString AS STRING, tcDelimiters AS STRING) AS LONG
        LOCAL lnRefSwitch := 0 AS INT
        LOCAL lcTrack := "" AS STRING
        RETURN GetWordCount( tcString , tcDelimiters, lnRefSwitch, lcTrack)

    /// -- todo --
    /// <include file="VFPDocs.xml" path="Runtimefunctions/getwordcount/*" />

    FUNCTION GetWordCount( tcString AS STRING, tcDelimiters AS STRING, tnSwitch REF INT, tcTrack REF STRING) AS LONG
        *-- Checked: throws on .Null.
        *-- when moving class based optimized, presearch optimization times are avoided
        *-- so no systematic error to do up front when checking efficiency
        LOCAL lnReturn AS INT
        LOCAL loSrch := GetWordHandler{} AS GetWordHandler
        IF tnSwitch<0
               loSrch:iMethod := tnSwitch
        ENDIF
        = loSrch:SetDelimiter(tcDelimiters)
        tnSwitch := loSrch:iMethod
        tnSwitch := loSrch:iMethod
        tcTrack := loSrch:oActiveObjc:GetType():Name
        lnReturn := loSrch:oActiveObjc:GetWordCount(tcString)
        RETURN lnReturn

    /// -- todo --
    /// <include file="VFPDocs.xml" path="Runtimefunctions/getwordnum/*" />

    FUNCTION GetWordNum( tcString AS STRING, tnIndex AS INT) AS STRING
        LOCAL loSrch := GetDefaultHandler() AS GetWordHandler
        RETURN loSrch:oActiveObjc:GetWordNum( tcString, tnIndex)

    /// -- todo --
    /// <include file="VFPDocs.xml" path="Runtimefunctions/getwordnum/*" />

    FUNCTION GetWordNum( tcString AS STRING, tnIndex AS INT, tcDelimiters AS STRING) AS STRING
        *-- Checked: throws on .Null.
        LOCAL lnRefSwitch := 0 AS INT
        LOCAL lcTrack := "" AS STRING
        RETURN  GetWordNum( tcString, tnIndex, tcDelimiters, lnRefSwitch, lcTrack)

    /// -- todo --
    /// <include file="VFPDocs.xml" path="Runtimefunctions/getwordnum/*" />

    FUNCTION GetWordNum( tcString AS STRING, tnIndex AS INT, tcDelimiters AS STRING, tnSwitch REF INT, tcTrack REF STRING) AS STRING
        *-- Checked: throws on .Null., lcReturn still here to debug
        LOCAL lcReturn AS STRING
        LOCAL loSrch AS GetWordHandler
        loSrch := GetWordHandler {}
        = loSrch:SetDelimiter(tcDelimiters)
        tnSwitch := loSrch:iMethod
        tcTrack := loSrch:oActiveObjc:GetType():Name
        lcReturn := loSrch:oActiveObjc:GetWordNum(tcString, tnIndex)
        RETURN lcReturn

    STATIC FUNCTION __GetDelimiters() AS STRING
    RETURN Space(1) + Chr(10) + Chr(9) && + Chr(13) CarriageReturn not included IN vfp9!

END NAMESPACE // XSharp.VFP