-
首页
-
C4D R23.110 C++ SDK
SourceControlInterface Class Reference
IO
#include <sourcecontrol.h>
公共成员函数
|
MAXON_METHOD
Result
<
Url
>
|
CheckoutFile
(const
Url
&path)
|
MAXON_METHOD
Result
< void >
|
SyncFile
(const
Url
&path,
Int
changeList=-1, const ProgressMonitorRef &monitor=
GetZeroRef
< ProgressMonitorRef >())
|
MAXON_METHOD
Result
< void >
|
SyncFileRevision
(const
Url
&path,
Int
revision=-1, const ProgressMonitorRef &monitor=
GetZeroRef
< ProgressMonitorRef >())
|
MAXON_METHOD
Result
<
HashMap
<
Url
,
Int
> >
|
GetRevisionOnDrive
(const
Url
&path)
|
MAXON_METHOD
Result
< void >
|
RevertFile
(const
Url
&path)
|
MAXON_METHOD
Result
<
Url
>
|
GetNameOnDrive
(const
Url
&path)
|
MAXON_METHOD
Result
<
Int
>
|
SubmitChangelist
(const
String
&description)
|
MAXON_METHOD
Result
<
Url
>
|
AddFile
(const
Url
&path)
|
MAXON_METHOD
Result
<
Url
>
|
DeleteFile
(const
Url
&path)
|
MAXON_METHOD
Result
<
Int
>
|
GetLastChange
(const
Url
&path)
|
MAXON_METHOD
Result
<
Bool
>
|
IsUnderSourceControl
(const
Url
&path)
|
MAXON_METHOD
Result
< void >
|
IsUnderSourceControl
(const
BaseArray
<
Url
> &paths,
BaseArray
<
Bool
> &result)
|
MAXON_METHOD
Result
< void >
|
GetBranchMappings
(
BaseArray
<
String
> &branches)
|
MAXON_METHOD
Result
< void >
|
GetBranchMapping
(const
String
&name,
BaseArray
<
String
> &view,
String
&description,
String
&owner)
|
MAXON_METHOD
Result
< void >
|
CreateBranchMapping
(const
String
&name, const
BaseArray
<
String
> &view, const
String
&description, const
String
&owner)
|
MAXON_METHOD
Result
< void >
|
DeleteBranchMapping
(const
String
&name)
|
MAXON_METHOD
Result
< void >
|
GetChanges
(const
Url
&path,
Bool
longDescription, const
String
&limitUser,
Int
limitChanges,
BaseArray
<
SourceControlChangeEntry
> &changes)
|
MAXON_METHOD
Result
< void >
|
GetMissingIntegrations
(const
String
&branchMapping,
Int
checkChangelist,
Bool
reverseMapping,
Bool
longDescription,
BaseArray
<
SourceControlChangeEntry
> &changes)
|
MAXON_METHOD
Result
< void >
|
DescribeChangelist
(
Int
changelist,
SourceControlChangeEntry
*change,
BaseArray
<
ChangeFiles
> *files)
|
MAXON_METHOD
Result
< void >
|
DiffFiles
(const
Url
&file1, const
Url
&file2,
FileDiff
&diff)
|
MAXON_METHOD
Result
< void >
|
ReadFile
(const
Url
&file,
WritableArrayInterface
<
UChar
> &content)
|
MAXON_METHOD
Result
<
String
>
|
RunNativeCommand
(const
String
&command, const
ArrayInterface
<
String
> &arguments,
WritableArrayInterface
< DataDictionary > &result, const ProgressMonitorRef &monitor=
GetZeroRef
< ProgressMonitorRef >(), const
SCTypeConversion
&typeConversion=
SCTypeConversion
(), const
String
&input=
String
())
|
成员函数文档编制
◆
MAXON_INTERFACE_NONVIRTUAL()
◆
Alloc()
Allocator for common use.
-
参数
-
[in]
|
allocLocation
|
Pass
MAXON_SOURCE_LOCATION(_NAME)
to add the current source line and file.
|
[in]
|
portName
|
Perforce ip address and port. E.g. "127.0.0.1:1666". If the string is empty the value from the perforce credentials is taken.
|
[in]
|
clientName
|
Client workspace name. If the string is empty the value from the perforce credentials is taken.
|
[in]
|
userName
|
Perforce user name to login. If the string is empty the value from the perforce credentials is taken.
|
[in]
|
passWord
|
Perforce user password. If the string is empty the value from perforce credentials is taken.
|
◆
CheckoutFile()
Checks out a file from the source code control depot for editing.
-
参数
-
[in]
|
path
|
Path pointing to a file in the source code control depot, e.g. perforce:///depot/... or pointing to a local file.
|
-
返回
-
Path where the checked out file locally resides.
◆
SyncFile()
Gets the latest revision of a file from the source code control depot.
-
参数
-
[in]
|
path
|
Path pointing to a file in the source code control depot, e.g. perforce:///depot/... or pointing to a local file.
|
[in]
|
changeList
|
Change list to sync. -1 syncs to the latest change list.
|
[out]
|
monitor
|
Optional handler to watch status throughout the time span of the sync operation.
|
-
返回
-
OK on success.
◆
SyncFileRevision()
Gets the a revision of a file from the source code control depot.
-
参数
-
[in]
|
path
|
Path pointing to a file in the source code control depot, e.g. perforce:///depot/... or pointing to a local file.
|
[in]
|
revision
|
The revision number to sync. -1 syncs to the latest revision.
|
[out]
|
monitor
|
Optional handler to watch status throughout the time span of the sync operation.
|
-
返回
-
OK on success.
◆
GetRevisionOnDrive()
Gets the local revision number of files on depot.
-
参数
-
[in]
|
path
|
Path pointing to a file in the source code control depot, e.g. perforce:///depot/..., could be a file or a folder. Passing a folder is faster then call the fucntion on any file in it.
|
-
返回
-
A map composed by the filname as key and local revision number as value.
◆
RevertFile()
Reverts a (checked out) file to the latest revision from the source code control depot.
-
参数
-
[in]
|
path
|
Path pointing to a file in the source code control depot, e.g. perforce:///depot/... or pointing to a local file.
|
-
返回
-
OK on success.
◆
GetNameOnDrive()
Gets the local file name of a depot file.
-
参数
-
[in]
|
path
|
Path pointing to a file in the source code control depot, e.g. perforce:///depot/...
|
-
返回
-
Path where the file locally resides.
◆
SubmitChangelist()
Submits the current default changelist.
-
参数
-
[in]
|
description
|
The description for the changelist.
|
-
返回
-
Returns the newly created changelist number on success. The changelist number is 0 if no files has been submitted because there were no changes to the files or there were no files.
◆
AddFile()
Adds a file to the current changelist.
-
参数
-
[in]
|
path
|
Path of a local file that needs to be checked in.
|
-
返回
-
Returns the perforce depot name as the result.
◆
DeleteFile()
Deletes a file and adds this operation to the current changelist.
-
参数
-
[in]
|
path
|
Path of a local file that needs to be deleted.
|
-
返回
-
Returns the perforce depot name as the result.
◆
GetLastChange()
Retrieves the last changelist of a given file.
-
参数
-
[in]
|
path
|
Path of a local file or depot path.
|
-
返回
-
Returns the changelist or an error.
◆
IsUnderSourceControl()
[1/2]
Checks whether a file is under source control or not.
-
参数
-
[in]
|
path
|
Path of a local file or depot path.
|
-
返回
-
Receives true if the file is under source control, only valid if the operation succeeded.
◆
IsUnderSourceControl()
[2/2]
Checks whether multiple files are under source control or not. This is much faster than calling it for individual files.
-
参数
-
[in]
|
paths
|
Array
of paths of local files or depot paths.
|
[out]
|
result
|
Array
of boolean values. True indicates a file is under source control and the operation succeeded.
|
-
返回
-
OK on success.
◆
GetBranchMappings()
Queries the list of available branch mappings.
-
参数
-
[out]
|
branches
|
The list that will be filled.
|
-
返回
-
OK on success.
◆
GetBranchMapping()
Retrieves data for an existing branch mapping.
-
参数
-
[in]
|
name
|
The name of the branch mapping.
|
[in]
|
view
|
The branch mapping's view entries.
|
[in]
|
description
|
The branch mapping's description.
|
[in]
|
owner
|
The branch mapping's owner.
|
-
返回
-
OK on success.
◆
CreateBranchMapping()
Creates a new branch mapping or edits an existing one.
-
参数
-
[in]
|
name
|
The name of the branch mapping.
|
[in]
|
view
|
The branch mapping's view.
|
[in]
|
description
|
The branch mapping's description.
|
[in]
|
owner
|
The branch mapping's owner.
|
-
返回
-
OK on success.
◆
DeleteBranchMapping()
Deletes an existing branch mapping.
-
参数
-
[in]
|
name
|
The name of the branch mapping.
|
-
返回
-
OK on success.
◆
GetChanges()
Gets all of the changes of a given depotPath (file or directory).
-
参数
-
[in]
|
path
|
Path of a local file/directory.
|
[in]
|
longDescription
|
If true the functions returns the long description. Otherwise the shortened description.
|
[in]
|
limitUser
|
Limit the output to a specific user. An empty string for no filtering.
|
[in]
|
limitChanges
|
Limit the output to this number of changelists. 0 for no limits.
|
[out]
|
changes
|
Receives the change lists in this variable.
|
-
返回
-
OK on success.
◆
GetMissingIntegrations()
Retrieves the missing integrations from one branch to another using the given branch mapping.
-
参数
-
[in]
|
branchMapping
|
Branch Mapping to check.
|
[in]
|
checkChangelist
|
Up to this changelist the check will be evaluated. This parameter can be 0 to get the missing integrations for the latest changelist.
|
[in]
|
reverseMapping
|
If False the direction of the mapping is used. If true the opposite direction is calculated.
|
[in]
|
longDescription
|
If true the functions returns the long description. Otherwise the shortened description.
|
[out]
|
changes
|
Receives the change lists in this variable.
|
-
返回
-
OK on success.
◆
DescribeChangelist()
Gets all of the changes of a given depotPath (file or directory).
-
参数
-
[in]
|
changelist
|
Changelist to describe.
|
[out]
|
change
|
Optional parameter to get the description of the changelist.
|
[out]
|
files
|
Optional parameter to get the affected files and the differences.
|
-
返回
-
OK on success.
◆
DiffFiles()
Compares 2 files of the depot against each other. Its also possible to compare 2 revisions of the same file.
-
参数
-
[in]
|
file1
|
File 1 to compare against file 2.
|
[in]
|
file2
|
File 2 to compare against file 1.
|
[out]
|
diff
|
FileDiff
structure filled if the operation was successful.
|
-
返回
-
OK on success.
◆
ReadFile()
Copies the content of the file into the given buffer.
-
参数
-
[in]
|
file
|
File to read.
|
[out]
|
content
|
Buffer that receives the content of the file.
|
-
返回
-
OK on success.
◆
RunNativeCommand()
Runs a native perforce command, the result is placed within a DataDictionary.
-
参数
-
[in]
|
命令
|
Command to execute.
|
[in]
|
arguments
|
Arguments passed to this command.
|
[out]
|
result
|
Result
array with the answer.
|
[out]
|
monitor
|
Optional handler to watch status throughout the time span of the SCC command.
|
[in]
|
typeConversion
|
可选
HashSet
with conversion from perforce types to
数据
.
|
[in]
|
input
|
Optional string that feeds the SCC command with input data.
|
-
返回
-
OK on success. Returns the message string in any case (which can be empty).
◆
SCConvertSkip()
◆
SCConvertInt()
◆
SCConvertInt32()
◆
SCConvertInt64()
◆
SCConvertFloat()
◆
SCConvertFloat32()
◆
SCConvertFloat64()
◆
SCConvertDateTime()
◆
SCConvertUrl()
◆
SCConvertString()