ICCVersion interface

Description

The ICCVersion interface represents the Rational® ClearCase® version object.

Inheritance

ICCVersion inherits
from ICCFile, which inherits from ICCVOBObject, which inherits from IDispatch.
The descendant of ICCVersion is ICCCheckedOutFile. ICCVOBObject interface ICCFile interface ICCCheckedOutFile interface

Read-only properties

Branch

Gets the branch for this version

Element

Gets the element of this version

Identifier

Gets the identifier string of this version

IsCheckedOut

Gets whether this object represents a checked-out file

IsDifferent

Gets whether this version is different from its predecessor

IsHijacked

Gets whether this version is hijacked

IsLatest

Gets whether this version is the latest on its branch

Label

Gets a label of a specific type for this version

Labels

Gets the collection of labels associated with this version

Parent

Gets the current view's version of this version's parent directory

Predecessor

Gets the predecessor version of this version

SubBranches

Gets any branches sprouting from this version

VersionNumber

Gets the version number of this version

Methods

CheckOut

Checks out this version

RemoveVersion

Removes the version irretrievably

Examples

Creation

Branch

Gets the branch for this version

Category

Read-only property

VB syntax

Property Branch As CCBranch

Visual C++ syntax

ICCBranchPtr GetBranch();

Member of: ICCVersion interface

CheckOut

Checks out this version

Category

Method

VB syntax

Function CheckOut(ReservedState As CCReservedState, [ Comment As String = "" ], [ UseHijacked As Boolean = False ], [ Version As CCVersionToCheckOut = CCVersion_Default ], [ MustBeLatest As Boolean = False ], [ PreserveTime As Boolean = False ]) As CCCheckedOutFile

Visual C++ syntax

ICCCheckedOutFilePtr CheckOut(
     CCReservedState ReservedState,
     _bstr_t Comment,
     VARIANT_BOOL UseHijacked,
     CCVersionToCheckOut Version,
     VARIANT_BOOL MustBeLatest,
     VARIANT_BOOL PreserveTime);
Parameter
Description
ReservedState
Specifies the reserved state of the checkout using these valid CCReservedState values.
Comment
Optional in Visual Basic. A comment to associate with the history record for this CheckOut operation.
UseHijacked
Optional in Visual Basic. True to specify that if the file being checked out is hijacked, the checked-out file should contain the contents of the hijacked file, rather than overwriting the contents of the hijacked file with what was in the VOB; False to use what was in the VOB for the file contents.
Version
Optional in Visual Basic. Specifies the version to check out using these valid CCVersionToCheckOut values.
MustBeLatest
Optional in Visual Basic. True to fail if the specified version is not the latest on the branch; False to succeed.
PreserveTime
Optional in Visual Basic. True to preserve the modification time of the file being checked out; False to set the modification time to the time of the checkout. (Ignored for snapshot views.)

Return value

A CCCheckedOutFile object that represents the checked-out file.

Remarks

A view context is required for CheckOut to succeed. CheckOut always fails for a file in the "hijacked, no checkout" state.

Member of: ICCVersion interface

Element

Gets the element of this version

Category

Read-only property

VB syntax

Property Element As CCElement

Visual C++ syntax

ICCElementPtr GetElement();

Member of: ICCVersion interface

Identifier

Gets the identifier string of this version

Category

Read-only property

VB syntax

Property Identifier As String

Visual C++ syntax

_bstr_t GetIdentifier();

Member of: ICCVersion interface

IsCheckedOut

Gets whether this object represents a checked-out file

Category

Read-only property

VB syntax

Property IsCheckedOut As Boolean

Visual C++ syntax

VARIANT_BOOL GetIsCheckedOut();

Member of: ICCVersion interface

IsDifferent

Gets whether this version is different from its predecessor

Category

Read-only property

VB syntax

Property IsDifferent As Boolean

Visual C++ syntax

VARIANT_BOOL GetIsDifferent();

Member of: ICCVersion interface

