пятница, 22 января 2016 г.

#1180. ОПЗ и функциональщина

ОПЗ и функциональщина "подталкивают" к "естественному языку".

elem_proc OutDefinitionsSection:
  ^ IN aValid
  
 : .Suitable aValid DO ; 
  
 Self .ForChildren> .Suitable (
  .Constants .filter> ( .Visibility PublicAccess == ) .OutConstantsList
 )

 Self .OutTypes .Suitable
 
 Self .ForChildren> .Suitable (
  .Constants .filter> ( .Visibility ProtectedAccess == ) .OutConstantsList
 )

; // OutDefinitionsSection:

elem_proc OutImplementationSection
 Self .OutDefinitionsSection: .IsForImplementation
 
 VAR l_WasOut
 false >>> l_WasOut
 Self .ForChildren> .IsForImplementation (
   IN anItem
  anItem .GlobalVars 
  .filter> ( .Visibility PrivateAccess != ) 
  .for> ( .OutVar true >>> l_WasOut )
 ) 
 Self .ForChildren> .All (
   IN anItem
  anItem .GlobalVars 
  .filter> ( .Visibility PrivateAccess == ) 
  .for> ( .OutVar true >>> l_WasOut )
 ) 
 
 l_WasOut ? OutLn
 
 Self .ForChildren> .All (
  .Constants .filter> ( .Visibility PrivateAccess == ) .OutConstantsList
 )

 Self .ForChildren> .IsForInterface (
   IN anItem
  VAR l_GlobalOperations
  anItem .GlobalOperations >>> l_GlobalOperations
  VAR l_GlobalOperationsForOverload
  anItem .GlobalOperationsForOverload >>> l_GlobalOperationsForOverload
  l_GlobalOperations 
  .filter> ( .Visibility PrivateAccess == )
  .for> .MethodInterfaceForEx: l_GlobalOperationsForOverload .MethodBody
  l_GlobalOperations 
  .filter> ( .Visibility PrivateAccess != )
  .for> .MethodInterfaceForEx: nil .MethodBody
 )
 Self .ForChildren> .IsForImplementation (
   IN anItem
  VAR l_GlobalOperations
  anItem .GlobalOperations >>> l_GlobalOperations
  VAR l_GlobalOperationsForOverload
  anItem .GlobalOperationsForOverload >>> l_GlobalOperationsForOverload
  l_GlobalOperations 
  .for> .MethodInterfaceForEx: l_GlobalOperationsForOverload .MethodBody
 )
 
 Self .ForChildren> .All .OutImplementation
; // OutImplementationSection

Комментариев нет:

Отправить комментарий