typedef command

Rational® Synergy supports type-dependent behaviors. For example, you can allow parallel versions for one type of object but not another. Or you can use a selected editor tool for objects of a specific type. When you use an appropriate type for your files, you can define the appropriate behaviors for that type. This method helps describe the purpose of objects of that type.

A type definition is an object that defines and represents the properties of a type. Objects of that type inherit certain properties and behaviors from the corresponding type definition.

Types can be categorized into the following groups:
  • project -

    A container for directories, files, and symlinks.

  • non project-member types

    These types cannot be used as members of a project and cannot display in work areas. Examples of such types are baseline, task, folder, releasedef, process_rule. These types are provided as base model types.

  • dir

    An organizational type that corresponds to a directory and owns zero, one, or many directory entries. Within a project, each directory entry for a directory typically has a corresponding child object that matches the directory entry.

  • file and symlink types

    These types can be used as members of a project and have a work area representation. Examples are dir, ascii, binary, csrc, and java.

Type definitions inherit some properties from a super_type. Type definitions have an inheritance hierarchy. Most file-based types use a super_type of either ascii or binary.
  • The binary type is a predefined base model type that represents files whose contents are binary and are always represented "as is" without any keyword expansion or end-of-line translation.
  • The ascii type is a predefined base model type that represents files whose contents are usually 7-bit ASCII. With files of type or subtype ascii, Rational Synergy looks at the file contents to determine whether they contain certain binary characters or a significant proportion of non 7-bit bytes. If they do, the system handles the source code for that file as if it were a binary type. That is, keyword expansion and end-of-line translation are not performed on such files.

Use the ccm typedef command to create file-based types and to modify dir, symlink, and file-based types. Only users that who are assigned the role type_developer or ccm_admin can create or modify type definitions.

Each type definition has a number of properties that describe the type:
Table 1. Type definition properties
Property Description
name The name of the type. For example, "java"
description A one-line description of the meaning or purpose of the type.
super_type The parent type for inheritance. It is invalid to define types with circular inheritance. Typical values are "ascii" or "binary".
source template Defines a template for the initial source contents of the file when a new object of that type is created. The template can contain Rational Synergy keywords that are expanded on creation.
range keyword expand

If a file has ascii contents, keyword expansion is performed on check out and, optionally, on check in. This property defines how many bytes at the start of the file are processed for keyword expansion.

The values might be any of the following:
  • -1 signifies that keyword expansion is enabled and the range is infinite. The entire file is processed.
  • 0 signifies that keyword expansion is disabled.
  • N>0 signifies that keyword expansion of the first N bytes is enabled.
parallel check out Specifies when parallel objects of this type are allowed on check out. A value of FALSE means that users cannot check out parallel versions for objects of this type. A value of TRUE means that parallels might be allowed. The release definition for the associated release of the object determines whether parallels are allowed.
parallel check in Specifies when parallel objects of this type are allowed on check in. A value of FALSE means that users cannot check in parallel versions for objects of this type. A value of TRUE means that parallels might be allowed. The release definition for the associated release of the object determines whether parallels are allowed.
active Specifies whether new objects of this type can be created or checked in. A value of FALSE is used to retire a type definition. Existing objects of that type remain unchanged. However, users must use the change type operation if they want to check in new versions of such objects. In this way, over time, users gradually move to using some alternative type.
execute permission Specifies whether on a UNIX work area updated by a UNIX client, the object has the UNIX ’x’ execute permission.
windows ignore On a Windows client, specifies whether reconcile and migrate should ignore files of this type.
unix ignore On a UNIX client, specifies whether reconcile and migrate should ignore files of this type.
windows match Specifies zero, one, or many regular expressions are used to match files on Windows clients. During create, reconcile and migrate operations on Windows, files that match any of these expressions use this type as the default. See Mapping rules for more details.
unix match Specifies zero, one, or many regular expressions are used to match files on UNIX clients. During create, reconcile and migrate operations on UNIX, files that match any of these expressions use this type as the default. See Mapping rules for more details.

The typedef command supports the following subcommands:


Feedback