ICCAttributeType interface

Description

The ICCAttributeType interface represents the Rational® ClearCase® attribute type object.

Every attribute is an instance of a kind of attribute type. The meaning associated with a particular attribute type is user-defined.

Inheritance

ICCAttributeType inherits from ICCVOBObject, which inherits from IDispatch. ICCVOBObject interface

Properties and related methods

Constraint and SetConstraint

Gets the constraint for this attribute type

Sets the constraint for this attribute type

DefaultValue and SetDefaultValue

Gets the default value for this attribute type

Sets the default value for this attribute type

EnumValuesArray and SetEnumValuesArray

Gets the enumerated values for this attribute type

Sets the enumerated values for this attribute type

Group and SetGroup

Gets the group to which this attribute type belongs

Sets the group to which this attribute type belongs

HasSharedMastership and ShareMastership

Gets whether attribute type is shared or can be mastered

Sets whether attribute type is shared or can be mastered

LowerValue and SetLowerValue

Gets the lower value for this attribute type

Sets the lower value for this attribute type

Master and SetMaster

Gets the master replica for this attribute type

Sets the master replica for this attribute type

Name (default property) and SetName

Gets the name of this attribute type

Sets the name of this attribute type

Owner and SetOwner

Gets the owner of this attribute type

Sets the owner of this attribute type

Scope and SetScope

Gets the scope of this attribute type (for example, local to this VOB)

Sets the scope of this attribute type (for example, local to this VOB)

UpperValue and SetUpperValue

Gets the upper value for this attribute type

Sets the upper value for this attribute type

ValueType and SetValueType

Gets the value type for this attribute

Sets the value type for this attribute

Read-only properties

Lock

Gets the lock on this attribute type

LowerIsInRange

Specifies whether or not the lower value is in the range of legal values

NumberOfEnumValues

Gets the number of enumerated values for this attribute type

UpperIsInRange

Specifies whether or not the upper value is in the range of legal values

VOB

Gets the VOB that contains this attribute type

Methods

Apply

Applies an instance of this attribute type to a VOB object

CreateLock

Locks this attribute type

RemoveType

Removes this attribute type from the VOB

Examples

Creation

You can get a CCAttributeType object from the following interfaces:

Apply

Applies an instance of this attribute type to a VOB object

Category

Method

VB syntax

Sub Apply(pVOBObject As CCVOBObject, [Value As Variant ], [ Comment As String = "" ], [ Replace As Boolean = False ], [ Recurse As Boolean = False ])

Visual C++ syntax

HRESULT Apply(
     ICCVOBObject* pVOBOBject,
     const _variant_t& Value,
     _bstr_t Comment,
     VARIANT_BOOL Replace,
     VARIANT_BOOL Recurse);
Parameter
Description
pVOBObject
Object to which the new attribute will be applied.
Value
Optional in Visual Basic. The value for this instance of the attribute type. If this attribute type has no default value, Value must be supplied.
Comment
Optional in Visual Basic. A comment to associate with the history record for this Apply operation.
Replace
Optional in Visual Basic. True to replace the existing attribute of the type; False to fail if the attribute exists.
Recurse
Optional in Visual Basic. True to process the entire subtree below any directory element encountered; False to process only the directory element itself, or a file.

Member of: ICCAttributeType interface

Constraint

Gets the constraint for this attribute type

Category

Read-only property

VB syntax

Property Constraint As CCTypeConstraint

Visual C++ syntax

CCTypeConstraint GetConstraint();

Return value

A CCTypeConstraint value.

CreateLock

Locks this attribute type

Category

Method

VB syntax

Sub CreateLock([ Comment As String = "" ], [ Obsolete As Boolean = False ],[ ExemptUsersStringArray As Variant ])

Visual C++ syntax

HRESULT CreateLock(
     _bstr_t Comment,
     VARIANT_BOOL Obsolete
     const _variant_t& ExemptUsersStringArray = vtMissing);
Parameter
Description
Comment
Optional in Visual Basic. A comment to associate with the history record for this CreateLock operation.
Obsolete
Optional in Visual Basic. True to make the locked attribute type obsolete in addition to locked (like cleartool lock -obsolete); False to lock the attribute type without making it obsolete.
ExemptUsersStringArray
Optional. Variant array of String values containing the names of users exempted from the lock being created.

See also

Lock

Member of: ICCAttributeType interface

DefaultValue

Gets the default value for this attribute type

Category

Read-only property

VB syntax

Property DefaultValue As Variant

Visual C++ syntax

_variant_t GetDefaultValue();

Return value

Matches the attribute type ValueType. If there is no DefaultValue, returns an error.

EnumValuesArray

Gets the enumerated values for this attribute type

Category

Read-only property

VB syntax

Property EnumValuesArray As Variant

