| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# csutil/verbosity.h File Reference

Verbosity management helpers. More...

`#include "csextern.h"`
`#include "iutil/verbositymanager.h"`
`#include "csutil/strhash.h"`
`#include "csutil/csstring.h"`
`#include "csutil/scf_implementation.h"`
`#include "csutil/win32/msvc_deprecated_warn_off.h"`
`#include "csutil/win32/msvc_deprecated_warn_on.h"`

Go to the source code of this file.

## Classes
class | csVerbosityManager
| Default iVerbosityManager implementation. More...
class | csVerbosityParser
| Utility for parsing verbosity flags such as those provided by the `--verbose=flags` command-line option. More...
## Functions
bool | csCheckVerbosity (int argc, char const *const argv[], char const *major, char const *minor)
| Given major and minor components, check if the verbosity class "major.minor" is enabled via the command-line `--verbose' switch.
bool | csCheckVerbosity (int argc, char const *const argv[], char const *flag=0, bool fuzzy=true)
| Search command-line arguments for `--verbosity=flags` options, and check if flag is enabled or disabled.
csVerbosityParser | csParseVerbosity (int argc, char const *const argv[])
| Construct a csVerbosityParser from `--verbosity=flags` options given on the command-line.

## Detailed Description

Verbosity management helpers.

Definition in file verbosity.h.

## Function Documentation

bool csCheckVerbosity | ( | int | argc,
|  | char const *const | argv[],
|  | char const * | major,
|  | char const * | minor |
| ) |  |  |

Given major and minor components, check if the verbosity class "major.minor" is enabled via the command-line `--verbose' switch.

Deprecated:
  Use instead the more generic csCheckVerbosity() function which takes a single verbosity class flag since it accepts any granularity of class breakdown; not just major and minor components.

bool csCheckVerbosity | ( | int | argc,
|  | char const *const | argv[],
|  | char const * | flag = `0`,
|  | bool | fuzzy = `true` |
| ) |  |  |

Search command-line arguments for `--verbosity=flags` options, and check if flag is enabled or disabled.

Remarks:
  This is a simple convenience wrapper around csCheckVerbosity() which invokes `Enabled(flags)` on the constructed verbosity parser. See the csParseVerbosity() and csVerbosityParser::Enabled() for a description of the arguments to this function.

See also:
  csVerbosityParser

  csVerbosityManager

  csParseVerbosity;

  iVerbosityManager

csVerbosityParser csParseVerbosity | ( | int | argc,
|  | char const *const | argv[] |
| ) |  |  |

Construct a csVerbosityParser from `--verbosity=flags` options given on the command-line.

Parameters:

  | argc | Command-line argument count from main().
  | argv | Command-line argument vector from main().

Remarks:
  This function extracts the `flags` text following the equal sign in each `--verbose=flags` option (if present) and constructs a csVerbosityParser with the extracted text.

  This function is useful for verbosity queries during very early initialization before any of the higher-level framework has been set up. Once partial initialization has occurred, however, it is often more convenient to obtain a handle to an iVerbosityManager instance from the global iObjectRegitry and use that instead since it does not require access to argc and argv[].

See also:
  csVerbosityParser

  csVerbosityManager

  csCheckVerbosity

  iVerbosityManager