PCL
pcl::XMLDeclaration Class Reference

XML declaration More...

#include <XML.h>

+ Inheritance diagram for pcl::XMLDeclaration:

Public Member Functions

 XMLDeclaration (const String &version=String(), const String &encoding=String(), bool standalone=false)
 
 XMLDeclaration (const XMLDeclaration &)=default
 
const StringDocumentEncoding () const
 
bool IsDefined () const
 
bool IsStandaloneDocument () const
 
void Serialize (IsoString &text) const
 
const StringVersion () const
 
- Public Member Functions inherited from pcl::XMLComponent
 XMLComponent ()=default
 
 XMLComponent (const XMLComponent &)=default
 
virtual ~XMLComponent ()
 
bool IsTopLevel () const
 
XMLElementParentElement () const
 

Detailed Description

XMLDeclaration represents an XML declaration in an XML document prolog:

https://www.w3.org/TR/xml11/#sec-prolog-dtd

Definition at line 2320 of file XML.h.

Constructor & Destructor Documentation

◆ XMLDeclaration() [1/2]

pcl::XMLDeclaration::XMLDeclaration ( const String version = String(),
const String encoding = String(),
bool  standalone = false 
)
inline

Constructs a new XMLDeclaration object with the specified version, optional encoding and standalone document specification.

Definition at line 2328 of file XML.h.

◆ XMLDeclaration() [2/2]

pcl::XMLDeclaration::XMLDeclaration ( const XMLDeclaration )
default

Copy constructor.

Member Function Documentation

◆ DocumentEncoding()

const String& pcl::XMLDeclaration::DocumentEncoding ( ) const
inline

Returns a reference to the (immutable) document encoding string.

Definition at line 2351 of file XML.h.

◆ IsDefined()

bool pcl::XMLDeclaration::IsDefined ( ) const
inline

Returns true iff this XML declaration has been defined. This function can be used to check if a parsed XML document includes an XML declaration.

Definition at line 2369 of file XML.h.

◆ IsStandaloneDocument()

bool pcl::XMLDeclaration::IsStandaloneDocument ( ) const
inline

Returns true iff this XML declaration specifies a standalone document.

Definition at line 2359 of file XML.h.

◆ Serialize()

void pcl::XMLDeclaration::Serialize ( IsoString text) const

Serializes this XML declaration.

The generated serialization will be appended to the specified 8-bit text string. If no version string has been defined for this object, a 'version="1.0"' attribute will be generated. Similarly, if no encoding string has been defined, an 'encoding="UTF-8"' attribute will be generated.

◆ Version()

const String& pcl::XMLDeclaration::Version ( ) const
inline

Returns a reference to the (immutable) XML version string.

Definition at line 2343 of file XML.h.


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