IsHijacked

Gets whether this version is hijacked

Category

Read-only property

VB syntax

Property IsHijacked As Boolean

Visual C++ syntax

VARIANT_BOOL GetIsHijacked();

Member of: ICCVersion interface

IsLatest

Gets whether this version is the latest on its branch

Category

Read-only property

VB syntax

Property IsLatest As Boolean

Visual C++ syntax

VARIANT_BOOL GetIsLatest();

Member of: ICCVersion interface

Label

Gets a label of a specific type for this version

Category

Read-only property

VB syntax

Property Label(LabelType As String) As CCLabel

Visual C++ syntax

ICCLabelPtr GetLabel(_bstr_t LabelType);
Parameter
Description
LabelType
The label type of the label to return.

Member of: ICCVersion interface

Labels

Gets the collection of labels associated with this version

Category

Read-only property

VB syntax

Property Labels As CCLabels

Visual C++ syntax

ICCLabelsPtr GetLabels();

Member of: ICCVersion interface

Parent

Gets the current view's version of this version's parent directory

Category

Read-only property

VB syntax

Property Parent As CCVersion

Visual C++ syntax

ICCVersionPtr GetParent();

Member of: ICCVersion interface

Predecessor

Gets the predecessor version of this version

Category

Read-only property

VB syntax

Property Predecessor As CCVersion

Visual C++ syntax

ICCVersionPtr GetPredecessor();

Member of: ICCVersion interface

RemoveVersion

Removes the version irretrievably

Attention: This is a potentially destructive operation. Because CAL does not prompt the user for input under any circumstances, there is no confirmation step when RemoveVersion is invoked. Invoking RemoveVersion is equivalent to running cleartool rmver with the -force option.

Category

Method

VB syntax

Sub RemoveVersion([ Comment As String = "" ], [ DataOnly As Boolean = False ], [ EvenIfBranches As Boolean = False ], [ EvenIfLabels As Boolean = False ], [ EvenIfAttributes As Boolean = False ], [ EvenIfHyperlinks As Boolean = False ])

Visual C++ syntax

HRESULT RemoveVersion(
     _bstr_t Comment,
     VARIANT_BOOL DataOnly,
     VARIANT_BOOL EvenIfBranches,
     VARIANT_BOOL EvenIfLabels,
     VARIANT_BOOL EvenIfAttributes,
     VARIANT_BOOL EvenIfHyperlinks);
Parameter
Description
Comment
Optional in Visual Basic. A comment to associate with the history record for this RemoveVersion operation.
DataOnly
Optional in Visual Basic. True to remove the data for the specified version; False to remove the version object itself, its subbranches and its associated metadata, as well as the data (like cleartool rmver -data).
EvenIfBranches
Optional in Visual Basic. True to remove the version even if one or more branches begin there (like cleartool rmver -xbranch); False to fail if one or more branches begin there.
EvenIfLabels
Optional in Visual Basic. True to remove the version even if it has one or more version labels (like cleartool rmver -xlabel); False to fail if it has one or more labels.
EvenIfAttributes
Optional in Visual Basic. True to remove the version even if it has one or more attributes (like cleartool rmver -xattr); False to fail if it has one or more attributes.
EvenIfHyperlinks
Optional in Visual Basic. True to remove the version even if it has one or more hyperlinks (like cleartool rmver -xhlink); False to fail if it has one or more hyperlinks.

Member of: ICCVersion interface

SubBranches

Gets any branches sprouting from this version

Category

Read-only property

VB syntax

Property SubBranches As CCBranches

Visual C++ syntax

ICCBranchesPtr GetSubBranches();

Remarks

Checked-out files do not have subbranches.

Member of: ICCVersion interface

VersionNumber

Gets the version number of this version

Category

Read-only property

VB syntax

Property VersionNumber As Long

Visual C++ syntax

long GetVersionNumber();

Remarks

Checked-out files do not have version numbers.

Member of: ICCVersion interface


Feedback