A class serves as a blueprint/template for describing a specific type of object. They can be used to describe both physical and intangible assets. Classes pertaining to a particular domain are typically grouped together and their definitions stored in what are referred to as a schema. An Employee is an example of a physical asset that is associated with a company.

MDL_Programmer's_Guide-31-2-2a.jpg

The Company that the employee works for is not in and of itself a physical asset, but rather an association formed and organized to carry on a business.

MDL_Programmer's_Guide-31-2-2b.jpg

Notice both of the above classes are designated as IsDomainClass, which indicates that instances can be created from it. This attribute is typically set to false for abstract classes, since instances are not created for them. An example of one such class is shown below.

MDL_Programmer's_Guide-31-2-2c.jpg

Classes are also often times used to define complex data types, having multiple pieces of data associated with them. The Location class shown below is an example.

MDL_Programmer's_Guide-31-2-2d.jpg

Notice in this case, the class is designated as a IsStruct, which indicates it is a structure. Also, notice that it is also designated as a IsDomainClass, since instances will be created from it. Class are used for other purposes as well (e.g., relationships and custom attributes), which will be discussed later.


Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.