source/QtSerialPort: updated

source/QtSerialPort: updated

Modified:
source/QtSerialPort/QSerialPortInfo.prg

/*

  Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5

  Copyright (C) 2018 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 QT5XHB_NO_REQUESTS
#endif

CLASS QSerialPortInfo

   DATA pointer
   DATA self_destruction INIT .F.

   METHOD new
   METHOD delete
   METHOD swap
   METHOD portName
   METHOD systemLocation
   METHOD description
   METHOD manufacturer
   METHOD vendorIdentifier
   METHOD productIdentifier
   METHOD hasVendorIdentifier
   METHOD hasProductIdentifier
   METHOD isNull
   METHOD isBusy
   METHOD isValid
   METHOD standardBaudRates
   METHOD availablePorts

   METHOD newFrom
   METHOD newFromObject
   METHOD newFromPointer
   METHOD selfDestruction
   METHOD setSelfDestruction

   DESTRUCTOR destroyObject

END CLASS

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

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
#include <QSerialPortInfo>
#endif
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
#include <QSerialPortInfo>
#endif
#endif

#include <QString>

/*
QSerialPortInfo()
*/
void QSerialPortInfo_new1 ()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * o = new QSerialPortInfo ();
  _qt5xhb_returnNewObject( o, true );
#endif
}

/*
QSerialPortInfo(const QSerialPort &port)
*/
void QSerialPortInfo_new2 ()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * o = new QSerialPortInfo ( *PQSERIALPORT(1) );
  _qt5xhb_returnNewObject( o, true );
#endif
}

/*
QSerialPortInfo(const QString &name)
*/
void QSerialPortInfo_new3 ()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * o = new QSerialPortInfo ( PQSTRING(1) );
  _qt5xhb_returnNewObject( o, true );
#endif
}

/*
QSerialPortInfo(const QSerialPortInfo &other)
*/
void QSerialPortInfo_new4 ()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * o = new QSerialPortInfo ( *PQSERIALPORTINFO(1) );
  _qt5xhb_returnNewObject( o, true );
#endif
}

//[1]QSerialPortInfo()
//[2]QSerialPortInfo(const QSerialPort &port)
//[3]QSerialPortInfo(const QString &name)
//[4]QSerialPortInfo(const QSerialPortInfo &other)

HB_FUNC_STATIC( QSERIALPORTINFO_NEW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  if( ISNUMPAR(0) )
  {
    QSerialPortInfo_new1();
  }
  else if( ISNUMPAR(1) && ISQSERIALPORT(1) )
  {
    QSerialPortInfo_new2();
  }
  else if( ISNUMPAR(1) && ISCHAR(1) )
  {
    QSerialPortInfo_new3();
  }
  else if( ISNUMPAR(1) && ISQSERIALPORTINFO(1) )
  {
    QSerialPortInfo_new4();
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
#endif
}

HB_FUNC_STATIC( QSERIALPORTINFO_DELETE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

  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() );
#endif
}

