StrDict::SetArgv( int, char *const * )
Set a list of values, such as the arguments to a P4 Server command.
|
Virtual? |
No |
|
|
Class |
||
|
Arguments |
|
the number of variables (arguments) |
|
|
the variables (arguments) themselves |
|
|
Returns |
|
Notes
SetArgv() is typically
used when setting command arguments in ClientApi.
Example
p4api.cc provides an example of using SetArgv() to set
arguments.
int main( int argc, char **argv )
{
ClientUser ui;
ClientApi client;
Error e;
// Any special protocol mods
// client.SetProtocol( "tag", "" );
// Connect to server
client.Init( &e );
// Run the command "argv[1] argv[2...]"
client.SetArgv( argc - 2, argv + 2 );
client.Run( argv[1], &ui );
// Close connection
client.Final( &e );
return 0;
}