home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / WOLEPARM.HPP < prev    next >
C/C++ Source or Header  |  1996-10-18  |  3KB  |  101 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1994, by WATCOM International Inc.  All rights    %
  3.    %     reserved.  No part of this software may be reproduced or        %
  4.    %     used in any form or by any means - graphic, electronic or       %
  5.    %     mechanical, including photocopying, recording, taping or        %
  6.    %     information storage and retrieval systems - except with the     %
  7.    %     written permission of WATCOM International Inc.                 %
  8.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. */
  10.  
  11. #ifndef _WOLEPARM_HPP_INCLUDED
  12. #define _WOLEPARM_HPP_INCLUDED
  13.  
  14. #ifndef _WNO_PRAGMA_PUSH
  15. #pragma pack(push,8);
  16. #pragma enum int;
  17. #endif
  18.  
  19. #ifndef _WOLEAUTO_HPP_INCLUDED
  20. #   include "woleauto.hpp"
  21. #endif
  22. #ifndef _WSTRING_HPP_INCLUDED
  23. #   include "wstring.hpp"
  24. #endif
  25.  
  26. #define WOLE_NUM_POSITIONAL     32
  27. #define WOLE_NUM_NAMED          16
  28.  
  29. class WCMCLASS WOleParmList {
  30.  
  31.     public:
  32.  
  33.         /**********************************************************
  34.          * Constructors and Destructors
  35.          *********************************************************/
  36.  
  37.         WOleParmList( void );
  38.         WOleParmList( const WOleParmList & parmList );
  39.  
  40.         virtual ~WOleParmList();
  41.  
  42.     public:
  43.  
  44.         /**************************************************************
  45.          * Properties
  46.          **************************************************************/
  47.  
  48.         // ParmCount
  49.         WBool SetParmCount( WInt count );
  50.         WInt GetParmCount() const;
  51.  
  52.         WUInt GetNumPositional( void ) const;
  53.         WUInt GetNumNamed( void ) const;
  54.         WVariant * const GetPositionalParams( void ) const;
  55.         WVariant * const GetNamedParams( void ) const;
  56.         const WString * const GetNames( void ) const;
  57.  
  58.         /**************************************************************
  59.          * Methods
  60.          **************************************************************/
  61.  
  62.         WBool Add( const WString & name, const WVariant & parm );
  63.         WBool Add( const WUInt pos, const WVariant & parm );
  64.  
  65.         /**************************************************************
  66.          * Internal Methods
  67.          **************************************************************/
  68.  
  69.     protected:
  70.         WBool expandVList( WVariant * & src, WUInt & srcCount, WUInt min );
  71.         WBool expandNames( WUInt newCount, WUInt oldCount );
  72.         WBool expandPositional( WUInt min );
  73.         WBool expandNamed( WUInt count );
  74.  
  75.     /**********************************************************
  76.      * Data Members
  77.      *********************************************************/
  78.     
  79.     protected:
  80.         WUInt           _numPositionalParms;
  81.         WUInt           _numNamedParms;
  82.  
  83.         WVariant        *_positionalParms;
  84.         WUInt           _positionalCount;
  85.  
  86.         WVariant        *_namedParms;
  87.         WString         *_names;
  88.         WUInt           _namedCount;
  89.  
  90.         WInt            _parmCount;
  91.  
  92. };
  93.  
  94. #ifndef _WNO_PRAGMA_PUSH
  95. #pragma enum pop;
  96. #pragma pack(pop);
  97. #endif
  98.  
  99.  
  100. #endif // _WOLEPARM_HPP_INCLUDED
  101.