-/*\r
- * Copyright 2001-2006 Internet2\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-/**\r
- * @file AbstractChildlessElement.h\r
- * \r
- * AbstractXMLObject mixin that blocks children\r
- */\r
-\r
-#ifndef __xmltooling_absnokids_h__\r
-#define __xmltooling_absnokids_h__\r
-\r
-#include <xmltooling/AbstractXMLObject.h>\r
-\r
-#if defined (_MSC_VER)\r
- #pragma warning( push )\r
- #pragma warning( disable : 4250 4251 )\r
-#endif\r
-\r
-namespace xmltooling {\r
-\r
- /**\r
- * AbstractXMLObject mixin that blocks children.\r
- * Inherit from this class to implement a childless element.\r
- */\r
- class XMLTOOL_API AbstractChildlessElement : public virtual AbstractXMLObject\r
- {\r
- public:\r
- virtual ~AbstractChildlessElement() {}\r
- \r
- bool hasChildren() const {\r
- return false;\r
- }\r
-\r
- const std::list<XMLObject*>& getOrderedChildren() const {\r
- return m_no_children;\r
- }\r
-\r
- void removeChild(XMLObject* child);\r
-\r
- protected:\r
- AbstractChildlessElement() {}\r
- \r
- /** Copy constructor. */\r
- AbstractChildlessElement(const AbstractChildlessElement& src) {}\r
-\r
- private:\r
- static std::list<XMLObject*> m_no_children;\r
- };\r
- \r
-};\r
-\r
-#if defined (_MSC_VER)\r
- #pragma warning( pop )\r
-#endif\r
-\r
-#endif /* __xmltooling_absnokids_h__ */\r