Files
harbour-core/harbour/samples/cccppc/tokenst.och
1999-11-09 01:37:27 +00:00

284 lines
12 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// TOKENST.och oszt ly implement ci¢.
// Gener lva: 1999.06.10, 14:41:25, OBJCCC v2.2.03
// Meta oszt ly defin¡ci¢: Van
#ifndef CA_TOKEN_N
#ifdef _STRICT_PARENT_
#ifdef _CA_CM_ONLY_
#include "TOKEN.och"
#else // _CA_CM_ONLY_
#define _CA_CM_ONLY_
#include "TOKEN.och"
#undef _CA_CM_ONLY_
#endif // _CA_CM_ONLY_
#else
#include "TOKEN.och"
#endif // _STRICT_PARENT_
#endif // CA_TOKEN_N
#ifndef _CA_CM_ONLY_
#ifndef _TOKENST_OCH_
#define _TOKENST_OCH_
#xtranslate TOKENST.<obj>:id => <obj>\[CA_OBJECT_N+1\]
#xtranslate TOKENST.<obj>:str => <obj>\[CA_OBJECT_N+2\]
#xtranslate TOKENST.<obj>:file => <obj>\[CA_OBJECT_N+3\]
#xtranslate TOKENST.<obj>:line => <obj>\[CA_OBJECT_N+4\]
#xtranslate TOKENST.<obj>:pos => <obj>\[CA_OBJECT_N+5\]
#xtranslate TOKENST.<obj>:classify => <obj>\[CA_OBJECT_N+6\]
#xtranslate TOKENST.<obj>:error => <obj>\[CA_OBJECT_N+7\]
#xtranslate TOKENST.<obj>:eqtype => <obj>\[CA_OBJECT_N+8\]
#xtranslate TOKENST.<obj>:oinit => (OBJGEN.(<obj>):(4))
#xtranslate TOKENST.<obj>:getclass => (OBJGEN.(<obj>):(5))
#xtranslate TOKENST.<obj>:isclass => (OBJGEN.(<obj>):(6))
#xtranslate TOKENST.<obj>:getattrib => (OBJGEN.(<obj>):(7))
#xtranslate TOKENST.<obj>:setattrib => (OBJGEN.(<obj>):(8))
#xtranslate TOKENST.<obj>:iserror => (OBJGEN.(<obj>):(CM_OBJECT_N+1))
#xtranslate TOKENST.<obj>:errorstr => (OBJGEN.(<obj>):(CM_OBJECT_N+2))
#xtranslate TOKENST.<obj>:printtostr => (OBJGEN.(<obj>):(CM_OBJECT_N+3))
#xtranslate TOKENST.<obj>:getstr => (OBJGEN.(<obj>):(CM_OBJECT_N+4))
#xtranslate TOKENST.<obj>:copytoken => (OBJGEN.(<obj>):(CM_OBJECT_N+5))
#xtranslate TOKENST.<obj>:deep => <obj>\[CA_TOKEN_N+1\]
// ™r”k”lve: oinit(id,str,file,line,pos,deep)
// ™r”k”lve: oinit(id,str,file,line,pos,deep)
#endif // _TOKENST_OCH_
#endif // _CA_CM_ONLY_
#ifndef CA_TOKENST_N
#define CA_TOKENST_N CA_TOKEN_N+1
#define CM_TOKENST_N CM_TOKEN_N+0
#endif // CA_TOKENST_N
#ifndef _CA_CM_ONLY_
#ifndef _TOKENSTCLASS_OCH_
#define _TOKENSTCLASS_OCH_
**********************************************************************
#xtranslate C.TOKENST:<m> => (TOKENSTCLASS.clTOKENST():<m>)
#xtranslate C.TOKENST:self() => (clTOKENST())
#xtranslate TOKENSTCLASS.<obj>:parent => <obj>\[CA_OBJECT_N+1\]
#xtranslate TOKENSTCLASS.<obj>:name => <obj>\[CA_OBJECT_N+2\]
#xtranslate TOKENSTCLASS.<obj>:objsize => <obj>\[CA_OBJECT_N+3\]
#xtranslate TOKENSTCLASS.<obj>:attribs => <obj>\[CA_OBJECT_N+4\]
#xtranslate TOKENSTCLASS.<obj>:methods => <obj>\[CA_OBJECT_N+5\]
#xtranslate TOKENSTCLASS.<obj>:classid => <obj>\[CA_OBJECT_N+6\]
#xtranslate TOKENSTCLASS.<obj>:parentclassids => <obj>\[CA_OBJECT_N+7\]
#xtranslate TOKENSTCLASS.<obj>:amblock => <obj>\[CA_OBJECT_N+8\]
#xtranslate TOKENSTCLASS.<obj>:methodsblock => <obj>\[CA_OBJECT_N+9\]
#xtranslate TOKENSTCLASS.<obj>:objmethodsimplement => <obj>\[CA_OBJECT_N+10\]
#xtranslate TOKENSTCLASS.<obj>:errstrarray => <obj>\[CA_BEHAVIOR_N+1\]
#xtranslate TOKENSTCLASS.<obj>:equivclass => <obj>\[CA_BEHAVIOR_N+2\]
#xtranslate TOKENSTCLASS.<obj>:oinit => (OBJGEN.(<obj>):(4))
#xtranslate TOKENSTCLASS.<obj>:getclass => (OBJGEN.(<obj>):(5))
#xtranslate TOKENSTCLASS.<obj>:isclass => (OBJGEN.(<obj>):(6))
#xtranslate TOKENSTCLASS.<obj>:getattrib => (OBJGEN.(<obj>):(7))
#xtranslate TOKENSTCLASS.<obj>:setattrib => (OBJGEN.(<obj>):(8))
#xtranslate TOKENSTCLASS.<obj>:onew => (OBJGEN.(<obj>):(CM_OBJECT_N+1))
#xtranslate TOKENSTCLASS.<obj>:ocreate => (OBJGEN.(<obj>):(CM_OBJECT_N+2))
#xtranslate TOKENSTCLASS.<obj>:rawoinit => (OBJGEN.(<obj>):(CM_OBJECT_N+3))
#xtranslate TOKENSTCLASS.<obj>:oinitclass => (OBJGEN.(<obj>):(CM_OBJECT_N+4))
#xtranslate TOKENSTCLASS.<obj>:getmethodsimplement => (OBJGEN.(<obj>):(CM_OBJECT_N+5))
#xtranslate TOKENSTCLASS.<obj>:attribidx => (OBJGEN.(<obj>):(CM_OBJECT_N+6))
#xtranslate TOKENSTCLASS.<obj>:needclassid => (OBJGEN.(<obj>):(CM_OBJECT_N+7))
#xtranslate TOKENSTCLASS.<obj>:isinheritfrom => (OBJGEN.(<obj>):(CM_OBJECT_N+8))
#xtranslate TOKENSTCLASS.<obj>:onewerror => (OBJGEN.(<obj>):(CM_BEHAVIOR_N+1))
#xtranslate TOKENSTCLASS.<obj>:copyfromtoken => (OBJGEN.(<obj>):(CM_BEHAVIOR_N+2))
#xtranslate TOKENSTCLASS.<obj>:findclassify => (OBJGEN.(<obj>):(CM_BEHAVIOR_N+3))
// ™r”k”lve: onew(id,str,file,line,pos,deep)
// ™r”k”lve: onew(id,str,file,line,pos,deep)
#endif // _TOKENSTCLASS_OCH_
#endif // _CA_CM_ONLY_
#ifndef CA_TOKENSTCLASS_N
#define CA_TOKENSTCLASS_N CA_TOKENCLASS_N+0
#define CM_TOKENSTCLASS_N CM_TOKENCLASS_N+0
#endif // CA_TOKENSTCLASS_N
**********************************************************************
#ifdef _TOKENST_PRG_
#ifndef _TOKENST_PRG_OCH_
#define _TOKENST_PRG_OCH_
**********************************************************************
#xtranslate othis:<m> => TOKENST.(othis):<m>
#xtranslate thisclass:<m> => TOKENSTCLASS.(this:getClass()):<m>
#define CTHIS TOKENST
**********************************************************************
#xtranslate this:<m> => TOKENST.(this):<m>
#xcommand implement oinit(id,str,file,line,pos,deep) => ;
static function oinit(this,id,str,file,line,pos,deep)
#ifdef _IMPLEMENT_EXPORT_
#xcommand implement export oinit(id,str,file,line,pos,deep) => ;
function oinit(this,id,str,file,line,pos,deep)
#endif // _IMPLEMENT_EXPORT_
#xtranslate super:oinit => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(4))
#xtranslate super:getclass => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(5))
#xtranslate super:isclass => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(6))
#xtranslate super:getattrib => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(7))
#xtranslate super:setattrib => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(8))
#xtranslate super:iserror => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(CM_OBJECT_N+1))
#xtranslate super:errorstr => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(CM_OBJECT_N+2))
#xtranslate super:printtostr => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(CM_OBJECT_N+3))
#xtranslate super:getstr => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(CM_OBJECT_N+4))
#xtranslate super:copytoken => (OBJGENM.(eval(BEHAVIOR.clTOKEN():objmethodsimplement)).(this):(CM_OBJECT_N+5))
**********************************************************************
static function setCMethods(pOsztaly)
// Egy t”mb”t felt”lt az oszt ly mveleti blokkjaival.
pOsztaly[(4)]:={|this,id,str,file,line,pos,deep| oinit(this,id,str,file,line,pos,deep)}
return pOsztaly
**********************************************************************
static function setCams(ta,tm)
// Egy t”mb”t felt”lt az oszt ly  ltal def. objektumok attrib£tumaival s mveleteivel.
ta[CA_TOKEN_N+1-CA_NIL_N] := {CA_TOKEN_N+1,'deep', }
tm[(4)-CM_NIL_N] := {(4),'oinit','id,str,file,line,pos,deep',nil}
return nil
#ifndef _NO_CLTOKENST_
#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 clTOKENST()
// El“szedi az oszt lyt. (class)
static osztaly
if (osztaly==nil)
osztaly:=META.mcTOKENSTCLASS():onew(;
clTOKEN(),;
"TOKENST",;
CA_TOKENST_N,;
CM_TOKENST_N,;
{|ta,tm|setCams(ta,tm)},;
{|t|setCMethods(t)})
endif
return osztaly
#endif // _NO_CLTOKENST_
#ifndef _NO_TOKENSTCLASS_
**********************************************************************
#xtranslate class:<m> => TOKENSTCLASS.(class):<m>
#xcommand cimplement onew(id,str,file,line,pos,deep) => ;
static function onew(class,id,str,file,line,pos,deep)
#ifdef _IMPLEMENT_EXPORT_
#xcommand cimplement export onew(id,str,file,line,pos,deep) => ;
function onew(class,id,str,file,line,pos,deep)
#endif // _IMPLEMENT_EXPORT_
#xtranslate superclass:oinit => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(4))
#xtranslate superclass:getclass => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(5))
#xtranslate superclass:isclass => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(6))
#xtranslate superclass:getattrib => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(7))
#xtranslate superclass:setattrib => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(8))
#xtranslate superclass:onew => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+1))
#xtranslate superclass:ocreate => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+2))
#xtranslate superclass:rawoinit => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+3))
#xtranslate superclass:oinitclass => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+4))
#xtranslate superclass:getmethodsimplement => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+5))
#xtranslate superclass:attribidx => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+6))
#xtranslate superclass:needclassid => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+7))
#xtranslate superclass:isinheritfrom => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_OBJECT_N+8))
#xtranslate superclass:onewerror => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_BEHAVIOR_N+1))
#xtranslate superclass:copyfromtoken => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_BEHAVIOR_N+2))
#xtranslate superclass:findclassify => (OBJGENM.(eval(BEHAVIOR.mcTOKENCLASS():objmethodsimplement)).(class):(CM_BEHAVIOR_N+3))
**********************************************************************
static function setMCMethods(pOsztaly)
// Egy t”mb”t felt”lt a metaoszt ly mveleti blokkjaival.
pOsztaly[(CM_OBJECT_N+1)]:={|class,id,str,file,line,pos,deep| onew(class,id,str,file,line,pos,deep)}
return pOsztaly
**********************************************************************
static function setMCams(ta,tm)
// Egy t”mb”t felt”lt a metaoszt ly  ltal def. objektumok attrib£tumaival s mveleteivel.
tm[(CM_OBJECT_N+1)-CM_NIL_N] := {(CM_OBJECT_N+1),'onew','id,str,file,line,pos,deep',nil}
return nil
**********************************************************************
#ifndef _NO_MCTOKENSTCLASS_
#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 mcTOKENSTCLASS()
// El“szedi az oszt ly metaoszt ly t. (metaclass)
static metaOsztaly
if (metaOsztaly==nil)
metaOsztaly:=META.clMETA():onew(;
mcTOKENCLASS(),;
"TOKENSTCLASS",;
CA_TOKENSTCLASS_N,;
CM_TOKENSTCLASS_N,;
{|ta,tm|setMCams(ta,tm)},;
{|t|setMCMethods(t)})
endif
return metaOsztaly
#endif // _NO_MCTOKENSTCLASS_
#endif // _NO_TOKENSTCLASS_
#ifdef _IMPLEMENT_ONEW_
**********************************************************************
cimplement onew(id,str,file,line,pos,deep)
local o:=class:ocreate()
TOKENST.o:oinit(id,str,file,line,pos,deep)
return o
#endif // _IMPLEMENT_ONEW_
**********************************************************************
#ifdef _IMPLEMENT_OINIT_
implement oinit(id,str,file,line,pos,deep)
super:oinit()
return this
#endif // _IMPLEMENT_OINIT_
**********************************************************************
**********************************************************************
#endif // _TOKENST_PRG_OCH_
#endif // _TOKENST_PRG_