Reference type for XMLQualifiedName, to pass the value to APIs without needing to allocate an RcString.
More...
#include "donner/base/xml/XMLQualifiedName.h"
|
|
RcStringOrRef | namespacePrefix |
| | The namespace prefix of the attribute, or an empty string if no namespace (default namespace).
|
|
RcStringOrRef | name |
| | The attribute name.
|
Reference type for XMLQualifiedName, to pass the value to APIs without needing to allocate an RcString.
Either member may be a non-owning view, so the strings it refers to must outlive this object. Use it for in-parameters, and copy into an XMLQualifiedName to keep a name. Do not cache a std::string_view of a member of a temporary XMLQualifiedNameRef: under the small-string optimization the bytes can live inside the temporary itself.
◆ XMLQualifiedNameRef() [1/5]
| donner::xml::XMLQualifiedNameRef::XMLQualifiedNameRef |
( |
const RcStringOrRef & | name | ) |
|
|
inlineconstexpr |
Construct from an attribute name, assumes no namespacePrefix.
- Parameters
-
◆ XMLQualifiedNameRef() [2/5]
| donner::xml::XMLQualifiedNameRef::XMLQualifiedNameRef |
( |
const char * | name | ) |
|
|
inlineconstexpr |
Construct from an attribute name as a const char*, assumes no namespacePrefix.
- Parameters
-
◆ XMLQualifiedNameRef() [3/5]
| donner::xml::XMLQualifiedNameRef::XMLQualifiedNameRef |
( |
std::string_view | name | ) |
|
|
inlineconstexpr |
Construct from an attribute name as a std::string_view, assumes no namespacePrefix.
- Parameters
-
◆ XMLQualifiedNameRef() [4/5]
Construct from an attribute with a namespace prefix.
- Parameters
-
| namespacePrefix | The namespace of the name, or empty if the name belongs to the default namespace. |
| name | The attribute name. |
◆ XMLQualifiedNameRef() [5/5]
| donner::xml::XMLQualifiedNameRef::XMLQualifiedNameRef |
( |
const XMLQualifiedName & | attr | ) |
|
|
inlineconstexpr |
◆ printCssSyntax()
| details::DeferredCssSyntaxPrinter< XMLQualifiedNameRef > donner::xml::XMLQualifiedNameRef::printCssSyntax |
( |
| ) |
const |
|
inline |
When used in an ostream output stream, prints the qualified name as a CSS selector (e.g.
"ns|name").
Example usage:
std::cout <<
name.printCssSyntax() <<
"\n";
constexpr XMLQualifiedNameRef(const RcStringOrRef &name)
Construct from an attribute name, assumes no namespacePrefix.
Definition XMLQualifiedName.h:185
RcStringOrRef name
The attribute name.
Definition XMLQualifiedName.h:178
The documentation for this struct was generated from the following file: