Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

preproc.h File Reference

One of the original POLiTe header files. More...

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Defines

#define CLASS(X)
#define ABSTRACT_CLASS(X)
#define PARENTS(X)   public: static const char* ParentClassNames() {return X;}
#define FROM(X)   public: static const char *From() {return X;}
#define WHERE(X)   public: static const char *Where() {return X;}
#define GROUP_BY(X)   public: static const char *GroupBy() {return X;}
#define HAVING(X)   public: static const char *Having() {return X;}
#define ORDER_BY(X)   public: static const char *OrderBy() {return X;}
#define CLASS_PROTOTYPE(T)
#define ABSTRACT_CLASS_PROTOTYPE(T)   extern Proto<T> T##_class
#define PROTOTYPE(T)   Proto<T> T##_class;
#define TYPE_INT   'i'
#define TYPE_UNSIGNED   'u'
#define TYPE_FLOAT   'f'
#define TYPE_CHAR   'c'
#define TYPE_STRING   's'
#define TYPE_PTR   'p'
#define TYPE_UNKNOWN   '?'
#define TYPE_DOUBLE   'd'
#define TYPE_LONG   'l'
#define dbMember(T, X)
#define dbString(X)
#define dbPtr(T, X)
#define dbShort(X)   dbMember(short,X)
#define dbUShort(X)   dbMember(unsigned short,X)
#define dbInt(X)   dbMember(int,X)
#define dbUInt(X)   dbMember(unsigned int,X)
#define dbLong(X)   dbMember(long,X)
#define dbULong(X)   dbMember(unsigned long,X)
#define dbFloat(X)   dbMember(float,X)
#define dbDouble(X)   dbMember(double,X)
#define dbChar(X)   dbMember(char,X)
#define dbBool(X)   dbMember(bool,X)
#define dbMemberRO(T, X)
#define dbStringRO(X)
#define dbPtrRO(T, X)
#define dbShortRO(X)   dbMemberRO(short,X)
#define dbUShortRO(X)   dbMemberRO(unsigned short,X)
#define dbIntRO(X)   dbMemberRO(int,X)
#define dbUIntRO(X)   dbMemberRO(unsigned int,X)
#define dbLongRO(X)   dbMemberRO(long,X)
#define dbULongRO(X)   dbMemberRO(unsigned long,X)
#define dbFloatRO(X)   dbMemberRO(float,X)
#define dbDoubleRO(X)   dbMemberRO(double,X)
#define dbCharRO(X)   dbMemberRO(char,X)
#define dbBoolRO(X)   dbMemberRO(bool,X)
#define MAPKEY_BEGIN
#define MAPKEY_END
#define MAP_BEGIN
#define MAP_END
#define mapMember(A, M, C, T, N)   if (!i--) {attr=A; mem=(unsigned char Object::*)&_THiS_CLaSS_::M; col=C; type=T; len=N; rw=true; return;};
#define mapString(A, C, N)   mapMember(#A,_##A,C,TYPE_STRING,N)
#define mapPtr(A, C)   mapMember(#A,_##A,C,TYPE_PTR,sizeof(long int))
#define mapShort(A, C)   mapMember(#A,_##A,C,TYPE_INT,sizeof(short int))
#define mapUShort(A, C)   mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned short))
#define mapInt(A, C)   mapMember(#A,_##A,C,TYPE_INT,sizeof(int))
#define mapUInt(A, C)   mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned int))
#define mapLong(A, C)   mapMember(#A,_##A,C,TYPE_INT,sizeof(long int))
#define mapULong(A, C)   mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned long))
#define mapFloat(A, C)   mapMember(#A,_##A,C,TYPE_FLOAT,sizeof(float))
#define mapDouble(A, C)   mapMember(#A,_##A,C,TYPE_FLOAT,sizeof(double))
#define mapChar(A, C)   mapMember(#A,_##A,C,TYPE_CHAR,sizeof(char))
#define mapBool(A, C)   mapMember(#A,_##A,C,TYPE_INT,sizeof(bool))
#define mapMemberRO(A, M, C, T, N)   if (!i--) {attr=A; mem=(unsigned char Object::*)&(_THiS_CLaSS_::M); col=C; type=T; len=N; rw=false; return;};
#define mapStringRO(A, C, N)   mapMember(#A,_##A,C,TYPE_STRING,N)
#define mapPtrRO(A, C)   mapMember(#A,_##A,C,TYPE_PTR,sizeof(long int))
#define mapShortRO(A, C)   mapMember(#A,_##A,C,TYPE_INT,sizeof(short int))
#define mapUShortRO(A, C)   mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned short))
#define mapIntRO(A, C)   mapMember(#A,_##A,C,TYPE_INT,sizeof(int))
#define mapUIntRO(A, C)   mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned int))
#define mapLongRO(A, C)   mapMember(#A,_##A,C,TYPE_INT,sizeof(long int))
#define mapULongRO(A, C)   mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned long))
#define mapFloatRO(A, C)   mapMember(#A,_##A,C,TYPE_FLOAT,sizeof(float))
#define mapDoubleRO(A, C)   mapMember(#A,_##A,C,TYPE_FLOAT,sizeof(double))
#define mapCharRO(A, C)   mapMember(#A,_##A,C,TYPE_CHAR,sizeof(char))
#define mapBoolRO(A, C)   mapMember(#A,_##A,C,TYPE_INT,sizeof(bool))

