Header File
<owl/property.h>
Simple type Property templates
TProperty<T>
-
Read/write property that holds a simple type: int, char, pointer.
TConstProperty<T> - Read property that holds a
simple type: int, char, pointer.
Object Property templates
TObjProperty<T>
-
Read/write property that own pointer into class instance.
TConstObjProperty<T> - Read property that holds
pointer into class instance.
Simple type Aray Property templates
TArrayProperty<T,I>
-
Read/write property that holds aray of simple type: int, char, pointer.
TConstArrayProperty<T,I> - Read property that
holds aray of simple type: int, char, pointer.
Object Aray Property templates
TConstObjArrayProperty<T,I> - Read property
that holds pointer into array of class instances.
Simple Functor Property templates
TFuncProperty<T>
- Read/write property that uses functors to get/set simple type.
TFuncPropertyGet<T> -
Write only property that uses functors to set simple type.
TFuncPropertyPut<T> -
Read/write property that uses functors to get/set simple type.
TFuncPropertyVarPut<T> - Read/write
property that holds aray of simple type: int, char, pointer.
Object Functor Property templates
TFuncObjProperty<T>
- Read/write property that uses functors to get/set class instance.
TFuncObjPropertyGet<T> -
Read only property that uses functors to get class instance.
TFuncObjPropertyPut<T> -
Write only property that uses functors to set class instance.
TFuncObjPropertyVarPut<T> - Read/write property
that uses functors to set class instance, and reference to variable to get it..
Simple Functor Index Property templates
TFuncPropertyIdxGet<T,index> - Read only
property that uses functors with index to get simple type.
TFuncPropertyIdxPut<T,index> - Write only
property that uses functors with index to set simple type.
TFuncPropertyIdx<T,index> -
Read/write property that uses functors with index to get/set simple
type.
Object Functor Index Property templates
TFuncObjPropertyIdxGet<T,index> - Read only
property that uses functors with index to get class type.
TFuncObjPropertyIdxPut<T,index> - Write
only property that uses functors with index to set class type.
TFuncObjPropertyIdx<T,index> -
Read/write property that uses functors with index to get/set class
type.
MACROS
GETFUNCTOR(T,func) - Creates TFunctor
instance for function, for using with TFuncPropertyGet and TFuncProperty.
PUTFUNCTOR(T,func) - Creates TFunctor
instance for function, for using with TFuncPropertyPut and TFuncProperty,
TFuncPropertyVarPut.
GETPUTFUNCTOR(T,funcGet,funcPut) - Creates two TFunctor instances for function, for using
with TFuncProperty.
//
GETOBJFUNCTOR(T,func) - Creates TFunctor instance for function, for using with
TFuncObjPropertyGet and TFuncObjProperty.
PUTOBJFUNCTOR(T,func) - Creates TFunctor instance for function, for using with
TFuncObjPropertyPut and TFuncObjProperty, TFuncObjPropertyVarPut.
GETPUTOBJFUNCTOR(T,funcGet,funcPut) - Creates two TFunctor instances for function, for
using with TFuncObjProperty.
//
GETMFUNCTOR(T,type,memberFunc) - Creates TFunctor instance for
member function, for using with TFuncPropertyGet and TFuncProperty.
PUTMFUNCTOR(T,type,memberFunc) - Creates TFunctor instance for
member function, for using with TFuncPropertyPut and TFuncProperty, TFuncPropertyVarPut.
GETPUTMFUNCTOR(T,type,memberGet,memberPut) - Creates two TFunctor instances for member
function, for using with TFuncProperty.
GETOBJMFUNCTOR(T,type,memberFunc) - Creates TFunctor instance for
member function, for using with TFuncObjPropertyGet and TFuncObjProperty.
PUTOBJMFUNCTOR(T,type,memberFunc) - Creates TFunctor instance for
member function, for using with TFuncPropertyPut and TFuncObjProperty,
TFuncObjPropertyVarPut.
GETPUTOBJMFUNCTOR(T,type,memberGet,memberPut) - Creates two TFunctor instances for member
function, for using with TFuncObjProperty.
//
IDXGETFUNCTOR(T,func)
IDXPUTFUNCTOR(T,func)
IDXGETPUTFUNCTOR(T,funcGet,funcPut)
IDXGETPUTOBJFUNCTOR(T,funcGet,funcPut)
//
IDXGETMFUNCTOR(T,type,memberFunc)
IDXPUTMFUNCTOR(T,type,memberFunc)
IDXGETPUTMFUNCTOR(T,type,memberGet,memberPut)
IDXGETPUTOBJMFUNCTOR(T,type,memberGet,memberPut)
/////////
Using example you can see in TBarDescr and TDecoratedFrame, You can read about
them in books by Ted Neward: "Advanced OWL 5.0 : Power Tools for OWL
Programmers" and "Core OWL 5.0 : OWL Internals for Advanced"
Templates TProperty<T> and TConstProperty<T> from OWL Ext library, others
templates written by me.
Using:
class TCar{
public:
TProperty<int>
Speed;
void Run(){....}
};
class TPicture{
public:
TObjProperty<TDib> Picture;
};
main()
{
TCar car1,car2;
car1.Speed = 5;
car2.Speed = car1.Speed;
int curSpedd = car1.Speed;
TPicture pic;
pic.Picture = new TDib(...);
TDib* DibPtr = pic.Picture;
}