22#if !defined(XERCESC_INCLUDE_GUARD_XMLURI_HPP)
23#define XERCESC_INCLUDE_GUARD_XMLURI_HPP
28#include <xercesc/internal/XSerializable.hpp>
29#include <xercesc/framework/XMLBuffer.hpp>
98 ,
const XMLCh*
const uriSpec
117 const XMLCh* getUriText()
const;
124 const XMLCh* getScheme()
const;
131 const XMLCh* getUserInfo()
const;
139 const XMLCh* getHost()
const;
153 const XMLCh* getRegBasedAuthority()
const;
161 const XMLCh* getPath()
const;
170 const XMLCh* getQueryString()
const;
179 const XMLCh* getFragment()
const;
295 ,
const XMLCh*
const uriStr
296 ,
bool bAllowSpaces=
false);
301 ,
const XMLCh*
const uriStr
302 ,
bool bAllowSpaces=
false);
306 XMLBuffer& normalizedURI);
311 DECL_XSERIALIZABLE(
XMLUri)
317 static const
XMLCh MARK_OR_RESERVED_CHARACTERS[];
318 static const
XMLCh RESERVED_CHARACTERS[];
319 static const
XMLCh MARK_CHARACTERS[];
320 static const
XMLCh SCHEME_CHARACTERS[];
321 static const
XMLCh USERINFO_CHARACTERS[];
322 static const
XMLCh REG_NAME_CHARACTERS[];
323 static const
XMLCh PATH_CHARACTERS[];
326 void buildFullText();
337 static
bool isReservedCharacter(const
XMLCh theChar);
344 static
bool isPathCharacter(const
XMLCh theChar);
351 static
bool isUnreservedCharacter(const
XMLCh theChar);
358 static
bool isReservedOrUnreservedCharacter(const
XMLCh theChar);
367 static
bool isConformantSchemeName(const
XMLCh* const scheme);
374 static
void isConformantUserInfo(const
XMLCh* const userInfo
384 static
bool isValidServerBasedAuthority(const
XMLCh* const host
387 , const
XMLCh* const userinfo
397 static
bool isValidServerBasedAuthority(const
XMLCh* const host
399 , const
XMLCh* const userinfo
409 static
bool isValidRegistryBasedAuthority(const
XMLCh* const authority
419 static
bool isValidRegistryBasedAuthority(const
XMLCh* const authority);
438 static
bool isWellFormedAddress(const
XMLCh* const addr
450 static
bool isWellFormedIPv4Address(const
XMLCh* const addr, const
XMLSize_t length);
465 static
bool isWellFormedIPv6Reference(const
XMLCh* const addr, const
XMLSize_t length);
502 void initialize(const
XMLUri& toCopy);
518 void initialize(const
XMLUri* const baseURI
519 , const
XMLCh* const uriSpec);
527 void initializeScheme(const
XMLCh* const uriSpec);
536 void initializeAuthority(const
XMLCh* const uriSpec);
544 void initializePath(const
XMLCh* const uriSpec);
552 static
bool isConformantSchemeName(const
XMLCh* const scheme,
554 static
bool processScheme(const
XMLCh* const uriStr,
XMLSize_t& index);
555 static
bool processAuthority(const
XMLCh* const uriStr, const
XMLSize_t authLen);
556 static
bool isWellFormedAddress(const
XMLCh* const addr, const
XMLSize_t addrLen);
557 static
bool processPath(const
XMLCh* const pathStr, const
XMLSize_t pathStrLen,
558 const
bool isSchemePresent, const
bool bAllowSpaces=false);
631 (
const_cast<XMLUri *
>(
this))->buildFullText();
639inline bool XMLUri::isReservedOrUnreservedCharacter(
const XMLCh theChar)
645inline bool XMLUri::isReservedCharacter(
const XMLCh theChar)
650inline bool XMLUri::isPathCharacter(
const XMLCh theChar)
655inline bool XMLUri::isUnreservedCharacter(
const XMLCh theChar)
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define XMLUTIL_EXPORT
Definition XercesDefs.hpp:162
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
Configurable memory manager.
Definition MemoryManager.hpp:40
static bool isAlphaNum(XMLCh const theChar)
Checks whether a character is within [0-9a-zA-Z].
static int indexOf(const char *const toSearch, const char ch)
Provides the index of the first occurrence of a character within a string.
void setFragment(const XMLCh *const newFragment)
Set the fragment for this URI.
const XMLCh * getHost() const
Get the host for this URI.
Definition XMLUri.hpp:593
static void normalizeURI(const XMLCh *const systemURI, XMLBuffer &normalizedURI)
void setUserInfo(const XMLCh *const newUserInfo)
Set the userinfo for this URI.
static bool isValidURI(bool haveBaseURI, const XMLCh *const uriStr, bool bAllowSpaces=false)
Determine whether a given string is a valid URI.
void setPath(const XMLCh *const newPath)
Set the path for this URI.
XMLUri & operator=(const XMLUri &toAssign)
XMLUri(const XMLUri *const baseURI, const XMLCh *const uriSpec, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
Construct a new URI from a base URI and a URI specification string.
void setRegBasedAuthority(const XMLCh *const newRegAuth)
Sets the registry based authority for this URI.
const XMLCh * getUserInfo() const
Get the userinfo for this URI.
Definition XMLUri.hpp:588
int getPort() const
Get the port for this URI.
Definition XMLUri.hpp:598
const XMLCh * getQueryString() const
Get the query string for this URI.
Definition XMLUri.hpp:613
static bool isValidURI(const XMLUri *const baseURI, const XMLCh *const uriStr, bool bAllowSpaces=false)
Determine whether a given string is a valid URI.
void setPort(int newPort)
Set the port for this URI.
static bool isURIString(const XMLCh *const uric)
Determine whether a given string contains only URI characters (also called "uric" in RFC 2396).
XMLUri(const XMLUri &toCopy)
Copy constructor.
XMLUri(const XMLCh *const uriSpec, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
Construct a new URI from a URI specification string.
void setScheme(const XMLCh *const newScheme)
Set the scheme for this URI.
void setQueryString(const XMLCh *const newQueryString)
Set the query string for this URI.
const XMLCh * getFragment() const
Get the fragment for this URI.
Definition XMLUri.hpp:618
const XMLCh * getUriText() const
Get the URI as a string specification.
Definition XMLUri.hpp:623
const XMLCh * getRegBasedAuthority() const
Get the registry based authority for this URI.
Definition XMLUri.hpp:603
const XMLCh * getPath() const
Get the path for this URI.
Definition XMLUri.hpp:608
void setHost(const XMLCh *const newHost)
Set the host for this URI.
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition XMemory.hpp:41