Naming conventions

The Object Model of Q2Pix is implemented as a hierarchy of OOP classes. Part of this class hierarchy is depicted in this diagram:

Class Hierarchy

It would be great if 4D allowed us to present classes in an OOP way, but 4D’s language is not object-oriented ― yet. So, the only way to present these classes to 4D is by using naming conventions, such as method name prefixes.

All plug-in method names in Q2Pix have prefixes that denote the object class to which they belong:

Polymorphic methods used to manage the lifecycle of image document and XMP data objects.

Polymorphic methods that create image document references, retrieve image document properties, manage image frames (insertion/deletion), and save image documents.

They can be used with both raster and PDF documents.


Polymorphic methods that retrieve image frame geometry, properties, and create thumbnails.

They can be used with both raster frames and PDF pages.


Concrete methods that extract embedded thumbnails and XMP data from raster frames, and also allow editing of raster frames via filters.

These methods can be used only with raster frames.

Concrete methods that work with PDF documents. Currently there’s only one such method that extracts XMP data from a PDF document.
Concrete methods that work with PDF pages. Currently there’s only one such method that extracts the text from a PDF page.
Methods that return the list of supported formats and information about each format.
Methods for managing the plug-in area.
Methods for creating XMP data packets from and saving to RDF, and for managing the element hierarchy in the XMP packet.
Methods that register and manage XMP namespaces.
Utility methods for parsing, converting, and comparing dates in the ISO 8601 format, which is used to represent dates in XMP.
Methods for acquiring images from image sources (scanners, cameras, etc).
Utility methods for getting the format and data of the multiple image representations present in a 4D picture.
Methods that get and set the Q2Pix per-process error status and information.

Component methods follow the same conventions, and also define their own prefixes to group related methods such as those dealing with the common geometric 4D objects.

Another naming convention is the use of the _JSN suffix to denote plug-in methods that accept JSON parameters, or return their result in JSON format. These have counterpart wrapper methods implemented in the Q2PixLib component that convert JSON arguments to/from 4D objects.