00001 #ifndef _LCORE_SPSClTypes_H_ // -*-c++-*-
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifdef __GNUG__
00048 # pragma interface
00049 #endif
00050
00051 #ifndef _LCORE_ClassTypes_H_
00052 # include <LCore/ClassTypes.h>
00053 #endif
00054
00055 #ifndef _LCORE_Programmers_H_
00056 # include <LCore/Programmers.h>
00057 #endif
00058
00059 #define _LCORE_SPSClTypes_H_
00060
00061 namespace strmod {
00062 namespace lcore {
00063
00064 class SPSCORE_ClassIdent;
00065
00066 class SPS_ClassNum : public ClassNum {
00067 protected:
00068 inline virtual const ClassIdent *i_GetIdent() const;
00069 inline SPS_ClassNum(const ClassNum &clnum);
00070
00071 friend class SPS_ClassIdent;
00072
00073 public:
00074 static const SPSCORE_ClassIdent identifier;
00075
00076 inline virtual int AreYouA(const ClassIdent &cid) const;
00077
00078 enum SPSCORE_Libraries { Core = 0, Database,
00079 EDIServ = 4086, Mail = 4087,
00080 User0, User1, User2, User3,
00081 User4, User5, User6, User7 = 4095};
00082
00083 inline U2Byte GetLibNum() const;
00084 inline U4Byte GetClNum() const;
00085
00086 inline SPS_ClassNum(SPSCORE_Libraries lnum, U4Byte cnum);
00087 };
00088
00089
00090
00091 class SPSCORE_ClassIdent;
00092
00093 class SPS_ClassIdent : public ClassIdent {
00094 protected:
00095 inline virtual const ClassIdent *i_GetIdent() const;
00096
00097 public:
00098 static const SPSCORE_ClassIdent identifier;
00099
00100 inline virtual int AreYouA(const ClassIdent &cid) const;
00101
00102 const SPS_ClassNum GetClass() const { return(ClassIdent::GetClass()); }
00103
00104 inline SPS_ClassIdent(SPS_ClassNum cnum);
00105 };
00106
00107
00108
00109 class SPSCORE_ClassIdent : public SPS_ClassIdent {
00110 protected:
00111 inline virtual const ClassIdent *i_GetIdent() const;
00112
00113 public:
00114 static const SPSCORE_ClassIdent identifier;
00115
00116 inline virtual int AreYouA(const ClassIdent &cid) const;
00117
00118 inline SPSCORE_ClassIdent(U4Byte cnum);
00119 };
00120
00121
00122
00123 inline const ClassIdent *SPS_ClassNum::i_GetIdent() const
00124 {
00125 return(&identifier);
00126 }
00127
00128 inline int SPS_ClassNum::AreYouA(const ClassIdent &cid) const
00129 {
00130 return((identifier == cid) || ClassNum::AreYouA(cid));
00131 }
00132
00133 inline U2Byte SPS_ClassNum::GetLibNum() const
00134 {
00135 return((0xfff00000UL & ClassNum::GetClNum()) >> 20);
00136 }
00137
00138 inline U4Byte SPS_ClassNum::GetClNum() const
00139 {
00140 return(0x000fffffUL & ClassNum::GetClNum());
00141 }
00142
00143 inline SPS_ClassNum::SPS_ClassNum(SPSCORE_Libraries lnum, U4Byte cnum) :
00144 ClassNum((U4Byte(lnum & 0x0fffU) << 20) | (cnum & 0x000fffffUL))
00145 {
00146 }
00147
00148 inline SPS_ClassNum::SPS_ClassNum(const ClassNum &clnum) : ClassNum(clnum)
00149 {
00150 }
00151
00152
00153
00154 inline const ClassIdent *SPS_ClassIdent::i_GetIdent() const
00155 {
00156 return(&identifier);
00157 }
00158
00159 inline int SPS_ClassIdent::AreYouA(const ClassIdent &cid) const
00160 {
00161 return((identifier == cid) || ClassIdent::AreYouA(cid));
00162 }
00163
00164 inline SPS_ClassIdent::SPS_ClassIdent(SPS_ClassNum cnum) :
00165 ClassIdent(StPaulSoftware_0, cnum)
00166 {
00167 }
00168
00169
00170
00171 inline const ClassIdent *SPSCORE_ClassIdent::i_GetIdent() const
00172 {
00173 return(&identifier);
00174 }
00175
00176 inline int SPSCORE_ClassIdent::AreYouA(const ClassIdent &cid) const
00177 {
00178 return((identifier == cid) || SPS_ClassIdent::AreYouA(cid));
00179 }
00180
00181 inline SPSCORE_ClassIdent::SPSCORE_ClassIdent(U4Byte cnum) :
00182 SPS_ClassIdent(SPS_ClassNum(SPS_ClassNum::Core, cnum))
00183 {
00184 }
00185
00186 }
00187 }
00188
00189 #endif