CodeSonar C++ API
[For improved navigation, enable JavaScript.]
Static Public Member Functions | List of all members
cs::csurf_info Class Reference

Information about the CodeSurfer installation. More...

Static Public Member Functions

static std::string install_path ()
 Retrieve the file system path for the CodeSecure installation. More...
 
static int major_version ()
 Get the major part of the CodeSurfer version number for the current installation. More...
 
static int minor_version ()
 Get the minor part of the CodeSurfer version number for the current installation. More...
 
static int patch_version ()
 Get the patch number for the current CodeSurfer installation. More...
 
static std::vector< std::string > startup_argv ()
 Get the argv array used to start the process hosting the plugin. More...
 
static std::string version ()
 Get the CodeSurfer version number for the current installation. More...
 

Detailed Description

Information about the CodeSurfer installation.

You do not need to instantiate this class: all members are static.

Member Function Documentation

◆ install_path()

static std::string cs::csurf_info::install_path ( )
inlinestatic

Retrieve the file system path for the CodeSecure installation.

Returns
The CodeSecure installation directory path.

◆ major_version()

static int cs::csurf_info::major_version ( )
inlinestatic

Get the major part of the CodeSurfer version number for the current installation.

Returns
The major part of the CodeSurfer version number for the current installation (that is, the number before the "."), as an int.

◆ minor_version()

static int cs::csurf_info::minor_version ( )
inlinestatic

Get the minor part of the CodeSurfer version number for the current installation.

Returns
The minor part of the CodeSurfer version number for the current installation (that is, the number before the "."), as an int.

◆ patch_version()

static int cs::csurf_info::patch_version ( )
inlinestatic

Get the patch number for the current CodeSurfer installation.

Returns
The patch number for the current CodeSurfer installation, as an int.

◆ startup_argv()

static std::vector<std::string> cs::csurf_info::startup_argv ( )
inlinestatic

Get the argv array used to start the process hosting the plugin.

Returns
A std::vector of std::string. The format corresponds to the argument to a main function traditionally called 'argv'. ('argc' is implicit in the number of elements.)

CodeSurfer and CodeSonar ignore command-line arguments provided after a '–'; this can be used to pass arguments to the plugin. For example, 'csurf -l my-plugin.so – –do-something-cool'. However, the full argument list will be provided as the return from this function; for the example, it would be {"csurf", "-l", "my-plugin.so", "--", "--do-something-cool"}.

◆ version()

static std::string cs::csurf_info::version ( )
inlinestatic

Get the CodeSurfer version number for the current installation.

Returns
A std::string representation of the CodeSurfer version number for the current installation, in format "major#.minor#".

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