/*
void swap(QSerialPortInfo &other)
*/
HB_FUNC_STATIC( QSERIALPORTINFO_SWAP )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT5XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(1) && ISQSERIALPORTINFO(1) )
    {
#endif
      obj->swap ( *PQSERIALPORTINFO(1) );
#ifndef QT5XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
QString portName() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_PORTNAME )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
QString systemLocation() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_SYSTEMLOCATION )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
QString description() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_DESCRIPTION )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
QString manufacturer() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_MANUFACTURER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
quint16 vendorIdentifier() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_VENDORIDENTIFIER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
quint16 productIdentifier() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_PRODUCTIDENTIFIER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool hasVendorIdentifier() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_HASVENDORIDENTIFIER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool hasProductIdentifier() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_HASPRODUCTIDENTIFIER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool isNull() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_ISNULL )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool isBusy() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_ISBUSY )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool isValid() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_ISVALID )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
static QList<qint32> standardBaudRates()
*/
HB_FUNC_STATIC( QSERIALPORTINFO_STANDARDBAUDRATES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
#ifndef QT5XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
  {
#endif
      QList<qint32> list = QSerialPortInfo::standardBaudRates ();
      _qt5xhb_convert_qlist_qint32_to_array ( list );
#ifndef QT5XHB_DONT_CHECK_PARAMETERS
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
#endif
#endif
}

/*
static QList<QSerialPortInfo> availablePorts()
*/
HB_FUNC_STATIC( QSERIALPORTINFO_AVAILABLEPORTS )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
#ifndef QT5XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(0) )
  {
#endif
      QList<QSerialPortInfo> list = QSerialPortInfo::availablePorts ();
      PHB_DYNS pDynSym = hb_dynsymFindName( "QSERIALPORTINFO" );
      PHB_ITEM pArray = hb_itemArrayNew(0);
      int i;
      for(i=0;i<list.count();i++)
      {
        if( pDynSym )
        {
          hb_vmPushDynSym( pDynSym );
          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, (QSerialPortInfo *) new QSerialPortInfo ( 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 );
        }
        else
        {
          hb_errRT_BASE( EG_NOFUNC, 1001, NULL, "QSERIALPORTINFO", HB_ERR_ARGS_BASEPARAMS );
        }
      }
      hb_itemReturnRelease(pArray);
#ifndef QT5XHB_DONT_CHECK_PARAMETERS
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
#endif
#endif
}

HB_FUNC_STATIC( QSERIALPORTINFO_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 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }

  hb_itemReturn( self );
}

HB_FUNC_STATIC( QSERIALPORTINFO_NEWFROMOBJECT )
{
  HB_FUNC_EXEC( QSERIALPORTINFO_NEWFROM );
}

HB_FUNC_STATIC( QSERIALPORTINFO_NEWFROMPOINTER )
{
  HB_FUNC_EXEC( QSERIALPORTINFO_NEWFROM );
}

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

HB_FUNC_STATIC( QSERIALPORTINFO_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 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }

  hb_itemReturn( self );
}

#pragma ENDDUMP

/*

  Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5

  Copyright (C) 2018 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 QT5XHB_NO_REQUESTS
#endif

CLASS QSerialPortInfo

   DATA pointer
   DATA self_destruction INIT .F.

   METHOD new
   METHOD delete
   METHOD swap
   METHOD portName
   METHOD systemLocation
   METHOD description
   METHOD manufacturer
   METHOD vendorIdentifier
   METHOD productIdentifier
   METHOD hasVendorIdentifier
   METHOD hasProductIdentifier
   METHOD isNull
   METHOD isBusy
   METHOD isValid
   METHOD standardBaudRates
   METHOD availablePorts

   METHOD newFrom
   METHOD newFromObject
   METHOD newFromPointer
   METHOD selfDestruction
   METHOD setSelfDestruction

   DESTRUCTOR destroyObject

END CLASS

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

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
#include <QSerialPortInfo>
#endif
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
#include <QSerialPortInfo>
#endif
#endif

#include <QString>

/*
QSerialPortInfo()
*/
void QSerialPortInfo_new1 ()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * o = new QSerialPortInfo ();
  _qt5xhb_returnNewObject( o, true );
#endif
}

/*
QSerialPortInfo(const QSerialPort &port)
*/
void QSerialPortInfo_new2 ()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * o = new QSerialPortInfo ( *PQSERIALPORT(1) );
  _qt5xhb_returnNewObject( o, true );
#endif
}

/*
QSerialPortInfo(const QString &name)
*/
void QSerialPortInfo_new3 ()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * o = new QSerialPortInfo ( PQSTRING(1) );
  _qt5xhb_returnNewObject( o, true );
#endif
}

/*
QSerialPortInfo(const QSerialPortInfo &other)
*/
void QSerialPortInfo_new4 ()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * o = new QSerialPortInfo ( *PQSERIALPORTINFO(1) );
  _qt5xhb_returnNewObject( o, true );
#endif
}

//[1]QSerialPortInfo()
//[2]QSerialPortInfo(const QSerialPort &port)
//[3]QSerialPortInfo(const QString &name)
//[4]QSerialPortInfo(const QSerialPortInfo &other)

