IVersionControl Class Reference

Inheritance diagram for IVersionControl:

IBase


Public Methods

virtual void getVCSystem (IVCSystem *&system)=0
virtual void addObserver (IVCMessageObserver *observer)=0
virtual void removeObserver (IVCMessageObserver *observer)=0
virtual oa::oaUInt4 getStatus (IDMObject *object, oa::oaUInt4 mask=IDMObjectStatus::cAllStatus)=0
virtual void getStatus (IDMObjectStatusIter *&info, IDMContainer *cont, oa::oaUInt4 depth=oacCellViewFileVCQueryDepth, oa::oaUInt4 mask=IDMObjectStatus::cAllStatus)=0
virtual void getControlledObjects (IDMObjectIter *&objects, oa::oaUInt4 depth=oacCellViewFileVCQueryDepth, IDMObject *top=NULL, bool localOnly=false)=0
virtual void getVersions (IVersionIter *&versions, IDMObject *object)=0
virtual void getWorkingVersion (IVersion *&version, IDMObject *object)=0
virtual void getWorkingVersions (IDMObjectVersionIter *&objects, IDMContainer *cont, oa::oaUInt4 depth=oacCellViewFileVCQueryDepth)=0
virtual void update (IVersion *version, IDMObject *object, bool recurse=true, const char *options=NULL)=0
virtual void makeEditable (IDMObject *object, bool lock, bool recurse=true, const char *options=NULL)=0
virtual void cancelEdit (IDMObject *object, bool recurse=true, const char *options=NULL)=0
virtual void commitEdits (IDMObject *object, const char *comment, bool recurse=true, bool keepEditable=false, const char *options=NULL)=0
virtual void setControlled (IDMObject *object, bool recurse=true, const char *options=NULL)=0
virtual void unsetControlled (IDMObject *object, bool recurse=true, bool keepLocal=true, const char *options=NULL)=0

Detailed Description

This is an abstract class that specifies the interface for version control. This interface is used from OpenAccess to access the version control functionality. It can be implemented by DM plug-ins that also implement version control functionality, or it can be implemented by a stand-alone version control plug-in that will be aggregated by a DM plug-in.


Member Function Documentation

void IVersionControl::addObserver IVCMessageObserver *    observer [pure virtual]
 

This function is used to add a client-implemented message observer (see IVCMessageObserver).

Parameters:
observer This parameter is a pointer to the IVCMessageObserver interface implemented by the client.

void IVersionControl::cancelEdit IDMObject *    object,
bool    recurse = true,
const char *    options = NULL
[pure virtual]
 

This function cancels the editable state of the objects. It also cancels the editable state of the object's descendents if recurse is set to "true". Note that in most version control systems, this operation causes the underlying files to revert to what is currently in the repository. If any of the files involved are locked for edits with the DM system, this operation will release that lock.

Parameters:
object This is a pointer to an IDMObject interface representing the object on which to apply this operation.
recurse If this parameter is set to "true" then this operation will apply to all the descendents of the given object.
options This is a string containing VC system specific options. OA places no restrictions or specifications on what the form of this string can be. Consult the manual for the specific VC system in use.

void IVersionControl::commitEdits IDMObject *    object,
const char *    comment,
bool    recurse = true,
bool    keepEditable = false,
const char *    options = NULL
[pure virtual]
 

This function commits any pending *saved* changes of the file to the VC system repository. If recurse is "true", it also commits the pending changes to this object's descendents.

Parameters:
object This is a pointer to an IDMObject interface representing the object on which to apply this operation.
comment This is the comment string that the VC system will use as the check-in comment for this file.
recurse If this parameter is set to "true" then this operation will apply to all the descendents of the given object.
keepEditable If this parameter is set to "true" then the files being operation upon will continue to be in an editable state when this function returns. Any that were locked for edit with the DM system will continue to be so locked.
options This is a string containing VC system specific options. OA places no restrictions or specifications on what the form of this string can be. Consult the manual for the specific VC system in use.

void IVersionControl::getControlledObjects IDMObjectIter *&    objects,
oa::oaUInt4    depth = oacCellViewFileVCQueryDepth,
IDMObject *    top = NULL,
bool    localOnly = false
[pure virtual]
 