Visual C++ syntax

_variant_t GetEnumValuesArray();

Return value

A array of Variants, where each element's type matches the attribute type's ValueType. If there is no enumerated value, returns an error.

Group

Gets the group to which this attribute type belongs

Category

Read-only property

VB syntax

Property Group As String

Visual C++ syntax

_bstr_t GetGroup();

HasSharedMastership

Gets whether attribute type is shared or can be mastered

Category

Read-only property

VB syntax

Property HasSharedMastership As Boolean

Visual C++ syntax

VARIANT_BOOL GetHasSharedMastership();

Lock

Gets the lock on this attribute type

Category

Read-only property

VB syntax

Property Lock As CCLock

Visual C++ syntax

ICCLockPtr GetLock();

LowerIsInRange

Specifies whether or not the lower value is in the range of legal values

Category

Read-only property

VB syntax

Property LowerIsInRange As Boolean

Visual C++ syntax

VARIANT_BOOL GetLowerIsInRange();

LowerValue

Gets the lower value for this attribute type

Category

Read-only property

VB syntax

Property LowerValue As Variant

Visual C++ syntax

_variant_t GetLowerValue();

Return value

Matches the attribute type's ValueType. If there is no LowerValue, returns an error.

Master

Gets the master replica for this attribute type

Category

Read-only property

VB syntax

Property Master As String

Visual C++ syntax

_bstr_t GetMaster();

Remarks

It is most likely that you want to operate on the local copy of the attribute type.

Name

Gets the name of this attribute type

Category

Read-only property

VB syntax

Property Name As String

Visual C++ syntax

_bstr_t GetName();

NumberOfEnumValues

Gets the number of enumerated values for this attribute type

Category

Read-only property

VB syntax

Property NumberOfEnumValues As Long

Visual C++ syntax

long GetNumberOfEnumValues();

Owner

Gets the owner of this attribute type

Category

Read-only property

VB syntax

Property Owner As String

Visual C++ syntax

_bstr_t GetOwner();

RemoveType

Removes this attribute type from the VOB

Category

Method

VB syntax

Sub RemoveType([ RemoveAllInstances As Boolean = False ],[ Comment As String = "" ])

Visual C++ syntax

HRESULT RemoveType(
     VARIANT_BOOL RemoveAllInstances,
     _bstr_t Comment);
Parameter
Description
RemoveAllInstances
Optional in Visual Basic. True to remove the attribute type and all instances of the type; False to remove the attribute type only if there are no instances of the type.
Comment
Optional in Visual Basic. A comment to associate with the history record for this RemoveType operation.

Member of: ICCAttributeType interface

Scope

Gets the scope of this attribute type (for example, local to this VOB)

Category

Read-only property

VB syntax

Property Scope As CCTypeScope

Visual C++ syntax

CCTypeScope GetScope();

Return value

A CCTypeScope value.

SetConstraint

Sets the constraint for this attribute type

Category

Method

VB syntax