HB_FUNC_STATIC( QSERIALPORTINFO_NEW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  if( ISNUMPAR(0) )
  {
    QSerialPortInfo_new1();
  }
  else if( ISNUMPAR(1) && ISQSERIALPORT(1) )
  {
    QSerialPortInfo_new2();
  }
  else if( ISNUMPAR(1) && ISCHAR(1) )
  {
    QSerialPortInfo_new3();
  }
  else if( ISNUMPAR(1) && ISQSERIALPORTINFO(1) )
  {
    QSerialPortInfo_new4();
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
#endif
}

HB_FUNC_STATIC( QSERIALPORTINFO_DELETE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

  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() );
#endif
}

/*
void swap(QSerialPortInfo &other)
*/
HB_FUNC_STATIC( QSERIALPORTINFO_SWAP )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

  if( obj )
  {
#ifndef QT5XHB_DONT_CHECK_PARAMETERS
    if( ISNUMPAR(1) && ISQSERIALPORTINFO(1) )
    {
#endif
      obj->swap ( *PQSERIALPORTINFO(1) );
#ifndef QT5XHB_DONT_CHECK_PARAMETERS
    }
    else
    {
      hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
    }
#endif
  }

  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
QString portName() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_PORTNAME )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
QString systemLocation() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_SYSTEMLOCATION )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
QString description() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_DESCRIPTION )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
QString manufacturer() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_MANUFACTURER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
quint16 vendorIdentifier() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_VENDORIDENTIFIER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
quint16 productIdentifier() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_PRODUCTIDENTIFIER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool hasVendorIdentifier() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_HASVENDORIDENTIFIER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool hasProductIdentifier() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_HASPRODUCTIDENTIFIER )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool isNull() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_ISNULL )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool isBusy() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_ISBUSY )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
bool isValid() const
*/
HB_FUNC_STATIC( QSERIALPORTINFO_ISVALID )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  QSerialPortInfo * obj = (QSerialPortInfo *) _qt5xhb_itemGetPtrStackSelfItem();

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

/*
static QList<qint32> standardBaudRates()
*/
HB_FUNC_STATIC( QSERIALPORTINFO_STANDARDBAUDRATES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
    if( ISNUMPAR(0) )
  {
      QList<qint32> list = QSerialPortInfo::standardBaudRates ();
      _qt5xhb_convert_qlist_qint32_to_array ( list );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
#endif
}

/*
static QList<QSerialPortInfo> availablePorts()
*/
HB_FUNC_STATIC( QSERIALPORTINFO_AVAILABLEPORTS )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
    if( ISNUMPAR(0) )
  {
      QList<QSerialPortInfo> list = QSerialPortInfo::availablePorts ();
      PHB_DYNS pDynSym = hb_dynsymFindName( "QSERIALPORTINFO" );
      PHB_ITEM pArray = hb_itemArrayNew(0);
      int i;
      for(i=0;i<list.count();i++)
      {
        if( pDynSym )
        {
          hb_vmPushDynSym( pDynSym );
          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, (QSerialPortInfo *) new QSerialPortInfo ( 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 );
        }
        else
        {
          hb_errRT_BASE( EG_NOFUNC, 1001, NULL, "QSERIALPORTINFO", HB_ERR_ARGS_BASEPARAMS );
        }
      }
      hb_itemReturnRelease(pArray);
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
#endif
}

HB_FUNC_STATIC( QSERIALPORTINFO_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 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }

  hb_itemReturn( self );
}

HB_FUNC_STATIC( QSERIALPORTINFO_NEWFROMOBJECT )
{
  HB_FUNC_EXEC( QSERIALPORTINFO_NEWFROM );
}

HB_FUNC_STATIC( QSERIALPORTINFO_NEWFROMPOINTER )
{
  HB_FUNC_EXEC( QSERIALPORTINFO_NEWFROM );
}

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

HB_FUNC_STATIC( QSERIALPORTINFO_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 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }

  hb_itemReturn( self );
}

