Previous: Alive and dead objects, Up: VCL Overview

8.1.8 Naming, programming and documentation conventions

Function names are composed of lower-case letters with underscore used as word separator. Function and method names are always prefixed with vcl_, then the class name (in case of a class-specific function) or if_ and the interface name (in case of interface method).

Pointers to unspecific VCL objects are of type void *. Common classes have functions with the _new suffix for creating objects of that class, with the _p suffix for predicates that test whether the argument is an object of that class, and with the _main suffix for internal functions used during initialisation of the library to initialise the particular class. Common interfaces have suffices _main and _p with a similar meaning.

In the next section, the functions are split into three groups – public, private, and internal. Public functions are functions which are supposed to be used by applications. Private functions are functions which are supposed to be used internally, but are not hidden and may be sometimes used by applications. Internal functions are functions similar to private, but they are only accessible in the vcl_internal.h header file.