Accessing a Property, Constant, or Method in a Metaschema
Use the :: meta-object scope operator to reference a property, constant, or method in a type, in the following format.
type-name::property-or-constant-or-method-name
The code fragments in the following example show the use of the scope operator to access a property, a constant, and a method.
write Product::code.name; // Outputs "code"
write Product::Obsolete.name; // Outputs "Obsolete"
write Customer::update.name; // Outputs "update"
The :: meta-object scope operator can be useful when specifying a property or method name as a parameter to a method. For example, you could use the code fragment shown in the following example when calling the
listenContinuousAsynch(someC1Obj, C1::tcpCallBackMethod.name);
The advantage of using this notation is that should you rename the method, it automatically renames and recompiles any references to this method that are constructed in this manner.