libzypp 17.37.17
zypp::url::ViewOption Struct Reference

Url::asString() view options. More...

#include <zypp-core/url/UrlBase.h>

Public Member Functions

 ViewOption ()
 Create instance with default combination of view options.
ViewOptionoperator= (const ViewOption &o)
 Assign specified option combination o to the current object.
bool has (const ViewOption &o) const
 Check if specified option o is set in the current object.

Static Public Attributes

static const ViewOption hotfix1050625 = 0x8000
static const ViewOption WITH_SCHEME ZYPP_API
 Option to include scheme name in the URL string.
static const ViewOption WITH_USERNAME ZYPP_API
 Option to include username in the URL string.
static const ViewOption WITH_PASSWORD ZYPP_API
 Option to include password in the URL string.
static const ViewOption WITH_HOST ZYPP_API
 Option to include hostname in the URL string.
static const ViewOption WITH_PORT ZYPP_API
 Option to include port number in the URL string.
static const ViewOption WITH_PATH_NAME ZYPP_API
 Option to include path name in the URL string.
static const ViewOption WITH_PATH_PARAMS ZYPP_API
 Option to include path parameters in the URL string.
static const ViewOption WITH_QUERY_STR ZYPP_API
 Option to include query string in the URL string.
static const ViewOption WITH_FRAGMENT ZYPP_API
 Option to include fragment string in the URL string.
static const ViewOption EMPTY_AUTHORITY ZYPP_API
 Explicitely include the URL authority separator "//".
static const ViewOption EMPTY_PATH_NAME ZYPP_API
 Explicitely include the "/" path character.
static const ViewOption EMPTY_PATH_PARAMS ZYPP_API
 Explicitely include the path parameters separator ";".
static const ViewOption EMPTY_QUERY_STR ZYPP_API
 Explicitely include the query string separator "?".
static const ViewOption EMPTY_FRAGMENT ZYPP_API
 Explicitely include the fragment string separator "#".
static const ViewOption DEFAULTS ZYPP_API
 Default combination of view options.

Private Member Functions

 ViewOption (int option)

Private Attributes

int opt

Friends

ViewOption operator+ (const ViewOption &l, const ViewOption &r)
 Adds l and r to a new option combination.
ViewOption operator- (const ViewOption &l, const ViewOption &r)
 Substract r from l to a new option combination.

Detailed Description

Url::asString() view options.

A instance of this class represents a bit-wise combination of view option constants.

It provides ViewOption::operator+() and ViewOption::operator-() to modify a view option combination and a ViewOption::has() method, to check if a specified option is enabled or not.

Definition at line 40 of file UrlBase.h.

Constructor & Destructor Documentation

◆ ViewOption() [1/2]

zypp::url::ViewOption::ViewOption ( )

Create instance with default combination of view options.

Definition at line 96 of file UrlBase.cc.

◆ ViewOption() [2/2]

zypp::url::ViewOption::ViewOption ( int option)
private

Definition at line 101 of file UrlBase.cc.

Member Function Documentation

◆ operator=()

ViewOption & zypp::url::ViewOption::operator= ( const ViewOption & o)
inline

Assign specified option combination o to the current object.

Parameters
oThe option or option combination to make a copy of.
Returns
A reference to this option combination.

Definition at line 217 of file UrlBase.h.

◆ has()

bool zypp::url::ViewOption::has ( const ViewOption & o) const
inline

Check if specified option o is set in the current object.

Parameters
oA view option constant.
Returns
True, if specified option o is set/enabled in the instance.

Definition at line 229 of file UrlBase.h.

◆ operator+

ViewOption operator+ ( const ViewOption & l,
const ViewOption & r )
friend

Adds l and r to a new option combination.

Returns
The new option combination.

Definition at line 194 of file UrlBase.h.

◆ operator-

ViewOption operator- ( const ViewOption & l,
const ViewOption & r )
friend

Substract r from l to a new option combination.

Returns
The new option combination.

Definition at line 205 of file UrlBase.h.

Member Data Documentation

◆ ZYPP_API [1/15]

const ViewOption WITH_SCHEME zypp::url::ViewOption::ZYPP_API
static

Option to include scheme name in the URL string.

Disabling this option causes, that the URL string contains the path, query and fragment components only, for example just "/foo/bar.txt".

This option is enabled by default.

Definition at line 52 of file UrlBase.h.

◆ ZYPP_API [2/15]

const ViewOption WITH_USERNAME zypp::url::ViewOption::ZYPP_API
static

Option to include username in the URL string.

This option depends on a enabled WITH_SCHEME and WITH_HOST options and is enabled by default.

Definition at line 59 of file UrlBase.h.

◆ ZYPP_API [3/15]

const ViewOption WITH_PASSWORD zypp::url::ViewOption::ZYPP_API
static

