/*
- * Copyright 2001-2007 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.
/**
* @file xmltooling/util/XMLObjectChildrenList.h
*
- * STL-compatible container wrapper
+ * STL-compatible container wrapper.
*/
#ifndef __xmltooling_list_h__
class XMLObjectChildrenIterator
{
/// @cond OFF
- typename _Ty m_iter;
+ _Ty m_iter;
template <class _Tx, class _Tz> friend class XMLObjectChildrenList;
template <class _Tx, class _Tz> friend class XMLObjectPairList;
public:
const_iterator begin() const {
// return iterator for beginning of const sequence
- return m_container.begin();
+ return const_cast<const Container&>(m_container).begin();
}
const_iterator end() const {
// return iterator for end of const sequence
- return m_container.end();
+ return const_cast<const Container&>(m_container).end();
}
const_reference at(size_type _Pos) const {
void removeParent(const_reference _Val) {
if (_Val->getParent()!=m_parent)
throw XMLObjectException("Child object not owned by this parent.");
- _Val->setParent(NULL);
+ _Val->setParent(nullptr);
m_parent->releaseParentDOM(true);
}
const_iterator begin() const {
// return iterator for beginning of const sequence
- return m_container.begin();
+ return const_cast<const Container&>(m_container).begin();
}
const_iterator end() const {
// return iterator for end of const sequence
- return m_container.end();
+ return const_cast<const Container&>(m_container).end();
}
const_reference at(size_type _Pos) const {
void removeParent(const_reference _Val) {
if (_Val.first->getParent()!=m_parent || (_Val.second && _Val.second->getParent()!=m_parent))
throw XMLObjectException("One of the child objects not owned by this parent.");
- _Val.first->setParent(NULL);
+ _Val.first->setParent(nullptr);
if (_Val.second)
- _Val.second->setParent(NULL);
+ _Val.second->setParent(nullptr);
m_parent->releaseParentDOM(true);
}