xmltooling  1.6.4
xmltooling::Namespace Class Reference

A data structure for encapsulating XML Namespace attributes. More...

#include <xmltooling/Namespace.h>

Public Types

enum  namespace_usage_t { Indeterminate, NonVisiblyUsed, VisiblyUsed }
 Tri-state indicator of namespace usage.
 

Public Member Functions

 Namespace (const XMLCh *uri=0, const XMLCh *prefix=0, bool alwaysDeclare=false, namespace_usage_t usage=Indeterminate)
 Constructor. More...
 
const XMLCh * getNamespacePrefix () const
 Returns the namespace prefix. More...
 
const XMLCh * getNamespaceURI () const
 Returns the namespace URI. More...
 
const bool alwaysDeclare () const
 Returns true iff the namespace should always be declared regardless of in-scope declarations. More...
 
const namespace_usage_t usage () const
 Returns the usage of the namespace by an XMLObject. More...
 
void setNamespacePrefix (const XMLCh *prefix)
 Sets the namespace prefix. More...
 
void setNamespaceURI (const XMLCh *uri)
 Sets the namespace URI. More...
 
void setAlwaysDeclare (bool alwaysDeclare)
 Sets the alwaysDeclared property. More...
 
void setUsage (namespace_usage_t usage)
 Sets the usage property. More...
 

Detailed Description

A data structure for encapsulating XML Namespace attributes.

Constructor & Destructor Documentation

◆ Namespace()

xmltooling::Namespace::Namespace ( const XMLCh *  uri = 0,
const XMLCh *  prefix = 0,
bool  alwaysDeclare = false,
namespace_usage_t  usage = Indeterminate 
)

Constructor.

Parameters
urinamespace URI
prefixnamespace prefix (without the colon)
alwaysDeclaretrue iff the namespace should always be declared regardless of in-scope declarations
usageindicates usage of namespace in the context of an XMLObject

Member Function Documentation

◆ alwaysDeclare()

const bool xmltooling::Namespace::alwaysDeclare ( ) const
inline

Returns true iff the namespace should always be declared regardless of in-scope declarations.

Returns
the alwaysDeclared setting

◆ getNamespacePrefix()

const XMLCh* xmltooling::Namespace::getNamespacePrefix ( ) const
inline

Returns the namespace prefix.

Returns
Null-terminated Unicode string containing the prefix, without the colon

◆ getNamespaceURI()

const XMLCh* xmltooling::Namespace::getNamespaceURI ( ) const
inline

Returns the namespace URI.

Returns
Null-terminated Unicode string containing the URI

◆ setAlwaysDeclare()

void xmltooling::Namespace::setAlwaysDeclare ( bool  alwaysDeclare)
inline

Sets the alwaysDeclared property.

Parameters
alwaysDeclaretrue iff the namespace should always be declared regardless of in-scope declarations

◆ setNamespacePrefix()

void xmltooling::Namespace::setNamespacePrefix ( const XMLCh *  prefix)

Sets the namespace prefix.

Parameters
prefixNull-terminated Unicode string containing the prefix, without the colon

◆ setNamespaceURI()

void xmltooling::Namespace::setNamespaceURI ( const XMLCh *  uri)

Sets the namespace URI.

Parameters
uriNull-terminated Unicode string containing the URI

◆ setUsage()

void xmltooling::Namespace::setUsage ( namespace_usage_t  usage)
inline

Sets the usage property.

Parameters
usageusage of the namespace by an XMLObject

◆ usage()

const namespace_usage_t xmltooling::Namespace::usage ( ) const
inline

Returns the usage of the namespace by an XMLObject.

Returns
the usage setting

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