"Продвинутый CASE". Только код.
Позже я напишу про это подробнее.
А также про "разорванные присваивания" и кеширование результатов выполнения.
BOOLEAN elem_func IsUtilityPack
Cached:
(
RULES
( Self .IsStereotype st_UtilityPack )
true
( Self .IsScriptKeywordsPack )
true
DEFAULT
false
; // RULES
)
>>> Result
; // IsUtilityPack
...
BOOLEAN elem_func UseNewGenExcluded
RULES
( Self .IsControllerInterfaces )
true
( Self '_vcmData_' .InheritsFrom )
true
(
( Self 'Tl3Tag' .InheritsFrom )
AND ( Self 'TtfwKeyWordPrim' .InheritsFrom ! )
AND ( Self .IsUtilityPack ! )
)
true
( Self 'TddComboBoxConfigItem' .InheritsFrom )
true
( Self 'Tl3ProtoObjectForTie' .InheritsFrom )
true
( Self '_evdTagHolder_' .InheritsFrom )
true
DEFAULT
begin
if ( g_UseNewGenExcluded IsNil ) then
Init_g_UseNewGenExcluded
g_UseNewGenExcluded IsNil ?FAIL 'Не инициализирован g_UseNewGenExcluded'
g_UseNewGenExcluded IsVoid ?FAIL 'Не инициализирован g_UseNewGenExcluded'
g_UseNewGenExcluded
.filter> ( Self .UID == )
.CountIt > 0
end // DEFAULT
; // RULES
>>> Result
; // UseNewGenExcluded
...
BOOLEAN elem_func IsSimpleClass
Cached:
(
RULES
( Self .IsUseCaseControllerImp )
( Self .Abstraction at_abstract != )
( Self .IsViewAreaControllerImp )
( Self .Abstraction at_abstract != )
( Self .IsStereotype st_SimpleClass )
true
( Self .IsStereotype st_ObjStub )
true
( Self .IsService )
true
( Self .IsServiceImplementation )
true
( Self .IsScriptKeyword )
true
( Self .IsTestCase )
true
( Self .IsGuiControl )
true
( Self .IsVCMForm )
true
( Self .IsStereotype st_VCMFinalForm )
true
( Self .IsVCMContainer )
true
( Self .IsStereotype st_VCMFinalContainer )
true
DEFAULT
false
; // RULES
)
>>> Result
; // IsSimpleClass
...
BOOLEAN elem_func IsInterface
Cached:
(
RULES
( Self .IsStereotype st_ObjStub )
false
( Self .IsStereotype st_Facet )
true
( Self .IsStereotype st_Interface )
true
( Self .Name 'object' == )
true
( Self .IsTypedef )
RULES
( Self .IsPointer )
false
DEFAULT
( Self .MainAncestorPrim call.me )
; // RULES
DEFAULT
false
; // RULES
)
>>> Result
; // IsInterface
...
ModelElement elem_func DefaultAncestor
Cached:
(
RULES
( Self .IsMixIn )
nil
( Self .IsVCMFormSetFactory )
GarantModel::TvcmFormSetFactory
( Self .IsVCMFormsPack )
GarantModel::TvcmModule
( Self .IsVCMContainer )
GarantModel::TvcmContainerForm
( Self .IsVCMMainForm )
GarantModel::TvcmMainForm
( Self .IsVCMDataModule )
GarantModel::TDataModule
( Self .IsVCMCustomForm )
GarantModel::TvcmEntityForm
( Self .Abstraction at_abstract == )
nil
( Self .IsViewAreaController )
GarantModel::IvcmViewAreaController
( Self .IsUseCaseController )
GarantModel::IvcmUseCaseController
DEFAULT
nil
; // RULES
)
>>> Result
; // DefaultAncestor
...
ModelElement elem_func MainAncestor
Cached:
(
RULES
( Self .IsPointer )
( Self .MainAncestorPrim )
( Self .IsTypedef )
( Self .MainAncestorPrim )
( Self .IsPureMixIn )
( Self .MainAncestorPrim )
( Self .IsInterface )
(
RULES
(
( g_DefaultInterfaceAncestor IsNil ! )
AND ( g_DefaultInterfaceAncestor Self != )
AND ( Self .MainAncestorPrim IsNil )
)
g_DefaultInterfaceAncestor
DEFAULT
( Self .MainAncestorPrim )
; // RULES
)
DEFAULT
( Self .MainAncestorPrim )
; // RULES
>>> Result
RULES
( Result IsNil )
( Self .DefaultAncestor )
DEFAULT
Result
; // RULES
)
>>> Result
; // MainAncestor
...
BOOLEAN elem_func IsRecord
RULES
( Self .IsStereotype st_Struct )
true
( Self .IsTypedef )
RULES
( Self .IsPointer )
false
DEFAULT
( Self .MainAncestor call.me )
; // RULES
DEFAULT
false
; // RULES
>>> Result
; // IsRecord
...
BOOLEAN elem_func IsRecordOrUnion
RULES
( Self .IsRecord )
true
( Self .IsUnion )
true
DEFAULT
false
; // RULES
>>> Result
; // IsRecordOrUnion
Позже я напишу про это подробнее.
А также про "разорванные присваивания" и кеширование результатов выполнения.
Комментариев нет:
Отправить комментарий