NAME

operator {} - object completion method

SYNOPSIS

obj.operator {}(args)

APPLIES TO

Newly created objects using either the new cls syntax or the static class cls syntax. Also applies to objects used as the target of the with statement.

ARGUMENTS

The first argument of operator {} is a Bool indicating whether the object was fully completed. The remaining args are each public that was initialized in the current property assignment segment.

RETURN VALUE

None

DESCRIPTION

When an object is newly created, but after any property assignments are executed, the completion operator {} is called. It will also be called after all of the property assignments in a with statement. The first argument to operator {} is true if the object was actually completed, or false if the object was partially completed via the ... syntax. For each public that is initialzed inside the braces of the property assignment segment, that public is passed as one of the arguments.

EXAMPLE

          class cls {
             public var a, b, c, d;
             public operator {} () {
                 "cls.`{}(", oadl::argvec(), ")\n";
             }
          }
          a = new cls() {a=3 b=4} // dynamic object creation
    cls.`{}(true a b)

          cls() obj { c=5 ... } // static object creation with continuation
    cls.`{}(false c)

          with (a) {d = 6}
    cls.`{}(true d)

SEE ALSO

create
destroy