;===================
(de *putphyl (nomphyl attphyl)
(let ((phyl (makephyl nomphyl attphyl)))
(ins phylt phyl)
(mapv '(lambda (oper)
(let ((drap (makedrap)))
(ins (phyloper oper) drap)
(ins (operphyl phyl) drap)))
opert))
(*putphyl-ana nomphyl attphyl))
;-------------------
(de *putoper (nomoper attoper)
(let ((oper (makeoper nomoper attoper)))
(ins opert oper)
(mapv '(lambda (phyl)
(let ((drap (makedrap)))
(ins (operphyl phyl) drap)
(ins (phyloper oper) drap)))
phylt))
(*putoper-ana nomoper attoper))
;-------------------
(de *putoperphyl (phyl oper)
(let ((drap (drap (operphyl phyl) (nomoper oper))))
(ascendance phyl)
(*insereoperphyl oper 1)
(setpresent drap)
(*putoperphyl-ana phyl oper))
;-------------------
(de *putperephyl (phyl pere)
(ascendance pere)
(when (parent phyl)
(ERREUR "le phylum " (nomphyl phyl)
" est parent du phylum " (nomphyl pere)))
(mapv '(lambda (oper drapoper)
(when (visib drapoper)
(*insereoperphyl oper (valvisib drapoper))))
opert (operphyl phyl))
(ins (perephyl phyl) pere)
(*putperephyl-ana phyl pere))
;-------------------
(de *insereoperphyl (oper valvisib)
(mapv '(lambda (phyl drapphyl)
(resetnouvvisib drapphyl)
(when (parent phyl)
(incrvisib drapphyl valvisib (valparent phyl))))
phylt (phyloper oper))
(*insereoperphyl-ana oper))
;===================
(de *remphyl (phyl)
(mapv '(lambda (pere)
(*remperephyl phyl pere))
(perephyl phyl))
(mapv '(lambda (fils)
(when (recherche (perephyl fils) (nomphyl phyl))
(*remperephyl phyl pere)))
phylt)
(let ((numphyl (num phylt phyl)))
(numsup phylt numphyl)
(mapv '(lambda (oper)
(numsup (phyloper oper) numphyl))
opert))
(*remphyl-ana phyl))
;-------------------
(de *remoper (phyl)
(let ((numoper (num opert oper)))
(numsup opert numoper)
(mapv '(lambda (phyl)
(numsup (operphyl phyl) numoper))
phylt))
(*remoper-ana oper))
;-------------------
(de *remoperphyl (phyl oper)
(let ((drap (drap (operphyl phyl) (nomoper oper))))
(ascendance phyl)
(*supprimeoperphyl oper 1)
(resetpresent drap)
(*remoperphyl-ana phyl oper))
;-------------------
(de *remperephyl (phyl pere)
(ascendance pere)
(mapv '(lambda (oper drapoper)
(when (visib drapoper)
(*supprimeoperphyl oper (valvisib drapoper))))
opert (operphyl phyl))
(sup (perephyl phyl) pere)
(*remperephyl-ana phyl pere))
;-------------------
(de *supprimeoperphyl (oper valvisib)
(mapv '(lambda (phyl drapphyl)
(resetancivisib drapphyl)
(when (parent phyl)
(decrvisib drapphyl valvisib (valparent phyl))))
phylt (phyloper oper))
(*supprimeoperphyl-ana oper))
;===================
(de ascendance (phyl)
(mapv 'resetparent phyl)
(ascendance-int phyl))
(de ascendance-int (phyl)
(setparent phyl)
(mapv 'ascendance-int (perephyl phyl)))