Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Migrate Statement Summary

Migrate is a terminal, refactoring statement that occurs within hostid oriented Refactor statements. It specifies the migration of a specific symbol introduced via an external library description file. The Migrate command is by far the most complex command within a refactoring specification. Though the use of separate migration files, as opposed to simply changing the description file being migrated, complicates the notation, it is being retained not only for use with external libraries, but also for use within translation scripts and to migrate user code.


The attributes of the Migrate statement are as follows:


Attribute Description
IdThis attribute specifies which component in the library or projectfile being refactored is the receive the specified changes. If the attribute is omitted that the library or projectfile specification itself is to be changed.
MigCommentThis deprecated string attribute associates a comment with the component. This comment does not trigger the gmNI event handlers and can interfere with the MigUserCode attribute.
OverrideuserThis is an On/Off flag attribute. The On setting sets the Overrideuser status flag On. For components that are used to satisfy implementation requirements, this flag forces the component to have the attributes as specified in the interface as opposed to as specified in the user code.
OverridecallThis attribute applies only to classes and coclasses and the only setting recognized is on. It is used with those classes whose migrated reference class is being split; thus, the analyser should not insert type casts when it sees what appear to be type violations associated with this class.
CanbenullThis is an On/Off flag attribute. The On setting sets the CanbeNull status flag On. This means that checks of the component's value for being empty can be Null as well. References to them in the intermediate code have to be checked if they are Null or Empty.
MigPatternThis string attribute associates a surface pattern string with code references to the component. See the Patterns page for details on the content of pattern strings. It is equivalent to the All pattern.
CshPatternThis string attribute associates a surface pattern string with code references to the component. See the Patterns page for details on the content of pattern strings. It is equivalent to the Csh pattern.
VbnPatternThis string attribute associates a surface pattern string with code references to the component. See the Patterns page for details on the content of pattern strings. It is equivalent to the Vbn pattern.
NpramThis integer attribute specifies the number of parameters associated with the surface pattern strings.
RoleThis attribute contains an optional keyword describing the overall role of the operation being authored via the surface pattern strings: Unknown, Property, Method, Define, Utility, Command, Constant, Function, Event, Control, Collection, Resource, Index, or Migclass. The default is None.
PatstatusAn optional keyword describing the overall status of the operation authored via the surface pattern strings: Ok, Delete, Deprecated, NotImplemented, MustCorrect, NotIdent, Postfix, or NeedsPren. The default is Ok.
ReftypeWithin a class there are three non-constant component types -- property, method, and accessor. The manner in which these components are referenced in the source code depends upon what type of component they are. This attribute changes this reference type to one of the above three. Obviously, great care must be taken in the use of this attribute. Note that when properties are being converted to methods this attribute also sets the CallPattern migration status flag. Simply stated the CallPattern flag, if set, indicates that the pattern specifies how the symbol is used as opposed to identified.
StatusThis attribute applies only to library class components like property, method, and accessor. It is used to set its status flags and must contain one of the entries from the PropertyStatus enumeration. This attribute completely replaces any other status flags set for the indicated component.
TypeThis attribute only has meaning if the identified migration component is a property, method, accessor, argument, or coclass. For coclasses the type specification literally changes them into TypeDefs. For the other components it changes their binary type information.
MigNameThis attribute changes the migration name of the component. It may be used with any component. The migration name is the name the author uses when it displays the identifier of this component. It does not effect the identifier of the component in so far as references to that component are concerned. In addition, to setting the name, this attribute also turns off the External and ActiveX migration status flags.
StaticThis is a On/Off flag attribute. The On setting sets the External status flag On. This means that the class is external to the library in the target implementation to which it was assigned in the source implementation. Therefore, when authoring the identifier of the component do not precede it with its source parent membership information.
AppobjectThis identifier attribute sets the AppObject status flag on and stores the identifier in the description table of the component. It means that the component is an application wide singleton object which requires that special AppObject code be authored for it.
LibtypeThis attribute changes the changes library type. It may only be used with Library components. This is an entry from the LibraryType enumeration.
MigStatusThis attribute has meaning for all components. Its purpose is to turn on one of the component status flags as listed on the Declaration page.
LocationThis attribute only has meaning if the identified migration component is a library. In this case the location string for that library is replaced by the supplied attribute value. The most commonly used replacement value is DoNotDeclare which tells the project file author not to include a reference to this library.
MigUsercodeThis attribute is used to trigger a Code event in a migration dll. The first token of the attribute string must match the event attribute value specified for a migration dll. Any additional tokens are optional and are processed by the event handler itself.
CreatableThis is an On/Off flag attribute. The Off setting sets the Noncreatable status flag On. It means that the component class objects cannot be created. When declaring objects of this class simply NULL them as opposed to using new to create an instance.
CasttypeThis attribute applies only to classes and coclasses and the only setting recognized is off. It is used with those classes whose migrated reference class is being split; thus, the analyser should not insert type casts when it sees what appear to be type violations associated with this class.
NetHandlerThis attribute is the name of the event handler to be used in the authored code.
NetArgsThis attribute is the name of the class to be associated with the arguments of the event handler to be used in the authored code.
BoxTypesThis attribute only applies to library components. It specifies a comma delimited list of possible types that this component may contain.
OptionalThis attribute specifies that the component is an optional argument and specifies the value to be used if the argument is omitted. The Argument page contains a description of the valid entries here.
ZeroBasedThis is an On/Off flag attribute. The On setting sets the ZeroBased process flag On. It is used by the analyser to decrement subscripted references to components with this flag set.
IsDbNullThis is an On/Off flag attribute. The On setting sets the IsDbNull status flag On. The component is a class whose instances should be checked against DbNull as opposed to Null.
PropertybagThis is an On/Off flag attribute. The On setting sets the Propertybag process flag On. This attribute tells the property bag processor of to look for BeginProperty and NameValue pairs for this component.
AxlocationThis string attribute applies to external libraries only. It is used for IDL authored ActiveX libraries that are to be used as COM components. It declares the pathname of the AxInterop library.
RemoveresumenextThis is an On/Off flag attribute. The On setting sets the Removeresumenext process flag On. This attribute tells the analyser to turn off the "On Error Resume Next" to try-catch conversions for a particular subprogram. The algorithms used here are fairly robust, but can never be perfect. Specific codes may well encounter problems that are best dealt with by simply turning the algorithms off.
RemoveonerrorgotoThis is an On/Off flag attribute. The On setting sets the Removeonerrorgoto process flag On. This attribute tells the analyser to turn off the "On Error Goto" to try-catch conversions for a particular subprogram. The algorithms used here are fairly robust, but specific codes may well encounter problems that are best dealt with by simply turning the algorithms off.
HasWeakSetterThis is an On/Off flag attribute for library components that have setters. If the attribute is On then the setter is treated as having type Variant or object regardless of any type associated with the component. It also blocks any type inferences for the component that might be derived from a strongly typed set to it.
uuidThis string attribute applies to external libraries only. It changes the uuid value associated with the library.
UseEventClass
This is an On/Off flag attribute for events. If the attribute is On then the an Event argument class will be generated for the event.

The script errors associated with the Migrate statement are as follows:


Error Description
1097Migrate identifier [%1d] is not defined.
Table of Contents

  • No labels