#pragma ENDDUMP


[Runtime] Updated doc for DefaultValueAttribute

//
// Copyright (c) XSharp B.V.  All Rights Reserved.
// Licensed under the Apache License, Version 2.0.
// See License.txt in the project root for license information.
//
BEGIN NAMESPACE XSharp.Internal

	///
	/// This class is used to mark IntPtr _DLL arguments with the actual type
	///
	[AttributeUsage(AttributeTargets.Parameter)];
	SEALED CLASS ActualTypeAttribute INHERIT Attribute
		PRIVATE INITONLY _value AS System.Type
		///The actual type of the parameter.
		PROPERTY @@Value AS System.Type GET _value
		///
		CONSTRUCTOR(@@Value AS System.Type)
			_value := @@Value

	END CLASS

	///
	/// This class exposes the namespace and globalclass in an assembly
	///
	[AttributeUsage(AttributeTargets.Assembly)];
	SEALED CLASS ClassLibraryAttribute INHERIT Attribute
		PRIVATE INITONLY _globalClassName AS STRING
		PRIVATE INITONLY _defaultNameSpace AS STRING
		///Name of the class where functions, defines and globals are stored.
		PROPERTY GlobalClassName AS STRING GET _globalClassName
        ///Default namespace of the assembly.
		PROPERTY DefaultNameSpace AS STRING GET _defaultNameSpace
		///
		CONSTRUCTOR(globalClassName AS STRING, defaultNameSpace AS STRING)
			_globalClassName := globalClassName
			_defaultNameSpace := defaultNameSpace

	END CLASS

	///
	/// This class documents the parameter names for methods and functions
	/// with Clipper calling convention
	///

	[AttributeUsage(AttributeTargets.Method|AttributeTargets.Constructor)];
	SEALED CLASS ClipperCallingConventionAttribute INHERIT Attribute
		PRIVATE INITONLY _parameterNames AS STRING[]
		///List of parameter names for the method or constructor
		PROPERTY ParameterNames AS STRING[] GET _parameterNames
		///
		CONSTRUCTOR(parameterNames AS STRING[])
			_parameterNames := parameterNames

	END CLASS

	///
	/// This class records the compiler version used to build an assembly
	///
	[AttributeUsage(AttributeTargets.Assembly)];
	SEALED CLASS CompilerVersionAttribute INHERIT Attribute
		PRIVATE INITONLY _version AS STRING
	    ///The version and dialect of the compiler that created the assembly.
		PROPERTY Version AS STRING GET _version

		///
		CONSTRUCTOR(version AS STRING)
			_version := version

	END CLASS

	///
	/// this class is used to mark default parameter values in the middle of a parameter list.
    ///
    /// <remarks>
    /// It is used when compiling in VO or Vulcan mode.
    /// And only for parameters that are followed by parameters without default value (because that is not supported by the .Net framework).

    /// The X# compiler will find this attribute at compile time and will insert its value into the argument list.
    /// </remarks>
	SEALED CLASS DefaultParameterValueAttribute INHERIT Attribute
		PRIVATE INITONLY _value AS OBJECT
		PRIVATE INITONLY _flag  AS INT
		/// Value of the default parameter
		PROPERTY @@Value AS OBJECT GET _value
        /// Flag indicating the type of the default parameter
        /// <remarks>
        /// <list type="table">
        /// <listheader>
        /// <term>Value</term>
        /// <description>Description</description>
        /// </listheader>
	    /// <item><term>0</term><description>Regular .Net default value</description></item>
	    /// <item><term>1</term><description>NIL</description></item>
	    /// <item><term>2</term><description>Date (value is LONG ticks, empty for NULL_DATE)</description></item>
	    /// <item><term>3</term><description>Symbol, value can be empty or a string</description></item>
	    /// <item><term>4</term><description>PSZ, null = empty, or a string</description></item>
	    /// <item><term>5</term><description>IntPtr (can be 0 for NullPtr)</description></item>
        /// <item><term>6</term><description>Decimal (stored as string without 'm' suffix)</description></item>
        /// </list>
	    /// </remarks>
		PROPERTY Flag  AS INT    GET _flag

		///
		CONSTRUCTOR(oValue AS OBJECT, flag AS INT)
			_value := oValue
			_flag  := flag

	END CLASS

	///
	/// This class is used to describe VOSTRUCT and UNION structures which have a different semantics
	/// AS actually means Struct PTR. IS means Struct
	/// Please note that the size assumes x86 (32 bits) OS.
	///
	[AttributeUsage(AttributeTargets.Struct)];
	SEALED CLASS VoStructAttribute INHERIT Attribute
		PRIVATE _size				AS INT
		PRIVATE _largestMemberSize  AS INT
		///Total size of the VOSTRUCT or UNION.
		PROPERTY Size				AS INT GET _size
        ///Size of the largest member.
		PROPERTY LargestMemberSize	AS INT GET _largestMemberSize

		///
		CONSTRUCTOR(size AS INT, largestMemberSize AS INT)
			_size := size
			_largestMemberSize := largestMemberSize

	END CLASS

	///
	/// This class is used to describe fields that have been declared with the INSTANCE modifier
    ///
	[AttributeUsage(AttributeTargets.Field)];
	SEALED CLASS IsInstanceAttribute INHERIT Attribute

		///
		CONSTRUCTOR()
			SUPER()
			RETURN

	END CLASS

    ///
	/// This class is used to mark type that allow LateBound calls without the need of the /lb compiler option
	///
	[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct)];
	SEALED CLASS AllowLateBindingAttribute INHERIT Attribute
		CONSTRUCTOR()
			SUPER()

	END CLASS

    ///
	/// This class is used to mark methods, properties etc. that want access to Local Variables by name.
	///
    /// <remarks>
    /// In FoxPro several built-in functions have access to locals "by name". We can't do that because it violates
    /// the normal rules of encapsulation. However we can "emulate" this behavior by adding this attribute to a function or
    /// method that wants access to locals.
    /// At runtime we will then populate a table in the runtime with the names and values of local variables
	/// And we can access this table with the normal MemVarGet() and MemVarPut() functions.
    /// </remarks>
    /// <seealso cref="O:XSharp.RT.Functions.Type" />
    /// <seealso cref="O:XSharp.RT.Functions.MExec" />
    /// <seealso cref="O:XSharp.RT.Functions.Evaluate" />
    /// <seealso cref="O:XSharp.RT.Functions.StrEvaluate" />
    /// <seealso cref="O:XSharp.VFP.Functions.SqlExec" />
    /// <seealso cref="O:XSharp.VFP.Functions.SqlPrepare" />
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor) ];
	SEALED CLASS NeedsAccessToLocalsAttribute INHERIT Attribute
        PRIVATE _writesToLocals := FALSE AS LOGIC
        PROPERTY WritesToLocals AS LOGIC GET _writesToLocals
		///
		CONSTRUCTOR(lWrites AS LOGIC)
            _writesToLocals := lWrites

	END CLASS

    ///
	/// This class is used to mark a class and indicate that the property types and or parameter types in this class were changed.
    /// When the compiler detects that a subclass does not have the right parameter or property types then the subclass will be automatically
    /// adjusted to preserved the types from the parent class.
	///
    [AttributeUsage(AttributeTargets.Class) ];
    SEALED CLASS TypesChangedAttribute INHERIT Attribute
		CONSTRUCTOR()
			SUPER()
	END CLASS