Detailed Description

One of the original POLiTe header files.

Author:
Mgr. Michal Kopecky Ph.D.

Define Documentation

#define CLASS  ) 
 

Value:

friend class Proto<X>; \
  protected: typedef X _THiS_CLaSS_; \
  public: static const char *ClassName() {return #X;}; \
  protected: static Object *_New() {return new X;}; \
  public: Ref<X> operator &() \
  { \
    if (IsPersistent()) \
      return Ref<X>(Connection(),Prototype(),_KeyValues(),_Strategies); \
    else \
      return Ref<X>(this); \
  }; \
  public: virtual class ProtoBase *Prototype() const

#define ABSTRACT_CLASS  ) 
 

Value:

friend class Proto<X>; \
  protected: typedef X _THiS_CLaSS_; \
  public: static const char *ClassName() {return #X;}; \
  protected: static Object *_New() {return NULL;}; \
  public: Ref<X> operator &() \
  { \
    if (IsPersistent()) \
      return  Ref<X>(Connection(),Prototype(),_KeyValues(),_Strategies); \
    else \
      return Ref<X>(this); \
  }; \
  public: virtual class ProtoBase *Prototype() const = 0

#define PARENTS  )     public: static const char* ParentClassNames() {return X;}
 

#define FROM  )     public: static const char *From() {return X;}
 

#define WHERE  )     public: static const char *Where() {return X;}
 

#define GROUP_BY  )     public: static const char *GroupBy() {return X;}
 

#define HAVING  )     public: static const char *Having() {return X;}
 

#define ORDER_BY  )     public: static const char *OrderBy() {return X;}
 

#define CLASS_PROTOTYPE  ) 
 

Value:

extern Proto<T> T##_class; \
  class ProtoBase *T::Prototype() const {return (ProtoBase *)&T##_class;}

#define ABSTRACT_CLASS_PROTOTYPE  )     extern Proto<T> T##_class
 

#define PROTOTYPE  )     Proto<T> T##_class;
 

#define TYPE_INT   'i'
 

#define TYPE_UNSIGNED   'u'
 

#define TYPE_FLOAT   'f'
 

#define TYPE_CHAR   'c'
 

#define TYPE_STRING   's'
 

#define TYPE_PTR   'p'
 

#define TYPE_UNKNOWN   '?'
 

#define TYPE_DOUBLE   'd'
 

#define TYPE_LONG   'l'
 

#define dbMember T,
 ) 
 

Value:

protected: T _##X; \
  public: T X() const {return _##X;}; \
  public: void X(const T X##_) {_##X=X##_; MarkAsDirty();}

#define dbString  ) 
 

Value:

protected: char * _##X; \
  public: char * X() const {return _##X;}; \
  public: void X(const char * X##_) {StrCpy(_##X,X##_); MarkAsDirty();}

#define dbPtr T,
 ) 
 

Value:

protected: long int _##X; \
  public: Ref<T> X() const \
  { \
    if (IsPersistent()) \
      if (_##X>0) \
      { \
        Ref<T> t(Connection(),_##X); \
        return _Virtualise(t); \
      } \
      else \
        return DBNULL; \
    else \
      return DBNULL; \
  } \
  public: void X(const Ref<T> &X##_) \
  { \
    if (X##_==DBNULL) _##X=0; else sscanf(_SelectKeyValues(X##_),"%li",&_##X); \
    MarkAsDirty(); \
  }

#define dbShort  )     dbMember(short,X)
 

#define dbUShort  )     dbMember(unsigned short,X)
 

#define dbInt  )     dbMember(int,X)
 

#define dbUInt  )     dbMember(unsigned int,X)
 

#define dbLong  )     dbMember(long,X)
 

#define dbULong  )     dbMember(unsigned long,X)
 

#define dbFloat  )     dbMember(float,X)
 

#define dbDouble  )     dbMember(double,X)
 

#define dbChar  )     dbMember(char,X)
 

#define dbBool  )     dbMember(bool,X)
 

#define dbMemberRO T,
 ) 
 

Value:

protected: T _##X; \
  public: T X() const {return _##X;}

#define dbStringRO  ) 
 

Value:

protected: char * _##X; \
  public: char * X() const {return _##X;}

#define dbPtrRO T,
 ) 
 

Value:

protected: long int _##X; \
  public: Ref<T> X() const \
  { \
    return IsPersistent() ? _##X>0 ? _Virtualise(Ref<T>(Connection(),_##X,Class[#T])) : DBNULL : DBNULL; \
  }

#define dbShortRO  )     dbMemberRO(short,X)
 

#define dbUShortRO  )     dbMemberRO(unsigned short,X)
 

#define dbIntRO  )     dbMemberRO(int,X)
 

#define dbUIntRO  )     dbMemberRO(unsigned int,X)
 

#define dbLongRO  )     dbMemberRO(long,X)
 

#define dbULongRO  )     dbMemberRO(unsigned long,X)
 

#define dbFloatRO  )     dbMemberRO(float,X)
 

#define dbDoubleRO  )     dbMemberRO(double,X)
 

#define dbCharRO  )     dbMemberRO(char,X)
 

#define dbBoolRO  )     dbMemberRO(bool,X)
 

#define MAPKEY_BEGIN
 

Value:

public: static void MapKey(int i, const char *&attr, unsigned char Object::*&mem, const char *&col, char &type, unsigned int &len, bool &rw) { \
    rw = true; \
    if (i<0) {attr=NULL; col=NULL; type=TYPE_UNKNOWN; len=0; return;};

#define MAPKEY_END
 

Value:

attr=NULL; col=NULL; type=TYPE_UNKNOWN; len=0; \
}

#define MAP_BEGIN
 

Value:

public: static void Map(int i, const char *&attr, unsigned char Object::*&mem, const char *&col, char &type, unsigned int &len, bool &rw) { \
    if (i<0) {attr=NULL; col=NULL; type=TYPE_UNKNOWN; len=0; rw=false; return;};

#define MAP_END
 

Value:

attr=NULL; col=NULL; type=TYPE_UNKNOWN; len=0; rw=false; \
}

#define mapMember A,
M,
C,
T,
 )     if (!i--) {attr=A; mem=(unsigned char Object::*)&_THiS_CLaSS_::M; col=C; type=T; len=N; rw=true; return;};
 

#define mapString A,
C,
 )     mapMember(#A,_##A,C,TYPE_STRING,N)
 

#define mapPtr A,
 )     mapMember(#A,_##A,C,TYPE_PTR,sizeof(long int))
 

#define mapShort A,
 )     mapMember(#A,_##A,C,TYPE_INT,sizeof(short int))
 

#define mapUShort A,
 )     mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned short))
 

#define mapInt A,
 )     mapMember(#A,_##A,C,TYPE_INT,sizeof(int))
 

#define mapUInt A,
 )     mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned int))
 

#define mapLong A,
 )     mapMember(#A,_##A,C,TYPE_INT,sizeof(long int))
 

#define mapULong A,
 )     mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned long))
 

