home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
WRESID.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-12-12
|
3KB
|
106 lines
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (C) 1994, by WATCOM International Inc. All rights %
% reserved. No part of this software may be reproduced or %
% used in any form or by any means - graphic, electronic or %
% mechanical, including photocopying, recording, taping or %
% information storage and retrieval systems - except with the %
% written permission of WATCOM International Inc. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
/*************************************************************************
*
* WResourceID --
*
*************************************************************************/
#ifndef _WRESID_HPP_INCLUDED
#define _WRESID_HPP_INCLUDED
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,8);
#pragma enum int;
#endif
#ifndef _WOBJECT_HPP_INCLUDED
# include "wobject.hpp"
#endif
#ifndef _WARRAY_HPP_INCLUDED
# include "warray.hpp"
#endif
class WCMCLASS WResourceID : public WObject {
WDeclareSubclass( WResourceID, WObject );
public:
/*********************************************************
* Constructors and destructors
*********************************************************/
WResourceID( WInt id=0 );
WResourceID( const WChar *nm );
WResourceID( const WResourceID & id );
~WResourceID();
/*********************************************************
* Properties
*********************************************************/
// ID
const WChar * GetID() const { return _resID; }
// IDAsInt
WInt GetIDAsInt() const { return (WInt) _resID; }
/*********************************************************
* Methods
*********************************************************/
// Clear
void Clear();
// Create
WBool Create( WInt number );
WBool Create( const WChar *name );
WBool Create( const WResourceID & id );
/*********************************************************
* Operators
*********************************************************/
WResourceID & operator=( const WResourceID & resId )
{ Create( resId ); return *this; }
WResourceID & operator=( const WInt id )
{ Create( id ); return *this; }
WResourceID & operator=( const WChar * name )
{ Create( name ); return *this; }
operator WInt() const { return GetIDAsInt(); }
/*********************************************************
* Data members
*********************************************************/
private:
WChar *_resID;
};
extern template WArrayReference<WResourceID>;
extern template WArray<WResourceID>;
typedef WArray<WResourceID> WResourceIDArray;
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif // _WRESID_HPP_INCLUDED