# OOP Syntax Elements

> Source: https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/oop-syntax-elements

Below is a list of some of the directives and functions used in the implementation of PxPlus object-oriented mechanisms.

|  |  |
| --- | --- |
| **[DEF CLASS](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/def-class-directive)** | Defines the object class. |
| **[DROP CLASS](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/drop-class-directive)** | Deletes class definition and all related information. |
| **[DROP OBJECT](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/drop-object-directive)** | Deletes an object. |
| **[FUNCTION](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/function-directive)** | Declares functions or methods for the object. |
| **[LIKE](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/like-directive)** | Specifies other objects that this object inherits from. |
| **[LOAD CLASS](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/load-class-directive)** | Preloads a class definition into memory from a **.pvc** file. |
| **[LOCAL](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/local-directive)** | Declares internal data/properties for the object. |
| **[NEW( )](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/new-function)** | Creates an object instance. |
| **[OPEN OBJECT](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/open-object-directive)** | Opens a file for exclusive use in an object. |
| **[PRECISION](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/precision-directive)** | Sets default program precision for use within the object. |
| **[PROGRAM](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/program-directive)** | Defines the default program that contains the object logic. |
| **[PROPERTY](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/property-directive)** | Declares data/properties for the object. |
| **[REF( )](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/ref-function)** | Controls reference counts. |
| **[RENAME CLASS](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/rename-class-directive)** | Change name of an existing class. |
| **[STATIC](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/pxplus-oop-interface/static-directive)** | Dynamically declares **LOCAL** variables. |

System-supplied variables available while executing code on behalf of an object:

|  |  |
| --- | --- |
| **\_Class$** | Contains the name of the class for current object. |
| **\_Obj** | Identifies internal object identifier of current object. |
| **\_Refcnt** | Contains the reference count for this class of object. |
| **'\_Type$** | Internal property for PxPlus OOP objects that provides a list of the various combinations of parameter types for the objects methods/functions.<br>Each reference to a function declaration with different calling parameters will be listed using '\_Type$ with *numeric* parameters identified with an 'N' and *strings* with an 'S'.<br>Arrays will contain '{ALL}' and functions declared with the '(\*)' syntax will also be reported accordingly.<br>***Example:***<br>```<br>0010 DEF CLASS "TypeTest"<br>0020 FUNCTION Find(Numeric)FindFunc<br>0030 FUNCTION Find(String$)FindFunc<br>0040 FUNCTION Find(Numeric,String$)FindFunc<br>0050 FUNCTION Find(NumArray{ALL})FindFunc<br>0060 FUNCTION Find(StrArray${ALL})FindFunc<br>0070 FUNCTION Find(*)FindFunc<br>0080 END DEF<br>0090 !<br>0100 FindFunc:<br>0110 RETURN 0<br>x=new("TypeTest")<br>?x'*<br>Find(),<br>?x'_Type$<br>Find(*),Find(N),Find(N{ALL}),Find(N,S),Find(S),Find(S{ALL}),<br>``` |

## See Also

**[Putting It All Together](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/putting-it-all-together/overview)**