#define mapFloat A,
 )     mapMember(#A,_##A,C,TYPE_FLOAT,sizeof(float))
 

#define mapDouble A,
 )     mapMember(#A,_##A,C,TYPE_FLOAT,sizeof(double))
 

#define mapChar A,
 )     mapMember(#A,_##A,C,TYPE_CHAR,sizeof(char))
 

#define mapBool A,
 )     mapMember(#A,_##A,C,TYPE_INT,sizeof(bool))
 

#define mapMemberRO A,
M,
C,
T,
 )     if (!i--) {attr=A; mem=(unsigned char Object::*)&(_THiS_CLaSS_::M); col=C; type=T; len=N; rw=false; return;};
 

#define mapStringRO A,
C,
 )     mapMember(#A,_##A,C,TYPE_STRING,N)
 

#define mapPtrRO A,
 )     mapMember(#A,_##A,C,TYPE_PTR,sizeof(long int))
 

#define mapShortRO A,
 )     mapMember(#A,_##A,C,TYPE_INT,sizeof(short int))
 

#define mapUShortRO A,
 )     mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned short))
 

#define mapIntRO A,
 )     mapMember(#A,_##A,C,TYPE_INT,sizeof(int))
 

#define mapUIntRO A,
 )     mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned int))
 

#define mapLongRO A,
 )     mapMember(#A,_##A,C,TYPE_INT,sizeof(long int))
 

#define mapULongRO A,
 )     mapMember(#A,_##A,C,TYPE_UNSIGNED,sizeof(unsigned long))
 

#define mapFloatRO A,
 )     mapMember(#A,_##A,C,TYPE_FLOAT,sizeof(float))
 

#define mapDoubleRO A,
 )     mapMember(#A,_##A,C,TYPE_FLOAT,sizeof(double))
 

#define mapCharRO A,
 )     mapMember(#A,_##A,C,TYPE_CHAR,sizeof(char))
 

#define mapBoolRO A,
 )     mapMember(#A,_##A,C,TYPE_INT,sizeof(bool))
 


Generated on Wed Aug 11 22:34:48 2004 for IOPC by Doxygen 1.3.6