Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::XMLQualifiedNameRef Struct Reference

Reference type for XMLQualifiedName, to pass the value to APIs without needing to allocate an RcString. More...

#include "donner/base/xml/XMLQualifiedName.h"

Collaboration diagram for donner::XMLQualifiedNameRef:
[legend]

Public Member Functions

constexpr XMLQualifiedNameRef (const RcStringOrRef &name)
 Construct from an attribute name as a string_view, assumes no namespacePrefix.
 
constexpr XMLQualifiedNameRef (const char *name)
 Construct from an attribute name as a const char*, assumes no namespacePrefix.
 
constexpr XMLQualifiedNameRef (std::string_view name)
 Construct from an attribute name as a std::string_view, assumes no namespacePrefix.
 
constexpr XMLQualifiedNameRef (const RcStringOrRef &namespacePrefix, const RcStringOrRef &name)
 Construct from an attribute with a namespace prefix.
 
constexpr XMLQualifiedNameRef (const XMLQualifiedName &attr)
 Construct from XMLQualifiedName.
 
 ~XMLQualifiedNameRef ()=default
 Destructor.
 
 XMLQualifiedNameRef (XMLQualifiedNameRef &&)=default
 Move constructor.
 
 XMLQualifiedNameRef (const XMLQualifiedNameRef &)=default
 Copy constructor.
 
XMLQualifiedNameRefoperator= (XMLQualifiedNameRef &&)=default
 Move assignment operator.
 
XMLQualifiedNameRefoperator= (const XMLQualifiedNameRef &)=default
 Copy assignment operator.
 
std::strong_ordering operator<=> (const XMLQualifiedNameRef &other) const
 Comparison operator.
 
bool operator== (const XMLQualifiedNameRef &other) const =default
 Equality operator for gtest.
 
std::string toString () const
 Convert to string operator.
 

Public Attributes

RcStringOrRef namespacePrefix
 The namespace prefix of the attribute, or an empty string if no namespace (default namespace).
 
RcStringOrRef name
 The attribute name.
 

Friends

std::strong_ordering operator<=> (const XMLQualifiedNameRef &lhs, const XMLQualifiedName &rhs)
 Friend operator for XMLQualifiedName comparison.
 
std::strong_ordering operator<=> (const XMLQualifiedName &lhs, const XMLQualifiedNameRef &rhs)
 Friend operator for XMLQualifiedName comparison.
 
bool operator== (const XMLQualifiedName &lhs, const XMLQualifiedNameRef &rhs)
 Friend operator for XMLQualifiedName equality for gtest.
 
bool operator== (const XMLQualifiedNameRef &lhs, const XMLQualifiedName &rhs)
 Friend operator for XMLQualifiedName equality for gtest.
 
std::ostream & operator<< (std::ostream &os, const XMLQualifiedNameRef &obj)
 Ostream output operator.
 

Detailed Description

Reference type for XMLQualifiedName, to pass the value to APIs without needing to allocate an RcString.

Constructor & Destructor Documentation

◆ XMLQualifiedNameRef() [1/4]

constexpr donner::XMLQualifiedNameRef::XMLQualifiedNameRef ( const RcStringOrRef & name)
inlineconstexpr

Construct from an attribute name as a string_view, assumes no namespacePrefix.

Parameters
nameThe attribute name.

◆ XMLQualifiedNameRef() [2/4]

constexpr donner::XMLQualifiedNameRef::XMLQualifiedNameRef ( const char * name)
inlineconstexpr

Construct from an attribute name as a const char*, assumes no namespacePrefix.

Parameters
nameThe attribute name.

◆ XMLQualifiedNameRef() [3/4]

constexpr donner::XMLQualifiedNameRef::XMLQualifiedNameRef ( std::string_view name)
inlineconstexpr

Construct from an attribute name as a std::string_view, assumes no namespacePrefix.

Parameters
nameThe attribute name.

◆ XMLQualifiedNameRef() [4/4]

constexpr donner::XMLQualifiedNameRef::XMLQualifiedNameRef ( const RcStringOrRef & namespacePrefix,
const RcStringOrRef & name )
inlineconstexpr

Construct from an attribute with a namespace prefix.

Parameters
namespacePrefixThe namespace of the name, or empty if the name belongs to the default namespace.
nameThe attribute name.

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