home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 Mobile
/
Chip_Mobile_2001.iso
/
palm
/
business
/
printcar
/
printcar.exe
/
src
/
UI
/
ConcreteFormObject.h
< prev
next >
Wrap
C/C++ Source or Header
|
2000-06-03
|
974b
|
46 lines
//
// $Id: ConcreteFormObject.h,v 1.1.1.1 2000/06/02 22:22:59 sergey Exp $
//
#ifndef _ConcreteFormObject_h_
#define _ConcreteFormObject_h_
#include "FormObject.h"
#include "Form.h"
namespace UI
{
//
// Concrete FormObject template class
//
template <typename P, FormObjectKind K>
class ConcreteFormObject: public FormObject
{
public:
ConcreteFormObject(Form& parent, Word objectID):
FormObject(parent, objectID),
_objectPtr(0)
{}
// attributes
P objectPtr() const;
// data members
private:
mutable P _objectPtr;
};
template <typename P, FormObjectKind K>
P ConcreteFormObject<P,K>::objectPtr() const
{
if (_objectPtr == 0)
_objectPtr = reinterpret_cast<P>(parent().getGenericObjectPtr(K, objectID()));
return _objectPtr;
}
}
// namespace UI
#endif // _ConcreteFormObject_h_