=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Command: IMPORT_CLASS_PROTOCOL Source Dest {Msg | ALL} {Flag} Description: This command will copy the message definitions of the Source class to the Dest class. The program may choose to copy ALL of the messages or only one of the messages from the Source. The program has the option to stop any message that would overwrite and to stop the copying of messages not directly defined in the Source class. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#IF (!0<2) IMPORT_CLASS_PROTOCOL !1 CURRENT_CLASS #ELSE #DATA // Begining of data #IFDEF !1 // class is variable (integer) or constant #DPUSH !1 // defined_in #ELSE #IFDEF U_!1 #DPUSH U_!1 // class is normal symbol type (integer) #ELSE #ERROR DFERR_COMP_UNDEFINED_SYMBOL_IN_ARGUMENT UNDEFINED CLASS U_!1 #ENDIF #ENDIF #IFDEF !2 // is the destination defined? #DPUSH !2 // add to class #ELSE #IFSAME !2 CURRENT_CLASS // use this symbol for "current class" #DPUSH U_!$ // cc is in this symbol (set by class) #ELSE #IFDEF U_!2 #DPUSH U_!2 // another standard class id #ELSE #ERROR DFERR_COMP_UNDEFINED_SYMBOL_IN_ARGUMENT UNDEFINED CLASS U_!2 #ENDIF #ENDIF #ENDIF #IF (!0>2) // message or all specified #IFSAME !3 ALL // copy all messages #DPUSH |CI0 // 0 is all #ELSE #IFDEF !3 #DPUSH !3 // message name, note full name required #ELSE #IFDEF MSG_!3 #DPUSH MSG_!3 #ELSE #IFDEF SET_!3 #DPUSH SET_!3 #ELSE #IFDEF GET_!3 #DPUSH GET_!3 #ELSE #ERROR DFERR_COMP_UNDEFINED_SYMBOL_IN_ARGUMENT UNDEFINED MESSAGE NAME !3 #ENDIF #ENDIF #ENDIF #ENDIF #ENDIF #IF (!0>3) #SET Q$ 0 CHAIN$HELP !4 !5 // NO_INHERIT and NO_OVERWRITE #DPUSH |CI!q // flags #ELSE #DPUSH |CI0 // no flags #ENDIF #ELSE #DPUSH |CI0 // all messages #DPUSH |CI0 // overwrite and superclasses #ENDIF !A [] $0465 |CI0 |VL #ENDIF