6 #include "vtkIOCoreModule.h"
15 VTK_ABI_NAMESPACE_BEGIN
46 : Value{ std::move(str) }
80 bool IsDefined() const noexcept {
return this->Defined; }
85 explicit operator bool() const noexcept {
return this->Defined; }
95 return this->Value == other.Value && this->Defined == other.Defined;
103 bool Defined =
false;
144 return PercentEncode(str.data(), str.size());
174 return PercentDecode(str.data(), str.size());
239 return Parse(uri.data(), uri.size());
307 bool IsReference()
const {
return this->IsRelative() || this->IsFull(); }
311 bool IsAbsolute()
const {
return this->Scheme && !this->Fragment; }
313 bool IsFull()
const {
return this->Scheme.IsDefined(); }
317 return !this->Scheme && !this->Authority && this->Path.GetValue().empty() && !this->Query &&
323 return !this->Scheme && !this->Authority && this->Path.GetValue().empty() && !this->Query &&
353 ~
vtkURI()
override =
default;
364 VTK_ABI_NAMESPACE_END
const vtkURIComponent & GetQuery() const
URI query.
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool IsFull() const
URI types determination.
bool IsSameDocRef() const
URI types determination.
static constexpr UndefinedTag Undefined
bool operator!=(const vtkURIComponent &other) const noexcept
const vtkURIComponent & GetPath() const
URI path.
const std::string & GetValue() const noexcept
Hold a reference to a vtkObjectBase instance.
vtkURIComponent(std::string str)
Default constructor.
bool IsDefined() const noexcept
bool IsAbsolute() const
URI types determination.
vtkURIComponent(const char *str)
Default constructor.
bool IsRelative() const
URI types determination.
static std::string PercentEncode(const std::string &str)
Calls PercentEncode(str.data(), str.size())
a simple class to control print indentation
bool IsReference() const
URI types determination.
vtkURIComponent(UndefinedTag)
Constructs an undefined component.
const vtkURIComponent & GetScheme() const
URI scheme.
static vtkSmartPointer< vtkURI > Parse(const std::string &uri)
Create a new URI from a string.
vtkSmartPointer< vtkURI > Clone() const
static std::string PercentDecode(const std::string &str)
Calls PercentDecode(str.data(), str.size())
const vtkURIComponent & GetAuthority() const
URI authority.
bool operator==(const vtkURIComponent &other) const noexcept
const vtkURIComponent & GetFragment() const
URI fragment.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Represent an URI component.
bool IsEmpty() const
URI types determination.