Option to include password in the URL string.

This option depends on a enabled WITH_SCHEME, WITH_HOST and WITH_USERNAME options and is disabled by default, causing to hide the password in the URL authority.

Definition at line 68 of file UrlBase.h.

◆ ZYPP_API [4/15]

const ViewOption WITH_HOST zypp::url::ViewOption::ZYPP_API
static

Option to include hostname in the URL string.

This option depends on a enabled WITH_SCHEME option and is enabled by default.

Definition at line 75 of file UrlBase.h.

◆ ZYPP_API [5/15]

const ViewOption WITH_PORT zypp::url::ViewOption::ZYPP_API
static

Option to include port number in the URL string.

This option depends on a enabled WITH_SCHEME and WITH_HOST options and is enabled by default.

Definition at line 82 of file UrlBase.h.

◆ ZYPP_API [6/15]

const ViewOption WITH_PATH_NAME zypp::url::ViewOption::ZYPP_API
static

Option to include path name in the URL string.

This option is enabled by default.

Definition at line 88 of file UrlBase.h.

◆ ZYPP_API [7/15]

const ViewOption WITH_PATH_PARAMS zypp::url::ViewOption::ZYPP_API
static

Option to include path parameters in the URL string.

This option depends on a enabled WITH_PATH_NAME option and is disabled by default, causing to hide the path parameters.

Definition at line 96 of file UrlBase.h.

◆ ZYPP_API [8/15]

const ViewOption WITH_QUERY_STR zypp::url::ViewOption::ZYPP_API
static

Option to include query string in the URL string.

This option is enabled by default.

Definition at line 102 of file UrlBase.h.

◆ ZYPP_API [9/15]

const ViewOption WITH_FRAGMENT zypp::url::ViewOption::ZYPP_API
static

Option to include fragment string in the URL string.

This option is enabled by default.

Definition at line 108 of file UrlBase.h.

◆ ZYPP_API [10/15]

const ViewOption EMPTY_AUTHORITY zypp::url::ViewOption::ZYPP_API
static

Explicitely include the URL authority separator "//".

It causes, that the URL string includes an empty URL authority, for example: "file:///foo.txt" instead of just "file:/foo.txt".

This option depends on a enabled WITH_SCHEME view option and is enabled by default.

Definition at line 122 of file UrlBase.h.

◆ ZYPP_API [11/15]

const ViewOption EMPTY_PATH_NAME zypp::url::ViewOption::ZYPP_API
static

Explicitely include the "/" path character.

It causes, that a "/" is added to the Url if the path name is empty, for example:

"http://localhost/" instead of just "http://localhost".

This option depends on a enabled WITH_PATH_NAME view option and is enabled by default.

Definition at line 134 of file UrlBase.h.

◆ ZYPP_API [12/15]

const ViewOption EMPTY_PATH_PARAMS zypp::url::ViewOption::ZYPP_API
static

Explicitely include the path parameters separator ";".

It causes, that the URL allways contains the ";" path parameters separator.

This option depends on a enabled EMPTY_PATH_NAME view option and is disabled by default.

Definition at line 144 of file UrlBase.h.

◆ ZYPP_API [13/15]

const ViewOption EMPTY_QUERY_STR zypp::url::ViewOption::ZYPP_API
static

Explicitely include the query string separator "?".

It causes, that if the query string is requested using the WITH_QUERY_STR option, the URL allways contains the "?" query string separator, even if the query string is empty. This option depends on a enabled WITH_QUERY_STR view option and is disabled by default.

Definition at line 155 of file UrlBase.h.

◆ ZYPP_API [14/15]

const ViewOption EMPTY_FRAGMENT zypp::url::ViewOption::ZYPP_API
static

Explicitely include the fragment string separator "#".

It causes, that if the fragment string is requested using the WITH_FRAGMENT option, the URL allways contains the "#" fragment string separator, even if the fragment string is empty. This option depends on a enabled WITH_FRAGMENT view option and is disabled by default.

Definition at line 166 of file UrlBase.h.

◆ ZYPP_API [15/15]

const ViewOption DEFAULTS zypp::url::ViewOption::ZYPP_API
static

Default combination of view options.

By default, following view options are enabled: WITH_SCHEME, WITH_USERNAME, WITH_HOST, WITH_PORT, WITH_PATH_NAME, WITH_QUERY_STR, WITH_FRAGMENT, EMPTY_AUTHORITY, EMPTY_PATH_NAME.

Definition at line 178 of file UrlBase.h.

◆ hotfix1050625

const ViewOption zypp::url::ViewOption::hotfix1050625 = 0x8000
static

Definition at line 234 of file UrlBase.h.

◆ opt

int zypp::url::ViewOption::opt
private

Definition at line 237 of file UrlBase.h.


The documentation for this struct was generated from the following files: