Click or drag to resize
CfxCommandLine Class

[This is preliminary documentation and is subject to change.]

Structure used to create and/or parse command line arguments. Arguments with '--', '-' and, on Windows, '/' prefixes are considered switches. Switches will always precede any arguments without switch prefixes. Switches can optionally have a value specified using the '=' delimiter (e.g. "-switch=value"). An argument of "--" will terminate switch parsing with all subsequent tokens, regardless of prefix, being interpreted as non-switch arguments. Switch names are considered case-insensitive. This structure can be used before cef_initialize() is called.
Inheritance Hierarchy
SystemObject
  ChromiumCfxObject
    ChromiumCfxBase
      ChromiumCfxLibraryBase
        ChromiumCfxCommandLine

Namespace: Chromium
Assembly: ChromiumFX (in ChromiumFX.dll)
Syntax
public class CfxCommandLine : CfxLibraryBase

The CfxCommandLine type exposes the following members.

Properties
  NameDescription
Public propertyCommandLineString
Constructs and returns the represented command line string. Use this function cautiously because quoting behavior is unclear.
Public propertyHasArguments
True if there are remaining command line arguments.
Public propertyHasSwitches
Returns true (1) if the command line has switches.
Public propertyIsReadOnly
Returns true (1) if the values of this object are read-only. Some APIs may expose read-only objects.
Public propertyIsValid
Returns true (1) if this object is valid. Do not call any other functions if this function returns false (0).
Public propertyNativePtr
Provides access to the underlying native cef struct. This is a refcounted library struct derived from cef_base_t. Add a ref in order to keep it alive when this managed object go out of scope.
(Inherited from CfxLibraryBase.)
Public propertyProgram
Get or set the program part of the command line string (the first item).
Top
Methods
  NameDescription
Public methodAppendArgument
Add an argument to the end of the command line.
Public methodAppendSwitch
Add a switch to the end of the command line. If the switch has no value pass an NULL value string.
Public methodAppendSwitchWithValue
Add a switch with the specified value to the end of the command line.
Public methodCopy
Returns a writable copy of this object.
Public methodStatic memberCreate
Create a new CfxCommandLine instance.
Public methodGetArguments
Get the remaining command line arguments.
Public methodGetArgv
Retrieve the original command line string as a vector of strings. The argv array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }
Public methodStatic memberGetGlobal
Returns the singleton global CfxCommandLine object. The returned object will be read-only.
Public methodGetSwitches
Returns the map of switch names and values. If a switch has no value an NULL string is returned.
Public methodGetSwitchValue
Returns the value associated with the given switch. If the switch has no value or isn't present this function returns the NULL string.
Public methodHasSwitch
Returns true (1) if the command line contains the given switch.
Public methodInitFromArgv
Initialize the command line with the specified |argc| and |argv| values. The first argument must be the name of the program. This function is only supported on non-Windows platforms.
Public methodInitFromString
Initialize the command line with the string returned by calling GetCommandLineW(). This function is only supported on Windows.
Public methodPrependWrapper
Insert a command before the current command. Common for debuggers, like "valgrind" or "gdb --args".
Public methodReset
Reset the command-line switches and arguments but leave the program component unchanged.
Top
Remarks
See also the original CEF documentation in cef/include/capi/cef_command_line_capi.h.
See Also