Type objects
A type object is a prototype for one or more type instances stored in a VOB database.
If a type object exists, a user can create an instance of it by entering the appropriate command (for example, cleartool mklabel to create an instance of a label type object).
Type | Mnemonic | Description |
Element type | eltype | Instances are elements. |
Branch type | brtype | Instances are branches. |
Hyperlink type | hltype | Instances are VOB hyperlinks that connect two related objects. |
Trigger type | trtype | Instances are triggers. |
Type | Mnemonic | Description |
Label type | lbtype | Instances are labels that can be attached to any version object. |
Attribute type | attype | Instances are attributes (name=value pairs) that can be attached to any instance of a type object. |
cleartool describe brtype:v4_patch
Instances of type objects
After a type object is created, users can create instances of the type. Creating an instance of a type creates a reference to the type object. For example, attaching the label BASELEVEL_7.0 to a particular version does not make a copy of the BASELEVEL_7.0 type object. Instead, it establishes a connection between the element version and the label type object. The following table describes how type objects are used by cleartool commands that create instances of types.
- Type object
- Relationship of type object to type instance
- Element
- Each file or directory element in a VOB is created by mkelem or mkdir as an instance of an existing element type in that VOB.
- Branch
- Each branch in an element is created by mkbranch as an instance of an existing branch type in that element’s VOB.
- Label
- The mklabel command labels an object with an instance of an existing label type.
- Attribute
- The mkattr command annotates a version, branch, element, VOB symbolic link, or hyperlink with an attribute, by creating an instance of an existing attribute type. Each instance of an attribute has a particular value—a string, an integer, and so on.
- Hyperlink
- The mkhlink command creates a hyperlink object, which is an instance of an existing hyperlink type. A hyperlink connects two objects, which can be in the same VOB or in different VOBs.
- Trigger
- The mktrigger command creates a trigger object, which is an instance of an existing trigger type. The trigger may be attached to one or more elements.
Scope of type objects
Predefined and user-defined type objects
- mkattype creates or modifies an attribute type object
- mkbrtype creates or modifies a branch type object
- mkeltype creates or modifies an element type object
- mkhltype creates or modifies a hyperlink type object
- mklbtype creates or modifies a label type object
- mktrtype creates or modifies a trigger type object
The reference page for each of these commands lists all predefined type objects associated with the command. (For example, the mkeltype reference page lists all of the predefined element types.) You can also use the HCL VersionVault Administration Console or the cleartool lstype command to list the type objects defined in a given VOB.