From bc4e62ed9b96f06443f94d682a83225513db8e74 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 2 Feb 2019 19:07:45 +0000 Subject: [PATCH] lazutils: docs, issue #34994, patch from Don Siders git-svn-id: trunk@60296 - --- docs/xml/lazutils/utf8process.xml | 754 ++++++++++++++++-------------- 1 file changed, 401 insertions(+), 353 deletions(-) diff --git a/docs/xml/lazutils/utf8process.xml b/docs/xml/lazutils/utf8process.xml index e2f4d0f8de..ba792ca10c 100644 --- a/docs/xml/lazutils/utf8process.xml +++ b/docs/xml/lazutils/utf8process.xml @@ -1,404 +1,452 @@ - + - + - + - -Version of FPC TProcess that allows UTF8 arguments - - + + Defines a version of FPC TProcess that allows UTF-8-encoded arguments + - - -Version of FPC TProcess that allows UTF8 arguments - - - - - - - + + + + Implements a version of FPC TProcess that allows UTF-8-encoded arguments + + + + + - - - - - - - - + + + + - - - - - - - - + + + + - - - - - - - - + + + + - - - - - - - - + + + + - - - - - - - - + + + + - - - - - - - - + + + + - - - - - - - - + + + + - - - - - - - - + + + + - - - - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - + + + + +

+ SetCommandLineUTF8 is the write access specifier for the CommandLine property. + + + + - - - - + + + + - - - - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - + + + + Ensure values in Environment and Parameters are updated in the ancestor class + + +

+ UpdateEnvironment ensures that UTF-8-encoded values in both the Environment and the Parameters properties are converted to system format, and stored in the ancestor class. UpdateEnvironment is used in Execute immediately prior to calling the inherited Execute method. +

+
+ +
- - - - - - - - - - + + + + Constructor for the class instance + + +

+ Create is the constructor for the class instance, Create calls the inherited constructor using AOwner as the owner of the class instance. Create ensures that resources are allocated for the Environment and Parameters properties. +

+
+ +
- - - - + + + Owner of the class instance + - - - - - - - - - - + + + + Destructor for the class instance + + +

+ Destroy is the destructor for the class instance. Destroy frees resource allocated for the Environment and Parameters properties. Destroy calls the inherited method. +

+
+ +
- - - - - - - - - - + + + + Starts execution of the process + + +

+ Execute causes the Executable for the process to be started with the Parameters and Environment specified in the respective properties. Execute calls the UpdateEnvironment method to pass the values in Parameters and Environment to the ancestor class. Execute calls gthe inherited Execute method. +

+
+ + +
- - - - - - - - + + + + + + + + Please note that ApplicationName has been deprecated in TProcess (the ancestor class) since FPC version 2.5.1. ApplicationName has been superseded by the Executable and Parameters properties. + + + + - - - - - - - - + + + + Command line with options to execute in the process + + + +

+ Setting the value in CommandLine causes the value in Executable to be updated, and the value in Parameters is cleared and reloaded as necessary. +

+ + Please note that CommandLine has been deprecated in TProcess (the ancestor class) since FPC version 2.5.1. To avoid problems with command line options with spaces in them, and the quoting problems that this entails, it has been superseded by the Executable and Parameters properties. Use these properties instead of CommandLine. + +
+ +
- - - - - - - - + + + + + + - - - - - - - - + + + + + + - - - - - - - - + + + + + + - - - - - - - - + + + + + + - - - - - - - - + + + + + + - - - - - - - - + + + + + + - - - - - - - - - - + + + + + - - - - + + + - - - - + + + + + - - - - - - - - - - + + + - - - - + + + + + - - - - + + + - - - - - - - - - - + + + Separates values in CommandLine into the Executable and Parameters properties + + +

+ ParseCmdLine is used to separate the values in CommandLine into the values used in the Executable and Parameters properties. +

+
+ +
-
+ + + -
+ + + + + + + Exception message raised when a process has no executable or command-line + + + + + + Exception message raised when a process cannot be created for the executable or command-line + + + + + + + Executes a command found in the current PATH environment + + +

+ RunCmdFromPath is used to execute a command which can be found in the current PATH environment. For example, the following locates and executes the /bin/ls command with the specified arguments: +

+ + RunCmdFromPath('ls', '-l /home'); + +

+ An exception will be raised if the program file cannot be located, or cannot be executed. +

+

+ RunCmdFromPath creates an instance of TProcessUTF8 to execute the program using the specified arguments. +

+
+ +
+
EFOpenError
+
+ Raised with the message in lrsProgramFileNotFound +
+
EFOpenError
+
+ Raised with the message in lrsCanNotExecute +
+
+
+ +
+ + + + Name of the program to execute + + + + + Command line parameters for the process + + + + + + + + + + + + + + + + + + + + + + + + Gets a default value for the number of threads on the system + + +

+ GetSystemThreadCount is an Integer function used to get the default value for the number of threads on the system. The implementation for GetSystemThreadCount is platform- and/or OS-specific. For the Windows environment, the total number of processors available (including logical hyperthreaded processors) are returned using the GetProcessAffinityMask API. When GetProcessAffinityMask is unavailable, the total number of processors from GetSystemInfo is used. For UNIX-like environments, either the sysconf or the fpsysctl function is used. For other environments, the value is 1. +

+
+ +
+ + + Default for the number of threads on the system + + + + + + + + + + +