Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXObject.h File Reference

Go to the source code of this file.

Namespaces

namespace  FX

Defines

#define FXDECLARE(classname)
#define FXIMPLEMENT(classname, baseclassname, mapping, nmappings)
#define FXDECLARE_ABSTRACT(classname)
#define FXIMPLEMENT_ABSTRACT(classname, baseclassname, mapping, nmappings)
#define FXMETACLASS(classname)   (&classname::metaClass)
#define FXDEFMAP(classname)   static const classname::FXMapEntry
#define FXMAPTYPES(typelo, typehi, func)   {MKUINT(MINKEY,typelo),MKUINT(MAXKEY,typehi),&func}
#define FXMAPTYPE(type, func)   {MKUINT(MINKEY,type),MKUINT(MAXKEY,type),&func}
#define FXMAPFUNCS(type, keylo, keyhi, func)   {MKUINT(keylo,type),MKUINT(keyhi,type),&func}
#define FXMAPFUNC(type, key, func)   {MKUINT(key,type),MKUINT(key,type),&func}

Typedefs

typedef FXuint FXSelector

Enumerations

enum  {
  MINKEY = 0,
  MAXKEY = 65535
}
enum  {
  MINTYPE = 0,
  MAXTYPE = 65535
}


Define Documentation

#define FXDECLARE classname   ) 
 

Value:

public: \
   struct FXMapEntry { FX::FXSelector keylo; FX::FXSelector keyhi; long (classname::* func)(FX::FXObject*,FX::FXSelector,void*); }; \
   static const FX::FXMetaClass metaClass; \
   static FX::FXObject* manufacture(); \
   virtual long handle(FX::FXObject* sender,FX::FXSelector sel,void* ptr); \
   virtual const FX::FXMetaClass* getMetaClass() const { return &metaClass; } \
   friend FX::FXStream& operator<<(FX::FXStream& store,const classname* obj){return store.saveObject((FX::FXObjectPtr)(obj));} \
   friend FX::FXStream& operator>>(FX::FXStream& store,classname*& obj){return store.loadObject((FX::FXObjectPtr&)(obj));} \
Macro to set up class declaration.

#define FXIMPLEMENT classname,
baseclassname,
mapping,
nmappings   ) 
 

Value:

FX::FXObject* classname::manufacture(){return new classname;} \
  const FX::FXMetaClass classname::metaClass(#classname,classname::manufacture,&baseclassname::metaClass,mapping,nmappings,sizeof(classname::FXMapEntry)); \
  long classname::handle(FX::FXObject* sender,FX::FXSelector sel,void* ptr){ \
    const FXMapEntry* me=(const FXMapEntry*)metaClass.search(sel); \
    return me ? (this->* me->func)(sender,sel,ptr) : baseclassname::handle(sender,sel,ptr); \
    }
Macro to set up class implementation.

#define FXDECLARE_ABSTRACT classname   ) 
 

Value:

public: \
   struct FXMapEntry { FX::FXSelector keylo; FX::FXSelector keyhi; long (classname::* func)(FX::FXObject*,FX::FXSelector,void*); }; \
   static const FX::FXMetaClass metaClass; \
   virtual long handle(FX::FXObject* sender,FX::FXSelector sel,void* ptr); \
   virtual const FX::FXMetaClass* getMetaClass() const { return &metaClass; } \
   friend FX::FXStream& operator<<(FX::FXStream& store,const classname* obj){return store.saveObject((FX::FXObjectPtr)(obj));} \
   friend FX::FXStream& operator>>(FX::FXStream& store,classname*& obj){return store.loadObject((FX::FXObjectPtr&)(obj));} \
Macro to set up abstract class declaration.

#define FXIMPLEMENT_ABSTRACT classname,
baseclassname,
mapping,
nmappings   ) 
 

Value:

const FX::FXMetaClass classname::metaClass(#classname,NULL,&baseclassname::metaClass,mapping,nmappings,sizeof(classname::FXMapEntry)); \
  long classname::handle(FX::FXObject* sender,FX::FXSelector sel,void* ptr){ \
    const FXMapEntry* me=(const FXMapEntry*)metaClass.search(sel); \
    return me ? (this->* me->func)(sender,sel,ptr) : baseclassname::handle(sender,sel,ptr); \
    }
Macro to set up abstract class implementation.

#define FXMETACLASS classname   )     (&classname::metaClass)
 

MetaClass of a class.

#define FXDEFMAP classname   )     static const classname::FXMapEntry
 

Set up map type.

#define FXMAPTYPES typelo,
typehi,
func   )     {MKUINT(MINKEY,typelo),MKUINT(MAXKEY,typehi),&func}
 

Define range of function types.

#define FXMAPTYPE type,
func   )     {MKUINT(MINKEY,type),MKUINT(MAXKEY,type),&func}
 

Define range of function types.

#define FXMAPFUNCS type,
keylo,
keyhi,
func   )     {MKUINT(keylo,type),MKUINT(keyhi,type),&func}
 

Define range of functions.

#define FXMAPFUNC type,
key,
func   )     {MKUINT(key,type),MKUINT(key,type),&func}
 

Define one function.


Typedef Documentation

typedef FXuint FX::FXSelector
 

Association key.

Copyright © 1997-2005 Jeroen van der Zijp