X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=blobdiff_plain;f=xmltooling%2FNamespace.h;h=8ac6382f5d4e8b483c8e0637405bc8ef1f78e939;hp=16ff0355b72d91f2076bd2801e85817b7603035f;hb=ce200eaef5c771e132b64437d78540bfd4683572;hpb=c27736816c230e8ee45349e8834fd8a7bd7b071c diff --git a/xmltooling/Namespace.h b/xmltooling/Namespace.h index 16ff035..8ac6382 100644 --- a/xmltooling/Namespace.h +++ b/xmltooling/Namespace.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2009 Internet2 + * Copyright 2001-2010 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,8 +43,9 @@ namespace xmltooling { * @param uri namespace URI * @param prefix namespace prefix (without the colon) * @param alwaysDeclare true iff the namespace should always be declared regardless of in-scope declarations + * @param visiblyUsed true iff the namespace is visibly used by an XMLObject its attached to */ - Namespace(const XMLCh* uri=NULL, const XMLCh* prefix=NULL, bool alwaysDeclare=false); + Namespace(const XMLCh* uri=NULL, const XMLCh* prefix=NULL, bool alwaysDeclare=false, bool visiblyUsed=true); ~Namespace(); @@ -64,7 +65,13 @@ namespace xmltooling { * Returns true iff the namespace should always be declared regardless of in-scope declarations * @return the alwaysDeclared setting */ - const bool alwaysDeclare() const { return m_pinned; } + const bool alwaysDeclare() const { return m_pinned; } + + /** + * Returns true iff the namespace is visibly used by an XMLObject its attached to + * @return the visiblyUsed setting + */ + const bool visiblyUsed() const { return m_visiblyUsed; } /** * Sets the namespace prefix @@ -84,8 +91,14 @@ namespace xmltooling { */ void setAlwaysDeclare(bool alwaysDeclare) { m_pinned = alwaysDeclare; } + /** + * Sets the visiblyUsed property + * @param visiblyUsed true iff the namespace is visibly used by an XMLObject its attached to + */ + void setVisiblyUsed(bool visiblyUsed) { m_visiblyUsed = visiblyUsed; } + private: - bool m_pinned; + bool m_pinned,m_visiblyUsed; xstring m_uri; xstring m_prefix; };