X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2FQName.h;h=02ce2100fca308f7c3de328a19ddfc57b365d76d;hb=56a73c1c7b1e63f1ff1717b25a76ebd480594d5a;hp=17d8d775d530edb081b3f091fe5d4adfba52c5dc;hpb=4ae66c96c86fc7dbacf7c11f9cef265de7fe9208;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/QName.h b/xmltooling/QName.h index 17d8d77..02ce210 100644 --- a/xmltooling/QName.h +++ b/xmltooling/QName.h @@ -1,17 +1,21 @@ -/* - * Copyright 2001-2007 Internet2 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at +/** + * Licensed to the University Corporation for Advanced Internet + * Development, Inc. (UCAID) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for + * additional information regarding copyright ownership. + * + * UCAID licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the + * License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. */ /** @@ -47,7 +51,7 @@ namespace xmltooling { * @param localPart local name * @param prefix namespace prefix (without the colon) */ - QName(const XMLCh* uri=NULL, const XMLCh* localPart=NULL, const XMLCh* prefix=NULL); + QName(const XMLCh* uri=nullptr, const XMLCh* localPart=nullptr, const XMLCh* prefix=nullptr); /** * Constructor @@ -56,22 +60,10 @@ namespace xmltooling { * @param localPart local name * @param prefix namespace prefix (without the colon) */ - QName(const char* uri, const char* localPart, const char* prefix=NULL); + QName(const char* uri, const char* localPart, const char* prefix=nullptr); ~QName(); -#ifndef HAVE_GOOD_STL - /** - * Deep copy constructor - */ - QName(const QName& src); - - /** - * Deep assignment operator - */ - QName& operator=(const QName& src); -#endif -#ifdef HAVE_GOOD_STL /** * Indicates whether the QName has a prefix. * @return true iff the prefix is non-empty @@ -107,43 +99,6 @@ namespace xmltooling { * @return Null-terminated Unicode string containing the local name */ const XMLCh* getLocalPart() const { return m_local.c_str(); } -#else - /** - * Indicates whether the QName has a prefix. - * @return true iff the prefix is non-empty - */ - bool hasPrefix() const { return m_prefix && *m_prefix; } - - /** - * Indicates whether the QName has a non-empty namespace. - * @return true iff the namespace is non-empty - */ - bool hasNamespaceURI() const { return m_uri && *m_uri; } - - /** - * Indicates whether the QName has a non-empty local name. - * @return true iff the local name is non-empty - */ - bool hasLocalPart() const { return m_local && *m_local; } - - /** - * Returns the namespace prefix - * @return Null-terminated Unicode string containing the prefix, without the colon - */ - const XMLCh* getPrefix() const { return m_prefix; } - - /** - * Returns the namespace URI - * @return Null-terminated Unicode string containing the URI - */ - const XMLCh* getNamespaceURI() const { return m_uri; } - - /** - * Returns the local part of the name - * @return Null-terminated Unicode string containing the local name - */ - const XMLCh* getLocalPart() const { return m_local; } -#endif /** * Sets the namespace prefix @@ -190,15 +145,9 @@ namespace xmltooling { std::string toString() const; private: -#ifdef HAVE_GOOD_STL xstring m_uri; xstring m_local; xstring m_prefix; -#else - XMLCh* m_uri; - XMLCh* m_local; - XMLCh* m_prefix; -#endif }; #if defined (_MSC_VER)