Fabasoft app.ducx allows you to extend existing object classes, enumeration types, and compound types that belong to another software component.
Cloud profile note: The extension of object classes, enumeration types, and compound types that belong to another non-friend software component is not allowed.
You can extend an existing object class belonging to another software component with new properties of your software component.
Please note that you cannot extend object classes not belonging to your software component with properties not belonging to your software component. However, you can reuse existing properties of your software component for extending an existing object class, even if the object class belongs to a different software component.
When extending an existing object class, be sure to add a reference to the software component of this object class. Otherwise, your project will not compile.
The extend keyword must be used for denoting an extension, followed by the class keyword and the reference of the object class to be extended. Then the new properties that should be added to the object class can be defined or referenced inside the class block.
Syntax |
extend class reference { |
In the following example, object class FSCFOLIO@1.1001:Organisation is extended with a list of projects.
Example |
objmodel APPDUCXSAMPLE@200.200 class Project : CompoundObject { // FSCFOLIO@1.1001:Organisation is extended with the object pointer |
The extend keyword followed by the keyword property and a block holding the properties allows you to extend properties of other software components.
Syntax |
extend property reference { |
A common use case for this feature is to extend the allowed object classes in object pointer properties of other software components
Example |
objmodel APPDUCXSAMPLE@200.200 |
With the extend keyword followed by the enum keyword and a block holding the enumeration items, you can add enumeration items to an existing enumeration type belonging to another software component.
Syntax |
extend enum reference { |
When extending an existing enumeration type, be sure to assign integer values for the new enumeration items that will not conflict with possible entries that might be added in a future version.
For example, the enumeration type FSCFOLIO@1.1001:DocState already contains enumeration items with the integer values of 10, 20, 30 and 40. A logical continuation of this sequence would include the integer values 50, 60, 70 and so. Therefore, you should avoid these integer values when extending the enumeration type.
Example |
objmodel APPDUCXSAMPLE@200.200 |
The extend keyword followed by the keyword struct and a block holding the properties allows you to extend compound types of other software components with properties belonging to your software component.
Syntax |
extend struct reference { |
When extending a compound type of another software component, reusing properties that belong to other software components is not permitted in the compound type.
Furthermore, be aware that compound types belonging to software component COOSYSTEM@1.1 cannot be extended.
Example |
objmodel APPDUCXSAMPLE@200.200 |