This function returns an iterator for the objects in this library that the version control system reports as being controlled.

Parameters:
objects This parameter is set to a pointer to an iterator of IDMObject pointers. objects in this collection are controlled by this instance of the VC plug-in.
depth This is the depth to which this query should descend. This parameter should be set to one of the values in oaVCQueryDepthEnum. See oaVCQueryDepthEnum for a description of the depth values.
top This is the object to use as the top of the tree for the status query. If this parameter is set to the IDMLib and "depth" is set to cCellViewFileDepth (the default), then all of the controlled files in the library will be reported.
localOnly If this parameter is set to "true" by the caller, then only files that are present in the local workspace are reported. Note that for some VC systems, all files are local and the value of this parameter will have no effect on the results.

void IVersionControl::getStatus IDMObjectStatusIter *&    info,
IDMContainer *    cont,
oa::oaUInt4    depth = oacCellViewFileVCQueryDepth,
oa::oaUInt4    mask = IDMObjectStatus::cAllStatus
[pure virtual]
 

This function gets the status of all the files belonging to the given container.

Parameters:
info This parameter is set to a pointer to an iterator of IDMObjectStatus that represent the object/status relationships of the requested objects.
cont This is the container object to use as the top of the tree for the status query. If this parameter is set to the IDMLib and "depth" is set to cCellViewFileDepth (the default), then the status of all files in the library will be reported.
depth This is the depth to which this query should descend. This parameter should be set to one of the values in oaVCQueryDepthEnum. See oaVCQueryDepthEnum for a description of the depth values.
mask This is a bitfield used to limit the status bits that are reported by this call. The assumption is that some status states are more expensive to discover than others, and this parameter can be used to limit the work done to report status if only a subset of the bits are going to be checked. Use the values in IDMObjectStatus::StatusEnum combined with a bit-wise OR to indicate which bits you are interested in. The default is to report all status bits.

oa::oaUInt4 IVersionControl::getStatus IDMObject *    object,
oa::oaUInt4    mask = IDMObjectStatus::cAllStatus
[pure virtual]
 

This function gets the version control status of the object. The return value is a bit-field that's composed of the values found in IDMObjectStatus::StatusEnum.

Parameters:
object This is the object whose status is being queried.
mask This is a bitfield used to limit the status bits that are reported by this call. The assumption is that some status states are more expensive to discover than others, and this parameter can be used to limit the work done to report status if only a subset of the bits are going to be checked. Use the values in IDMObjectStatus::StatusEnum combined with a bit-wise OR to indicate which bits you are interested in. The default is to report all status bits.

void IVersionControl::getVCSystem IVCSystem *&    system [pure virtual]
 

This function returns the version control system interface for this plug-in.

Parameters:
system This parameter is set with a pointer to an IVCSystem interface that represents the overall VC system. Note that (as with all interface output parameters) the reference count on "system" will be incremented by this function prior to returning.

void IVersionControl::getVersions IVersionIter *&    versions,
IDMObject *    object
[pure virtual]
 

This function is used to retrieve all of the version information for a single object. For example, if "object" has been modified and committed to the repository three times, creating versions "1", "2", and "3", then the iterator will represent a collection with three elements. The display name from the IVersion for each element will contain the user readable string representing each of these versions. The versions should, in general, be iterated from earliest to latest, but it's up to the implementation of the VC system to determine how situations such as branches are handled.

Parameters:
versions This parameter is set to a pointer to an iterator if IVersion interfaces.
object This is a pointer to the object whose version information is being queried.

void IVersionControl::getWorkingVersion IVersion *&    version,
IDMObject *    object
[pure virtual]
 

This function retrieves the version information of the specified object. The version information reported back is the version of the file that is currently visible in the users workspace. The object must be versionable and belong to this library.

Parameters:
version A pointer to the version interface for the working version of this object.
object The object whose working version information is being queried.

void IVersionControl::getWorkingVersions IDMObjectVersionIter *&    objects,
IDMContainer *    cont,
oa::oaUInt4    depth = oacCellViewFileVCQueryDepth
[pure virtual]
 

