=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Command: Object ObjectName IS [A|AN] ObjectClass {ImageName} {SubImageNames...} Parameters: ObjectName is a string. ObjectClass is an integer. ImageName is a string. Description: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= JJT-5.1 #COMMAND OBJECT R "IS" "A""AN" RVD#I #IF (!0<5) // if no image try to aquire one OBJECT !1 !2 !3 !4 !1 #ELSE #DATA // start up the data stream #PUSH !Zj // save the unique object label #PUSH !b // save current definition state #IF (!b = 4) // if in procedure and not class #SET ZJ$ 0 // do not inc z #ELSE #SET ZJ$ !ZB // assign the next object id #ENDIF #PUSH !Zb // save this level on stack #IFDEF !4.AGG // was this a class with sub objects? #SET ZB$ !4.AGG // sub objects will begin at the #ELSE // next object after superclass #SET ZB$ 0 // base classes start at 0 #ENDIF #SET ZI$ !ZI // count this object at the current level #PUSH !Zi // and push the level #IF (!b > 0) // if (in_object | in_class) #IF (!b & 2) // obj_flag == in_class? #IF (!b & 1) // obj_flag == in_Object? #ELSE // No Name for Subobject in constructor #REPLACE !$.!1.OBJ |CI-!Zj // object_name = -current_object #ENDIF #ENDIF // (LS) removed setting of ZJ; it is NOT being used. // (Removed when max lines increased > 32k) // #SET ZJ$ (32766-!a) // a very unique label for this object #DPUSH |CS".!1" // make name from parent and child #ELSE // global object name #DPUSH |CS"!1" // assign an absolute name to object #ENDIF #CHECK U_!4 _U // does class exist? #DPUSH U_!4 // define then class the class id GET$OBJ$IMAGE !5 // define the objects image #IF ((!b & 3) = 2) // if in_class & !in_object #DPUSH !$.!1.OBJ // pick the assigned dependant number #ELSE // #IF (!b = 0) // A global object must assign # #IFDEF !1.OBJ // Is the symbol defined, name_object? #DPUSH |CI0 // pick the next dependant number #ELSE #DPUSH |CI!Zj // force the dependant number // #SET ZJ$ ($1000+!Zj) // mark as global object #SET ZJ$ ($10000000+!Zj) // using 32-bit ids now #REPLACE !1.OBJ |CI!Zj // Assign an ID to this object #ENDIF #ELSE #DPUSH |CI0 // pick the next dependant number #ENDIF #ENDIF REGISTER_OBJECT !1 #DPUSH GET_!1 #SET B$ (!b | 1) // we are in a object definition !A [] OBJ$CREATE |VL // create the object now #IFDEF !1.OBJ #IFCLASS !1.OBJ V$ // does this object have a global? MOVE CURRENT_OBJECT TO !1.OBJ // Move the object id to its global #ENDIF #ENDIF #SPUSH //save the old class name #SET $$ !4 #IFSUB '!$$SC' // if flex-defined class #IFSUB '!$$SM' // if begin-instance macro exists !$$SM !$ !5 !6 !7 !8 !9 #ELSE FORWARD_BEGIN_CONSTRUCT !$ !5 !6 !7 !8 !9 #ENDIF #ELSE ADD$IMAGE$ARGS MSG_CONSTRUCT_OBJECT !5 !6 !7 !8 !9 //else use default #ENDIF #ENDIF #ENDCOMMAND identify the image type
#IFDEF !1 // is it a int (dynamic?) #DPUSH !1 #ELSE #IFDEF !1.N // try typical naming scheme #DPUSH !1.N #ELSE #DPUSH |CI0 // not found, make it dynamic #ENDIF #ENDIF