VTK: vtkURIComponent Class Reference

| VTK 9.3.1

Classes | Public Member Functions | Static Public Attributes | List of all members
vtkURIComponent Class Reference

Represent an URI component. More...

`#include <vtkURI.h>`

Collaboration diagram for vtkURIComponent:
[legend]

## Classes
struct | UndefinedTag

## Public Member Functions
| vtkURIComponent ()=default
| Default constructor. More...
| vtkURIComponent (std::string str)
| Default constructor. More...
| vtkURIComponent (const char *str)
| Default constructor. More...
| vtkURIComponent (UndefinedTag)
| Constructs an undefined component. More...
| ~vtkURIComponent ()=default
| vtkURIComponent (const vtkURIComponent &)=default
vtkURIComponent & | operator= (const vtkURIComponent &)=default
| vtkURIComponent (vtkURIComponent &&)=default
vtkURIComponent & | operator= (vtkURIComponent &&)=default
const std::string & | GetValue () const noexcept
bool | IsDefined () const noexcept
| operator bool () const noexcept
bool | operator== (const vtkURIComponent &other) const noexcept
bool | operator!= (const vtkURIComponent &other) const noexcept

## Static Public Attributes
static constexpr UndefinedTag | Undefined {}

## Detailed Description

Represent an URI component.

An URI can have an empty but defined component. This applies to authority, path, query and fragment. This is mainly used for strong string reconstruction, example: `vtkURI::Parse("file://?#")->ToString()` must return `"file://?#"`, all components are empty, but defined, so they must be restored when recomposition the URI string representation. URI path is always defined for a valid URI.

Definition at line 28 of file vtkURI.h.

## Constructor & Destructor Documentation

## ◆ vtkURIComponent() [1/6]

vtkURIComponent::vtkURIComponent | ( |  | ) |
| default

Default constructor.

Constructs an undefined component.

## ◆ vtkURIComponent() [2/6]

vtkURIComponent::vtkURIComponent | ( | std::string | str | ) |
| inline

Default constructor.

Constructs a defined component.

Parameters

  str | The component value, may be empty.

Definition at line 45 of file vtkURI.h.

## ◆ vtkURIComponent() [3/6]

vtkURIComponent::vtkURIComponent | ( | const char * | str | ) |
| inline

Default constructor.

Constructs a defined component.

Parameters

  str | The component value, may be empty, but must not be nullptr.

Definition at line 55 of file vtkURI.h.

## ◆ vtkURIComponent() [4/6]

vtkURIComponent::vtkURIComponent | ( | UndefinedTag |  | ) |
| inline

Constructs an undefined component.

Use vtkURIComponent::Undefined

Definition at line 64 of file vtkURI.h.

## ◆ ~vtkURIComponent()

vtkURIComponent::~vtkURIComponent | ( |  | ) |
| default

## ◆ vtkURIComponent() [5/6]

vtkURIComponent::vtkURIComponent | ( | const vtkURIComponent & |  | ) |
| default

## ◆ vtkURIComponent() [6/6]

vtkURIComponent::vtkURIComponent | ( | vtkURIComponent && |  | ) |
| default

## Member Function Documentation

## ◆ operator=() [1/2]

vtkURIComponent& vtkURIComponent::operator= | ( | const vtkURIComponent & |  | ) |
| default

## ◆ operator=() [2/2]

vtkURIComponent& vtkURIComponent::operator= | ( | vtkURIComponent && |  | ) |
| default

## ◆ GetValue()

const std::string& vtkURIComponent::GetValue | ( |  | ) | const
| inlinenoexcept

Returns
  Return component value. Is empty if this is undefined.

Definition at line 75 of file vtkURI.h.

## ◆ IsDefined()

bool vtkURIComponent::IsDefined | ( |  | ) | const
| inlinenoexcept

Returns
  `true` if this is defined, `false` otherwise

Definition at line 80 of file vtkURI.h.

## ◆ operator bool()

vtkURIComponent::operator bool | ( |  | ) | const
| inlineexplicitnoexcept

Returns
  `true` if this is defined, `false` otherwise

Definition at line 85 of file vtkURI.h.

## ◆ operator==()

bool vtkURIComponent::operator== | ( | const vtkURIComponent & | other | ) | const
| inlinenoexcept

Returns
  Equality compararison of URI components. Two components are equal if they are both defined and have the same value, or if they are both undefined.

Definition at line 93 of file vtkURI.h.

## ◆ operator!=()

bool vtkURIComponent::operator!= | ( | const vtkURIComponent & | other | ) | const
| inlinenoexcept

Returns
  Equality compararison of URI components. Two components are equal if they are both defined and have the same value, or if they are both undefined.

Definition at line 98 of file vtkURI.h.

## Member Data Documentation

## ◆ Undefined

constexpr UndefinedTag vtkURIComponent::Undefined {}
| staticconstexpr

Definition at line 34 of file vtkURI.h.

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

- IO/Core/vtkURI.h