// TOKEN.och oszt ly implement ci¢. // Gener lva: 1999.06.10, 14:39:57, OBJCCC v2.2.03 // Meta oszt ly defin¡ci¢: Van #ifndef CA_OBJECT_N #ifdef _STRICT_PARENT_ #ifdef _CA_CM_ONLY_ #include "OBJECT.och" #else // _CA_CM_ONLY_ #define _CA_CM_ONLY_ #include "OBJECT.och" #undef _CA_CM_ONLY_ #endif // _CA_CM_ONLY_ #else #include "OBJECT.och" #endif // _STRICT_PARENT_ #endif // CA_OBJECT_N #ifndef _CA_CM_ONLY_ #ifndef _TOKEN_OCH_ #define _TOKEN_OCH_ #xtranslate TOKEN.:oinit => (OBJGEN.():(4)) #xtranslate TOKEN.:getclass => (OBJGEN.():(5)) #xtranslate TOKEN.:isclass => (OBJGEN.():(6)) #xtranslate TOKEN.:getattrib => (OBJGEN.():(7)) #xtranslate TOKEN.:setattrib => (OBJGEN.():(8)) #xtranslate TOKEN.:id => \[CA_OBJECT_N+1\] #xtranslate TOKEN.:str => \[CA_OBJECT_N+2\] #xtranslate TOKEN.:file => \[CA_OBJECT_N+3\] #xtranslate TOKEN.:line => \[CA_OBJECT_N+4\] #xtranslate TOKEN.:pos => \[CA_OBJECT_N+5\] #xtranslate TOKEN.:classify => \[CA_OBJECT_N+6\] #xtranslate TOKEN.:error => \[CA_OBJECT_N+7\] #xtranslate TOKEN.:eqtype => \[CA_OBJECT_N+8\] // Specifik lva: iserror() // Specifik lva: errorstr() // Specifik lva: printtostr() // Specifik lva: getstr() // Specifik lva: copytoken(id,str) // ™r”k”lve: oinit(id,str,file,line,pos) #xtranslate TOKEN.:iserror => (OBJGEN.():(CM_OBJECT_N+1)) #xtranslate TOKEN.:errorstr => (OBJGEN.():(CM_OBJECT_N+2)) #xtranslate TOKEN.:printtostr => (OBJGEN.():(CM_OBJECT_N+3)) #xtranslate TOKEN.:getstr => (OBJGEN.():(CM_OBJECT_N+4)) #xtranslate TOKEN.:copytoken => (OBJGEN.():(CM_OBJECT_N+5)) // ™r”k”lve: oinit(id,str,file,line,pos) #endif // _TOKEN_OCH_ #endif // _CA_CM_ONLY_ #ifndef CA_TOKEN_N #define CA_TOKEN_N CA_OBJECT_N+8 #define CM_TOKEN_N CM_OBJECT_N+5 #endif // CA_TOKEN_N #ifndef _CA_CM_ONLY_ #ifndef _TOKENCLASS_OCH_ #define _TOKENCLASS_OCH_ ********************************************************************** #xtranslate C.TOKEN: => (TOKENCLASS.clTOKEN():) #xtranslate C.TOKEN:self() => (clTOKEN()) #xtranslate TOKENCLASS.:parent => \[CA_OBJECT_N+1\] #xtranslate TOKENCLASS.:name => \[CA_OBJECT_N+2\] #xtranslate TOKENCLASS.:objsize => \[CA_OBJECT_N+3\] #xtranslate TOKENCLASS.:attribs => \[CA_OBJECT_N+4\] #xtranslate TOKENCLASS.:methods => \[CA_OBJECT_N+5\] #xtranslate TOKENCLASS.:classid => \[CA_OBJECT_N+6\] #xtranslate TOKENCLASS.:parentclassids => \[CA_OBJECT_N+7\] #xtranslate TOKENCLASS.:amblock => \[CA_OBJECT_N+8\] #xtranslate TOKENCLASS.:methodsblock => \[CA_OBJECT_N+9\] #xtranslate TOKENCLASS.:objmethodsimplement => \[CA_OBJECT_N+10\] #xtranslate TOKENCLASS.:oinit => (OBJGEN.():(4)) #xtranslate TOKENCLASS.:getclass => (OBJGEN.():(5)) #xtranslate TOKENCLASS.:isclass => (OBJGEN.():(6)) #xtranslate TOKENCLASS.:getattrib => (OBJGEN.():(7)) #xtranslate TOKENCLASS.:setattrib => (OBJGEN.():(8)) #xtranslate TOKENCLASS.:onew => (OBJGEN.():(CM_OBJECT_N+1)) #xtranslate TOKENCLASS.:ocreate => (OBJGEN.():(CM_OBJECT_N+2)) #xtranslate TOKENCLASS.:rawoinit => (OBJGEN.():(CM_OBJECT_N+3)) #xtranslate TOKENCLASS.:oinitclass => (OBJGEN.():(CM_OBJECT_N+4)) #xtranslate TOKENCLASS.:getmethodsimplement => (OBJGEN.():(CM_OBJECT_N+5)) #xtranslate TOKENCLASS.:attribidx => (OBJGEN.():(CM_OBJECT_N+6)) #xtranslate TOKENCLASS.:needclassid => (OBJGEN.():(CM_OBJECT_N+7)) #xtranslate TOKENCLASS.:isinheritfrom => (OBJGEN.():(CM_OBJECT_N+8)) #xtranslate TOKENCLASS.:errstrarray => \[CA_BEHAVIOR_N+1\] #xtranslate TOKENCLASS.:equivclass => \[CA_BEHAVIOR_N+2\] // ™r”k”lve: onew(id,str,file,line,pos) // Specifik lva: onewerror(id,str,file,line,pos,error) // ™r”k”lve: oinitclass() // Specifik lva: copyfromtoken(t,id,str) // Specifik lva: findclassify(str) // ™r”k”lve: onew(id,str,file,line,pos) #xtranslate TOKENCLASS.:onewerror => (OBJGEN.():(CM_BEHAVIOR_N+1)) // ™r”k”lve: oinitclass() #xtranslate TOKENCLASS.:copyfromtoken => (OBJGEN.():(CM_BEHAVIOR_N+2)) #xtranslate TOKENCLASS.:findclassify => (OBJGEN.():(CM_BEHAVIOR_N+3)) #endif // _TOKENCLASS_OCH_ #endif // _CA_CM_ONLY_ #ifndef CA_TOKENCLASS_N #define CA_TOKENCLASS_N CA_BEHAVIOR_N+2 #define CM_TOKENCLASS_N CM_BEHAVIOR_N+3 #endif // CA_TOKENCLASS_N ********************************************************************** #ifdef _TOKEN_PRG_ #ifndef _TOKEN_PRG_OCH_ #define _TOKEN_PRG_OCH_ ********************************************************************** #xtranslate othis: => TOKEN.(othis): #xtranslate thisclass: => TOKENCLASS.(this:getClass()): #define CTHIS TOKEN ********************************************************************** #xtranslate this: => TOKEN.(this): #xcommand implement iserror() => static function iserror(this) #xcommand implement errorstr() => static function errorstr(this) #xcommand implement printtostr() => static function printtostr(this) #xcommand implement getstr() => static function getstr(this) #xcommand implement copytoken(id,str) => ; static function copytoken(this,id,str) #xcommand implement oinit(id,str,file,line,pos) => ; static function oinit(this,id,str,file,line,pos) #ifdef _IMPLEMENT_EXPORT_ #xcommand implement export iserror() => function iserror(this) #xcommand implement export errorstr() => function errorstr(this) #xcommand implement export printtostr() => function printtostr(this) #xcommand implement export getstr() => function getstr(this) #xcommand implement export copytoken(id,str) => ; function copytoken(this,id,str) #xcommand implement export oinit(id,str,file,line,pos) => ; function oinit(this,id,str,file,line,pos) #endif // _IMPLEMENT_EXPORT_ #xtranslate super:oinit => (OBJGENM.(eval(BEHAVIOR.clOBJECT():objmethodsimplement)).(this):(4)) #xtranslate super:getclass => (OBJGENM.(eval(BEHAVIOR.clOBJECT():objmethodsimplement)).(this):(5)) #xtranslate super:isclass => (OBJGENM.(eval(BEHAVIOR.clOBJECT():objmethodsimplement)).(this):(6)) #xtranslate super:getattrib => (OBJGENM.(eval(BEHAVIOR.clOBJECT():objmethodsimplement)).(this):(7)) #xtranslate super:setattrib => (OBJGENM.(eval(BEHAVIOR.clOBJECT():objmethodsimplement)).(this):(8)) ********************************************************************** static function setCMethods(pOsztaly) // Egy t”mb”t felt”lt az oszt ly m–veleti blokkjaival. pOsztaly[(CM_OBJECT_N+1)]:={|this| iserror(this)} pOsztaly[(CM_OBJECT_N+2)]:={|this| errorstr(this)} pOsztaly[(CM_OBJECT_N+3)]:={|this| printtostr(this)} pOsztaly[(CM_OBJECT_N+4)]:={|this| getstr(this)} pOsztaly[(CM_OBJECT_N+5)]:={|this,id,str| copytoken(this,id,str)} pOsztaly[(4)]:={|this,id,str,file,line,pos| oinit(this,id,str,file,line,pos)} return pOsztaly ********************************************************************** static function setCams(ta,tm) // Egy t”mb”t felt”lt az oszt ly  ltal def. objektumok attrib£tumaival ‚s m–veleteivel. ta[CA_OBJECT_N+1-CA_NIL_N] := {CA_OBJECT_N+1,'id', } ta[CA_OBJECT_N+2-CA_NIL_N] := {CA_OBJECT_N+2,'str', } ta[CA_OBJECT_N+3-CA_NIL_N] := {CA_OBJECT_N+3,'file', } ta[CA_OBJECT_N+4-CA_NIL_N] := {CA_OBJECT_N+4,'line', } ta[CA_OBJECT_N+5-CA_NIL_N] := {CA_OBJECT_N+5,'pos', } ta[CA_OBJECT_N+6-CA_NIL_N] := {CA_OBJECT_N+6,'classify', } ta[CA_OBJECT_N+7-CA_NIL_N] := {CA_OBJECT_N+7,'error', } ta[CA_OBJECT_N+8-CA_NIL_N] := {CA_OBJECT_N+8,'eqtype',nil} tm[(CM_OBJECT_N+1)-CM_NIL_N] := {(CM_OBJECT_N+1),'iserror','',nil} tm[(CM_OBJECT_N+2)-CM_NIL_N] := {(CM_OBJECT_N+2),'errorstr','',nil} tm[(CM_OBJECT_N+3)-CM_NIL_N] := {(CM_OBJECT_N+3),'printtostr','',nil} tm[(CM_OBJECT_N+4)-CM_NIL_N] := {(CM_OBJECT_N+4),'getstr','',nil} tm[(CM_OBJECT_N+5)-CM_NIL_N] := {(CM_OBJECT_N+5),'copytoken','id,str',nil} tm[(4)-CM_NIL_N] := {(4),'oinit','id,str,file,line,pos',nil} return nil #ifndef _NO_CLTOKEN_ #ifdef _STRICT_PARENT_ #ifdef _CA_CM_ONLY_ #include "meta.och" #else // _CA_CM_ONLY_ #define _CA_CM_ONLY_ #include "meta.och" #undef _CA_CM_ONLY_ #endif // _CA_CM_ONLY_ #else #include "meta.och" #endif // _STRICT_PARENT_ ********************************************************************** function clTOKEN() // El“szedi az oszt lyt. (class) static osztaly if (osztaly==nil) osztaly:=META.mcTOKENCLASS():onew(; clOBJECT(),; "TOKEN",; CA_TOKEN_N,; CM_TOKEN_N,; {|ta,tm|setCams(ta,tm)},; {|t|setCMethods(t)}) endif return osztaly #endif // _NO_CLTOKEN_ #ifndef _NO_TOKENCLASS_ ********************************************************************** #xtranslate class: => TOKENCLASS.(class): #xcommand cimplement onew(id,str,file,line,pos) => ; static function onew(class,id,str,file,line,pos) #xcommand cimplement onewerror(id,str,file,line,pos,error) => ; static function onewerror(class,id,str,file,line,pos,error) #xcommand cimplement oinitclass() => static function oinitclass(class) #xcommand cimplement copyfromtoken(t,id,str) => ; static function copyfromtoken(class,t,id,str) #xcommand cimplement findclassify(str) => ; static function findclassify(class,str) #ifdef _IMPLEMENT_EXPORT_ #xcommand cimplement export onew(id,str,file,line,pos) => ; function onew(class,id,str,file,line,pos) #xcommand cimplement export onewerror(id,str,file,line,pos,error) => ; function onewerror(class,id,str,file,line,pos,error) #xcommand cimplement export oinitclass() => function oinitclass(class) #xcommand cimplement export copyfromtoken(t,id,str) => ; function copyfromtoken(class,t,id,str) #xcommand cimplement export findclassify(str) => ; function findclassify(class,str) #endif // _IMPLEMENT_EXPORT_ #xtranslate superclass:oinit => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(4)) #xtranslate superclass:getclass => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(5)) #xtranslate superclass:isclass => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(6)) #xtranslate superclass:getattrib => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(7)) #xtranslate superclass:setattrib => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(8)) #xtranslate superclass:onew => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(CM_OBJECT_N+1)) #xtranslate superclass:ocreate => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(CM_OBJECT_N+2)) #xtranslate superclass:rawoinit => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(CM_OBJECT_N+3)) #xtranslate superclass:oinitclass => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(CM_OBJECT_N+4)) #xtranslate superclass:getmethodsimplement => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(CM_OBJECT_N+5)) #xtranslate superclass:attribidx => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(CM_OBJECT_N+6)) #xtranslate superclass:needclassid => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(CM_OBJECT_N+7)) #xtranslate superclass:isinheritfrom => (OBJGENM.(eval(BEHAVIOR.clBEHAVIOR():objmethodsimplement)).(class):(CM_OBJECT_N+8)) ********************************************************************** static function setMCMethods(pOsztaly) // Egy t”mb”t felt”lt a metaoszt ly m–veleti blokkjaival. pOsztaly[(CM_OBJECT_N+1)]:={|class,id,str,file,line,pos| onew(class,id,str,file,line,pos)} pOsztaly[(CM_BEHAVIOR_N+1)]:={|class,id,str,file,line,pos,error| onewerror(class,id,str,file,line,pos,error)} pOsztaly[(CM_OBJECT_N+4)]:={|class| oinitclass(class)} pOsztaly[(CM_BEHAVIOR_N+2)]:={|class,t,id,str| copyfromtoken(class,t,id,str)} pOsztaly[(CM_BEHAVIOR_N+3)]:={|class,str| findclassify(class,str)} return pOsztaly ********************************************************************** static function setMCams(ta,tm) // Egy t”mb”t felt”lt a metaoszt ly  ltal def. objektumok attrib£tumaival ‚s m–veleteivel. ta[CA_BEHAVIOR_N+1-CA_NIL_N] := {CA_BEHAVIOR_N+1,'errstrarray',nil} ta[CA_BEHAVIOR_N+2-CA_NIL_N] := {CA_BEHAVIOR_N+2,'equivclass',nil} tm[(CM_OBJECT_N+1)-CM_NIL_N] := {(CM_OBJECT_N+1),'onew','id,str,file,line,pos',nil} tm[(CM_BEHAVIOR_N+1)-CM_NIL_N] := {(CM_BEHAVIOR_N+1),'onewerror','id,str,file,line,pos,error',nil} tm[(CM_OBJECT_N+4)-CM_NIL_N] := {(CM_OBJECT_N+4),'oinitclass','',nil} tm[(CM_BEHAVIOR_N+2)-CM_NIL_N] := {(CM_BEHAVIOR_N+2),'copyfromtoken','t,id,str',nil} tm[(CM_BEHAVIOR_N+3)-CM_NIL_N] := {(CM_BEHAVIOR_N+3),'findclassify','str',nil} return nil ********************************************************************** #ifndef _NO_MCTOKENCLASS_ #ifdef _STRICT_PARENT_ #ifdef _CA_CM_ONLY_ #include "meta.och" // "metaclas.och" #else // _CA_CM_ONLY_ #define _CA_CM_ONLY_ #include "meta.och" // "metaclas.och" #undef _CA_CM_ONLY_ #endif // _CA_CM_ONLY_ #else #include "meta.och" // "metaclas.och" #endif // _STRICT_PARENT_ function mcTOKENCLASS() // El“szedi az oszt ly metaoszt ly t. (metaclass) static metaOsztaly if (metaOsztaly==nil) metaOsztaly:=META.clMETA():onew(; clBEHAVIOR(),; "TOKENCLASS",; CA_TOKENCLASS_N,; CM_TOKENCLASS_N,; {|ta,tm|setMCams(ta,tm)},; {|t|setMCMethods(t)}) endif return metaOsztaly #endif // _NO_MCTOKENCLASS_ #endif // _NO_TOKENCLASS_ #ifdef _IMPLEMENT_ONEW_ ********************************************************************** cimplement onew(id,str,file,line,pos) local o:=class:ocreate() TOKEN.o:oinit(id,str,file,line,pos) return o #endif // _IMPLEMENT_ONEW_ ********************************************************************** #ifdef _IMPLEMENT_OINIT_ implement oinit(id,str,file,line,pos) super:oinit() return this #endif // _IMPLEMENT_OINIT_ ********************************************************************** ********************************************************************** #endif // _TOKEN_PRG_OCH_ #endif // _TOKEN_PRG_