This function retrieves the version information of the specified objects. The version information reported back is the version of the file that is currently visible in the users workspace. The objects in the array must all be versionable and belong to this library.

Parameters:
objects This parameter is set to a pointer to an iterator of IDMObjectVersion interfaces. Each instance of this interface represents an object and it's working version information that's being reported by this function.
cont This is the container object to use as the top of the tree for querying the working version information. If this parameter is set to the IDMLib for this library, and "depth" is set to "cCellViewFileDepth" (the default) then all controlled objects in the current library will be reported in the iterator.
depth This is the depth to which this query should descend. This parameter should be set to one of the values in oaVCQueryDepthEnum. See oaVCQueryDepthEnum for a description of the depth values.

void IVersionControl::makeEditable IDMObject *    object,
bool    lock,
bool    recurse = true,
const char *    options = NULL
[pure virtual]
 

This function sets the version control access mode of the specified object to be editable. If recurse is "true", the object's descendents are also made editable. On some version control systems this may involve a check-out of underlying files.

Parameters:
object This is a pointer to an IDMObject interface representing the object on which to apply this operation.
lock If this parameter is set to "true", then the DMFiles that are made editable are also locked for editing with the DM system.
recurse If this parameter is set to "true" then this operation will apply to all the descendents of the given object.
options This is a string containing VC system specific options. OA places no restrictions or specifications on what the form of this string can be. Consult the manual for the specific VC system in use.

void IVersionControl::removeObserver IVCMessageObserver *    observer [pure virtual]
 

This function is used to remove a client-implemented message observer that has been previously added via IVersionControl::addObserver().

Parameters:
observer This parameter is a pointer to the IVCMessageObserver interface implemented by the client.

void IVersionControl::setControlled IDMObject *    object,
bool    recurse = true,
const char *    options = NULL
[pure virtual]
 

This function sets the object (and its descendents if recurse is "true") to be controlled by the version control system. This is often referred to as an "add" operation. Note that the timing of the file actually appearing in the central repository is dependent on the implementation of the VC system.

Parameters:
object This is a pointer to an IDMObject interface representing the object on which to apply this operation.
recurse If this parameter is set to "true" then this operation will apply to all the descendents of the given object.
options This is a string containing VC system specific options. OA places no restrictions or specifications on what the form of this string can be. Consult the manual for the specific VC system in use.

void IVersionControl::unsetControlled IDMObject *    object,
bool    recurse = true,
bool    keepLocal = true,
const char *    options = NULL
[pure virtual]
 

This function removes the object (and its descendents if recurse is "true") from the version control system repository. Note that the timing of the file actually disappearing from the central repository is dependent on the implementation of the VC system.

Parameters:
object This is a pointer to an IDMObject interface representing the object on which to apply this operation.
recurse If this parameter is set to "true" then this operation will apply to all the descendents of the given object.
keepLocal If this parameter is set to "false" the local representation of the file is removed from the local workspace. Otherwise it is left intact. Note that some VC systems will ignore this parameter if one or the other of these states is not supported by its access model.
options This is a string containing VC system specific options. OA places no restrictions or specifications on what the form of this string can be. Consult the manual for the specific VC system in use.

void IVersionControl::update IVersion *    version,
IDMObject *    object,
bool    recurse = true,
const char *    options = NULL
[pure virtual]
 

This function updates object (and the object's children if recurse is "true") from the VC systems repository. This function can be used to populate a library by passing a newly created library that has been associated with an existing library repository and setting "recurse" to "true". Files in the local workspace that have been modified will, in general, be merged with the current changes in the repository (if any).

Parameters:
version This is a VC System dependent version object. See IVCSystem::newVersionObject for information on how to request a version object from the VC plug-in.
object This is a pointer to the object to be updated. If it's a container, then the "recurse" parameter is checked (see below).
recurse If "object" is a container, and "recurse" is set to "true" (the default) then the update happens recursively. That is, all children of "object" will be updated, and, if any of them are container, their children will be updated recursively.
options This is a string containing VC system specific options. OA places no restrictions or specifications on what the form of this string can be. Consult the manual for the specific VC system in use.


The documentation for this class was generated from the following files:

Return to top of page