Sub SetConstraint(NewConstraint As CCTypeConstraint, [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetConstraint(
     CCTypeConstraint NewConstraint,
     _bstr_t Comment);
Parameter
Description
NewConstraint
Instance restriction for the attribute type. Must be one of the valid CCTypeConstraint values.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetConstraint operation.

SetDefaultValue

Sets the default value for this attribute type

Category

Method

VB syntax

Sub SetDefaultValue([ DefaultValue As Variant ], [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetDefaultValue(
     const _variant_t& DefaultValue,
     _bstr_t Comment);
Parameter
Description
DefaultValue
Optional in Visual Basic. The value to assign to new attributes when the type is applied with an empty Value parameter. The type of DefaultValue must match the attribute type ValueType. To remove an existing default value setting, pass Empty.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetDefaultValue operation.

SetEnumValuesArray

Sets the enumerated values for this attribute type

Category

Method

VB syntax

Sub SetEnumValuesArray([ EnumValuesArray As Variant ], [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetEnumValuesArray(
     const _variant_t& EnumValuesArray,
     _bstr_t Comment);
Parameter
Description
EnumValuesArray
Optional in Visual Basic. Variant array of legal attribute values. Each array element's type must match the attribute type ValueType. To remove an existing enumerated value setting, pass Empty for that array element.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetEnumValuesArray operation.

SetGroup

Sets the group to which this attribute type belongs

Category

Method

VB syntax

Sub SetGroup(NewGroup As String, [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetGroup(
     _bstr_t NewGroup,
     _bstr_t Comment);
Parameter
Description
NewGroup
Name of the new group to which the attribute type will belong.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetGroup operation.

See also

Group

Member of: ICCAttributeType interface

SetLowerValue

Sets the lower value for this attribute type

Category

Method

VB syntax

Sub SetLowerValue([LowerValue As Variant ], [ LowerIsInRange As Boolean = False ], [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetLowerValue(
     const _variant_t& LowerValue,
     VARIANT_BOOL LowerIsInRange,
     _bstr_t Comment);
Parameter
Description
LowerValue
Optional in Visual Basic. New lower value. LowerValue type must match the attribute type ValueType. To remove an existing lower value, pass Empty.
LowerIsInRange
Optional in Visual Basic. Sets the range to include or exclude the lower value.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetLowerValue operation.

Remarks

Removes any enumerated values for the attribute type.

SetMaster

Sets the master replica for this attribute type

Category

Method

VB syntax

Sub SetMaster(Replica As String, [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetMaster(
     _bstr_t Replica,
     _bstr_t Comment);
Parameter
Description
Replica
Name of the replica to which mastership of the attribute type is being transferred.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetMaster operation.

Remarks

It is most likely that you want to operate on the local copy of the attribute type.

SetName

Sets the name of this attribute type

Category

Method

VB syntax

Sub SetName(NewName As String, [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetName(
     _bstr_t NewName,
     _bstr_t Comment);
Parameter
Description
NewName
The new name for the attribute type.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetName operation.

See also

Name

Member of: ICCAttributeType interface

SetOwner

Sets the owner of this attribute type

Category

Method

VB syntax

Sub SetOwner(NewOwner As String, [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetOwner(
     _bstr_t NewOwner,
     _bstr_t Comment);
Parameter
Description
NewOwner
Name of the owner to which ownership of the attribute type is being transferred.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetOwner operation.

See also

Owner

Member of: ICCAttributeType interface

SetScope

Sets the scope of this attribute type (for example, local to this VOB)

Category

Method

VB syntax

Sub SetScope(Global As Boolean, [ Acquire As Boolean = False ], [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetScope(
     VARIANT_BOOL Global,
     VARIANT_BOOL Acquire,
     _bstr_t Comment);
Parameter
Description
Global
True to make this attribute type global. Global types are accessible to all VOBs that use as an administrative VOB the VOB that contains the type. False to make this attribute type an ordinary type for use only within the VOB that contains it.
Acquire
Optional in Visual Basic. True to convert existing ordinary types that would be eclipsed by this operation into local copies of this global attribute type (only allowed if Global is True); False to fail if any existing types would be eclipsed. (An eclipsed type is one that has the same name as the global type in its administrative VOB.)
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetScope operation.

See also

Scope

Member of: ICCAttributeType interface

SetUpperValue

Sets the upper value for this attribute type

Category

Method

VB syntax

Sub SetUpperValue([ UpperValue As Variant ], [ UpperIsInRange As Boolean = False ], [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetUpperValue(
     const _variant_t& UpperValue,
     VARIANT_BOOL UpperIsInRange,
     _bstr_t Comment);
Parameter
Description
UpperValue
Optional in Visual Basic. New upper value. UpperValue type must match the attribute type ValueType. To remove an existing upper value, pass Empty.
UpperIsInRange
Optional in Visual Basic. Sets the range to include or exclude the upper value.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetUpperValue operation.

Remarks

Removes any enumerated values for the attribute type.

SetValueType

Sets the value type for this attribute

Category

Method

VB syntax

Sub SetValueType(ValueType As Long, [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetValueType(
     long ValueType,
     _bstr_t Comment);
Parameter
Description
ValueType
New type of attribute. Must be one of the valid value type constants.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetValueType operation.

Remarks

Removes any default value, enumerated values, and lower or upper values.

ShareMastership

Sets whether attribute type is shared or can be mastered

Category

Method

VB syntax

Sub ShareMastership([ Comment As String = "" ])

Visual C++ syntax

HRESULT ShareMastership(_bstr_t Comment);
Parameter
Description
Comment
Optional in Visual Basic. A comment to associate with the history record for this ShareMastership operation.

UpperIsInRange

Specifies whether or not the upper value is in the range of legal values

Category

Read-only property

VB syntax

Property UpperIsInRange As Boolean

Visual C++ syntax

VARIANT_BOOL GetUpperIsInRange();

UpperValue

Gets the upper value for this attribute type

Category

Read-only property

VB syntax

Property UpperValue As Variant

Visual C++ syntax

_variant_t GetUpperValue();

Return value

Matches the attribute type ValueType. If there is no UpperValue, returns an error.

ValueType

Gets the value type for this attribute

Category

Read-only property

VB syntax

Property ValueType As Long

Visual C++ syntax

long GetValueType();

Return value

One of the value type constants.

VOB

Gets the VOB that contains this attribute type

Category

Read-only property

VB syntax

Property VOB As CCVOB

Visual C++ syntax

ICCVOBPtr GetVOB();

Member of: ICCAttributeType interface


Feedback