END NAMESPACE

BEGIN NAMESPACE XSharp
	///
	/// This class is used to tell the compiler that the assembly has types in a specific namespace.
    /// When the compiler is called with the /ins command line option, then the names specified with this attribute
    /// will be automatically included in the USING list when compiling.
    ///
    /// <remarks>
	/// This type is not in the internal namespace because it is supposed to be used by 3rd party vendors as well
	/// </remarks>
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple := true)];
	SEALED CLASS ImplicitNamespaceAttribute INHERIT Attribute
		PRIVATE INITONLY _namespace AS STRING
	    ///Name of the implicit namespace.
		PROPERTY Namespace AS STRING GET _namespace

		///
		CONSTRUCTOR(namespace AS STRING)
			_namespace := namespace

	END CLASS

END NAMESPACE

//
// Copyright (c) XSharp B.V.  All Rights Reserved.
// Licensed under the Apache License, Version 2.0.
// See License.txt in the project root for license information.
//
BEGIN NAMESPACE XSharp.Internal

	///
	/// This class is used to mark IntPtr _DLL arguments with the actual type
	///
	[AttributeUsage(AttributeTargets.Parameter)];
	SEALED CLASS ActualTypeAttribute INHERIT Attribute
		PRIVATE INITONLY _value AS System.Type
		///The actual type of the parameter.
		PROPERTY @@Value AS System.Type GET _value
		///
		CONSTRUCTOR(@@Value AS System.Type)
			_value := @@Value

	END CLASS

	///
	/// This class exposes the namespace and globalclass in an assembly
	///
	[AttributeUsage(AttributeTargets.Assembly)];
	SEALED CLASS ClassLibraryAttribute INHERIT Attribute
		PRIVATE INITONLY _globalClassName AS STRING
		PRIVATE INITONLY _defaultNameSpace AS STRING
		///Name of the class where functions, defines and globals are stored.
		PROPERTY GlobalClassName AS STRING GET _globalClassName
        ///Default namespace of the assembly.
		PROPERTY DefaultNameSpace AS STRING GET _defaultNameSpace
		///
		CONSTRUCTOR(globalClassName AS STRING, defaultNameSpace AS STRING)
			_globalClassName := globalClassName
			_defaultNameSpace := defaultNameSpace

	END CLASS

	///
	/// This class documents the parameter names for methods and functions
	/// with Clipper calling convention
	///

	[AttributeUsage(AttributeTargets.Method|AttributeTargets.Constructor)];
	SEALED CLASS ClipperCallingConventionAttribute INHERIT Attribute
		PRIVATE INITONLY _parameterNames AS STRING[]
		///List of parameter names for the method or constructor
		PROPERTY ParameterNames AS STRING[] GET _parameterNames
		///
		CONSTRUCTOR(parameterNames AS STRING[])
			_parameterNames := parameterNames

	END CLASS

	///
	/// This class records the compiler version used to build an assembly
	///
	[AttributeUsage(AttributeTargets.Assembly)];
	SEALED CLASS CompilerVersionAttribute INHERIT Attribute
		PRIVATE INITONLY _version AS STRING
	    ///The version and dialect of the compiler that created the assembly.
		PROPERTY Version AS STRING GET _version

		///
		CONSTRUCTOR(version AS STRING)
			_version := version

	END CLASS

	///
	/// this class is used to mark default parameter values in the middle of a parameter list.
    ///
    /// <remarks>
    /// It is used when compiling in VO or Vulcan mode.
    /// And only for parameters that are followed by parameters without default value (because that is not supported by the .Net framework).

    /// The X# compiler will find this attribute at compile time and will insert its value into the argument list.
    /// </remarks>
	SEALED CLASS DefaultParameterValueAttribute INHERIT Attribute
		PRIVATE INITONLY _value AS OBJECT
		PRIVATE INITONLY _flag  AS INT
		/// Value of the default parameter
		PROPERTY @@Value AS OBJECT GET _value
        /// Flag indicating the type of the default parameter
        /// <remarks>
	    /// 0 = Regular .Net default value
	    /// 1 = NIL
	    /// 2 = Date (value is LONG ticks, empty for NULL_DATE)
	    /// 3 = Symbol, value can be empty or a string
	    /// 4 = PSZ, null = empty, or a string
	    /// 5 = IntPtr (can be 0 for NullPtr)
	    /// </remarks>
		PROPERTY Flag  AS INT    GET _flag

		///
		CONSTRUCTOR(oValue AS OBJECT, flag AS INT)
			_value := oValue
			_flag  := flag

	END CLASS

	///
	/// This class is used to describe VOSTRUCT and UNION structures which have a different semantics
	/// AS actually means Struct PTR. IS means Struct
	/// Please note that the size assumes x86 (32 bits) OS.
	///
	[AttributeUsage(AttributeTargets.Struct)];
	SEALED CLASS VoStructAttribute INHERIT Attribute
		PRIVATE _size				AS INT
		PRIVATE _largestMemberSize  AS INT
		///Total size of the VOSTRUCT or UNION.
		PROPERTY Size				AS INT GET _size
        ///Size of the largest member.
		PROPERTY LargestMemberSize	AS INT GET _largestMemberSize

		///
		CONSTRUCTOR(size AS INT, largestMemberSize AS INT)
			_size := size
			_largestMemberSize := largestMemberSize

	END CLASS

	///
	/// This class is used to describe fields that have been declared with the INSTANCE modifier
    ///
	[AttributeUsage(AttributeTargets.Field)];
	SEALED CLASS IsInstanceAttribute INHERIT Attribute

		///
		CONSTRUCTOR()
			SUPER()
			RETURN

	END CLASS

    ///
	/// This class is used to mark type that allow LateBound calls without the need of the /lb compiler option
	///
	[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct)];
	SEALED CLASS AllowLateBindingAttribute INHERIT Attribute
		CONSTRUCTOR()
			SUPER()

	END CLASS

    ///
	/// This class is used to mark methods, properties etc. that want access to Local Variables by name.
	///
    /// <remarks>
    /// In FoxPro several built-in functions have access to locals "by name". We can't do that because it violates
    /// the normal rules of encapsulation. However we can "emulate" this behavior by adding this attribute to a function or
    /// method that wants access to locals.
    /// At runtime we will then populate a table in the runtime with the names and values of local variables
	/// And we can access this table with the normal MemVarGet() and MemVarPut() functions.
    /// </remarks>
    /// <seealso cref="O:XSharp.RT.Functions.Type" />
    /// <seealso cref="O:XSharp.RT.Functions.MExec" />
    /// <seealso cref="O:XSharp.RT.Functions.Evaluate" />
    /// <seealso cref="O:XSharp.RT.Functions.StrEvaluate" />
    /// <seealso cref="O:XSharp.VFP.Functions.SqlExec" />
    /// <seealso cref="O:XSharp.VFP.Functions.SqlPrepare" />
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor) ];
	SEALED CLASS NeedsAccessToLocalsAttribute INHERIT Attribute
        PRIVATE _writesToLocals := FALSE AS LOGIC
        PROPERTY WritesToLocals AS LOGIC GET _writesToLocals
		///
		CONSTRUCTOR(lWrites AS LOGIC)
            _writesToLocals := lWrites

	END CLASS

    ///
	/// This class is used to mark a class and indicate that the property types and or parameter types in this class were changed.
    /// When the compiler detects that a subclass does not have the right parameter or property types then the subclass will be automatically
    /// adjusted to preserved the types from the parent class.
	///
    [AttributeUsage(AttributeTargets.Class) ];
    SEALED CLASS TypesChangedAttribute INHERIT Attribute
		CONSTRUCTOR()
			SUPER()
	END CLASS

END NAMESPACE

BEGIN NAMESPACE XSharp
	///
	/// This class is used to tell the compiler that the assembly has types in a specific namespace.
    /// When the compiler is called with the /ins command line option, then the names specified with this attribute
    /// will be automatically included in the USING list when compiling.
    ///
    /// <remarks>
	/// This type is not in the internal namespace because it is supposed to be used by 3rd party vendors as well
	/// </remarks>
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple := true)];
	SEALED CLASS ImplicitNamespaceAttribute INHERIT Attribute
		PRIVATE INITONLY _namespace AS STRING
	    ///Name of the implicit namespace.
		PROPERTY Namespace AS STRING GET _namespace

		///
		CONSTRUCTOR(namespace AS STRING)
			_namespace := namespace

	END CLASS

END NAMESPACE