Programming in XPCE/Prolog: Section 8.1

## 8.1 Accessing Class Variables

Class variables define get-behaviour and can be accessed using the normal get/[3-13] call. Class variables are the last type of behaviour checked when resolving a get-method. Below are the most commonly used methods to access class-variables.

object <-class_variable_value: name
  any Return the value of the named class-variable. Fails silently if the class does not define the given class-variable.
class <-class_variable: name
  class_variable Return the class_variable object with the given name. Fails silently if the class does not define the given class-variable.
class_variable <->value: any
  Reads or writes the class-variable value. The argument is type-checked using `class_variable`<-`type' if the value is written. Writing class-variables should be handled with care, as existing instances of the class are not notified of the change, and may not be prepared deal with changes of the class-variable value. pce_image_directory/1 is an example of a predicate modifying the image.path class-variable.