276 lines
11 KiB
Plaintext
276 lines
11 KiB
Plaintext
// PRTREEPR.och oszt ly implement ci¢.
|
||
// Gener lva: 1999.06.10, 14:40:20, 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 _PRTREEPR_OCH_
|
||
#define _PRTREEPR_OCH_
|
||
|
||
|
||
|
||
|
||
#xtranslate PRTREEPR.<obj>:oinit => (OBJGEN.(<obj>):(4))
|
||
#xtranslate PRTREEPR.<obj>:getclass => (OBJGEN.(<obj>):(5))
|
||
#xtranslate PRTREEPR.<obj>:isclass => (OBJGEN.(<obj>):(6))
|
||
#xtranslate PRTREEPR.<obj>:getattrib => (OBJGEN.(<obj>):(7))
|
||
#xtranslate PRTREEPR.<obj>:setattrib => (OBJGEN.(<obj>):(8))
|
||
|
||
|
||
#xtranslate PRTREEPR.<obj>:eprtree => <obj>\[CA_OBJECT_N+1\]
|
||
#xtranslate PRTREEPR.<obj>:subtree => <obj>\[CA_OBJECT_N+2\]
|
||
#xtranslate PRTREEPR.<obj>:result => <obj>\[CA_OBJECT_N+3\]
|
||
#xtranslate PRTREEPR.<obj>:itemarray => <obj>\[CA_OBJECT_N+4\]
|
||
#xtranslate PRTREEPR.<obj>:wordlen => <obj>\[CA_OBJECT_N+5\]
|
||
#xtranslate PRTREEPR.<obj>:laststopwordlen => <obj>\[CA_OBJECT_N+6\]
|
||
|
||
// Specifik lva: start()
|
||
// Specifik lva: put(item)
|
||
// ™r”k”lve: oinit(eprtree)
|
||
|
||
#xtranslate PRTREEPR.<obj>:start => (OBJGEN.(<obj>):(CM_OBJECT_N+1))
|
||
#xtranslate PRTREEPR.<obj>:put => (OBJGEN.(<obj>):(CM_OBJECT_N+2))
|
||
// ™r”k”lve: oinit(eprtree)
|
||
|
||
#endif // _PRTREEPR_OCH_
|
||
#endif // _CA_CM_ONLY_
|
||
|
||
#ifndef CA_PRTREEPR_N
|
||
#define CA_PRTREEPR_N CA_OBJECT_N+6
|
||
#define CM_PRTREEPR_N CM_OBJECT_N+2
|
||
#endif // CA_PRTREEPR_N
|
||
|
||
#ifndef _CA_CM_ONLY_
|
||
#ifndef _PRTREEPRCLASS_OCH_
|
||
#define _PRTREEPRCLASS_OCH_
|
||
|
||
**********************************************************************
|
||
#xtranslate C.PRTREEPR:<m> => (PRTREEPRCLASS.clPRTREEPR():<m>)
|
||
#xtranslate C.PRTREEPR:self() => (clPRTREEPR())
|
||
|
||
|
||
#xtranslate PRTREEPRCLASS.<obj>:parent => <obj>\[CA_OBJECT_N+1\]
|
||
#xtranslate PRTREEPRCLASS.<obj>:name => <obj>\[CA_OBJECT_N+2\]
|
||
#xtranslate PRTREEPRCLASS.<obj>:objsize => <obj>\[CA_OBJECT_N+3\]
|
||
#xtranslate PRTREEPRCLASS.<obj>:attribs => <obj>\[CA_OBJECT_N+4\]
|
||
#xtranslate PRTREEPRCLASS.<obj>:methods => <obj>\[CA_OBJECT_N+5\]
|
||
#xtranslate PRTREEPRCLASS.<obj>:classid => <obj>\[CA_OBJECT_N+6\]
|
||
#xtranslate PRTREEPRCLASS.<obj>:parentclassids => <obj>\[CA_OBJECT_N+7\]
|
||
#xtranslate PRTREEPRCLASS.<obj>:amblock => <obj>\[CA_OBJECT_N+8\]
|
||
#xtranslate PRTREEPRCLASS.<obj>:methodsblock => <obj>\[CA_OBJECT_N+9\]
|
||
#xtranslate PRTREEPRCLASS.<obj>:objmethodsimplement => <obj>\[CA_OBJECT_N+10\]
|
||
|
||
|
||
#xtranslate PRTREEPRCLASS.<obj>:oinit => (OBJGEN.(<obj>):(4))
|
||
#xtranslate PRTREEPRCLASS.<obj>:getclass => (OBJGEN.(<obj>):(5))
|
||
#xtranslate PRTREEPRCLASS.<obj>:isclass => (OBJGEN.(<obj>):(6))
|
||
#xtranslate PRTREEPRCLASS.<obj>:getattrib => (OBJGEN.(<obj>):(7))
|
||
#xtranslate PRTREEPRCLASS.<obj>:setattrib => (OBJGEN.(<obj>):(8))
|
||
#xtranslate PRTREEPRCLASS.<obj>:onew => (OBJGEN.(<obj>):(CM_OBJECT_N+1))
|
||
#xtranslate PRTREEPRCLASS.<obj>:ocreate => (OBJGEN.(<obj>):(CM_OBJECT_N+2))
|
||
#xtranslate PRTREEPRCLASS.<obj>:rawoinit => (OBJGEN.(<obj>):(CM_OBJECT_N+3))
|
||
#xtranslate PRTREEPRCLASS.<obj>:oinitclass => (OBJGEN.(<obj>):(CM_OBJECT_N+4))
|
||
#xtranslate PRTREEPRCLASS.<obj>:getmethodsimplement => (OBJGEN.(<obj>):(CM_OBJECT_N+5))
|
||
#xtranslate PRTREEPRCLASS.<obj>:attribidx => (OBJGEN.(<obj>):(CM_OBJECT_N+6))
|
||
#xtranslate PRTREEPRCLASS.<obj>:needclassid => (OBJGEN.(<obj>):(CM_OBJECT_N+7))
|
||
#xtranslate PRTREEPRCLASS.<obj>:isinheritfrom => (OBJGEN.(<obj>):(CM_OBJECT_N+8))
|
||
|
||
|
||
|
||
// ™r”k”lve: onew(eprtree)
|
||
|
||
// ™r”k”lve: onew(eprtree)
|
||
|
||
#endif // _PRTREEPRCLASS_OCH_
|
||
#endif // _CA_CM_ONLY_
|
||
|
||
#ifndef CA_PRTREEPRCLASS_N
|
||
#define CA_PRTREEPRCLASS_N CA_BEHAVIOR_N+0
|
||
#define CM_PRTREEPRCLASS_N CM_BEHAVIOR_N+0
|
||
#endif // CA_PRTREEPRCLASS_N
|
||
|
||
|
||
**********************************************************************
|
||
#ifdef _PRTREEPR_PRG_
|
||
#ifndef _PRTREEPR_PRG_OCH_
|
||
#define _PRTREEPR_PRG_OCH_
|
||
|
||
|
||
**********************************************************************
|
||
#xtranslate othis:<m> => PRTREEPR.(othis):<m>
|
||
#xtranslate thisclass:<m> => PRTREEPRCLASS.(this:getClass()):<m>
|
||
#define CTHIS PRTREEPR
|
||
|
||
|
||
**********************************************************************
|
||
#xtranslate this:<m> => PRTREEPR.(this):<m>
|
||
|
||
#xcommand implement start() => static function start(this)
|
||
#xcommand implement put(item) => static function put(this,item)
|
||
#xcommand implement oinit(eprtree) => static function oinit(this,eprtree)
|
||
|
||
#ifdef _IMPLEMENT_EXPORT_
|
||
#xcommand implement export start() => function start(this)
|
||
#xcommand implement export put(item) => function put(this,item)
|
||
#xcommand implement export oinit(eprtree) => function oinit(this,eprtree)
|
||
#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| start(this)}
|
||
pOsztaly[(CM_OBJECT_N+2)]:={|this,item| put(this,item)}
|
||
pOsztaly[(4)]:={|this,eprtree| oinit(this,eprtree)}
|
||
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,'eprtree', }
|
||
ta[CA_OBJECT_N+2-CA_NIL_N] := {CA_OBJECT_N+2,'subtree', }
|
||
ta[CA_OBJECT_N+3-CA_NIL_N] := {CA_OBJECT_N+3,'result', }
|
||
ta[CA_OBJECT_N+4-CA_NIL_N] := {CA_OBJECT_N+4,'itemarray', }
|
||
ta[CA_OBJECT_N+5-CA_NIL_N] := {CA_OBJECT_N+5,'wordlen', }
|
||
ta[CA_OBJECT_N+6-CA_NIL_N] := {CA_OBJECT_N+6,'laststopwordlen', }
|
||
|
||
tm[(CM_OBJECT_N+1)-CM_NIL_N] := {(CM_OBJECT_N+1),'start','',nil}
|
||
tm[(CM_OBJECT_N+2)-CM_NIL_N] := {(CM_OBJECT_N+2),'put','item',nil}
|
||
tm[(4)-CM_NIL_N] := {(4),'oinit','eprtree',nil}
|
||
return nil
|
||
|
||
#ifndef _NO_CLPRTREEPR_
|
||
#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 clPRTREEPR()
|
||
// El“szedi az oszt lyt. (class)
|
||
static osztaly
|
||
if (osztaly==nil)
|
||
osztaly:=META.mcPRTREEPRCLASS():onew(;
|
||
clOBJECT(),;
|
||
"PRTREEPR",;
|
||
CA_PRTREEPR_N,;
|
||
CM_PRTREEPR_N,;
|
||
{|ta,tm|setCams(ta,tm)},;
|
||
{|t|setCMethods(t)})
|
||
endif
|
||
return osztaly
|
||
#endif // _NO_CLPRTREEPR_
|
||
|
||
#ifndef _NO_PRTREEPRCLASS_
|
||
|
||
**********************************************************************
|
||
#xtranslate class:<m> => PRTREEPRCLASS.(class):<m>
|
||
|
||
#xcommand cimplement onew(eprtree) => static function onew(class,eprtree)
|
||
|
||
#ifdef _IMPLEMENT_EXPORT_
|
||
#xcommand cimplement export onew(eprtree) => function onew(class,eprtree)
|
||
#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,eprtree| onew(class,eprtree)}
|
||
return pOsztaly
|
||
|
||
**********************************************************************
|
||
static function setMCams(ta,tm)
|
||
// Egy t”mb”t felt”lt a metaoszt ly ltal def. objektumok attrib£tumaival ‚s m–veleteivel.
|
||
|
||
tm[(CM_OBJECT_N+1)-CM_NIL_N] := {(CM_OBJECT_N+1),'onew','eprtree',nil}
|
||
return nil
|
||
|
||
**********************************************************************
|
||
#ifndef _NO_MCPRTREEPRCLASS_
|
||
#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 mcPRTREEPRCLASS()
|
||
// El“szedi az oszt ly metaoszt ly t. (metaclass)
|
||
static metaOsztaly
|
||
if (metaOsztaly==nil)
|
||
metaOsztaly:=META.clMETA():onew(;
|
||
clBEHAVIOR(),;
|
||
"PRTREEPRCLASS",;
|
||
CA_PRTREEPRCLASS_N,;
|
||
CM_PRTREEPRCLASS_N,;
|
||
{|ta,tm|setMCams(ta,tm)},;
|
||
{|t|setMCMethods(t)})
|
||
endif
|
||
return metaOsztaly
|
||
#endif // _NO_MCPRTREEPRCLASS_
|
||
|
||
#endif // _NO_PRTREEPRCLASS_
|
||
#ifdef _IMPLEMENT_ONEW_
|
||
**********************************************************************
|
||
cimplement onew(eprtree)
|
||
local o:=class:ocreate()
|
||
|
||
PRTREEPR.o:oinit(eprtree)
|
||
return o
|
||
#endif // _IMPLEMENT_ONEW_
|
||
|
||
**********************************************************************
|
||
#ifdef _IMPLEMENT_OINIT_
|
||
implement oinit(eprtree)
|
||
super:oinit()
|
||
return this
|
||
#endif // _IMPLEMENT_OINIT_
|
||
|
||
**********************************************************************
|
||
**********************************************************************
|
||
#endif // _PRTREEPR_PRG_OCH_
|
||
#endif // _PRTREEPR_PRG_
|