vcProgram

vcProgram is an executable program that can be run by vcExecutor objects. Every executor, by default, has its own a built-in program.

Properties

Name Type Access Description
Executor vcExecutor R Gets the executor of the program.
MainRoutine vcRoutine R Gets the main routine of the program.
Name String RW Defines the name of the program.
Properties List of vcProperty R Gets a list of properties in the program.
Routines List of vcRoutine R Gets a list of all routines in the program other than the main routine.

Methods

Name Return Type Parameters Description
addRoutine vcRoutine String name Creates a new routine of a given name in the program, and then returns the new routine.
createProperty vcProperty Enumeration type, String name Creates a new property of a given type and name in the program, and then returns the new property.

An optional constraints argument can be used to define constraints for new property, which must be defined at the time of creation.

See Property Constants for more information.

deleteProperty None vcProperty property Deletes a given property in the program.
deleteRoutine None vcRoutine routine Deletes a given routine from the program.
findRoutine vcRoutine String name Returns a routine matching a given name in the program; otherwise returns None.
getProperty vcProperty String name Returns a property matching a given name in the program; otherwise returns None.

Events

Name Parameters Description
OnRoutineAdded vcRoutine routine Triggered when a new routine is added to the program.
OnRoutineRemoving vcRoutine routine Triggered when a routine is being deleted from the program.
OnStatementAdded vcStatement statement Triggered when a statement is added to the program.
OnStatementRemoving vcStatement statement Triggered when a statement is removed from the program.