+template<typename T>
+class NodePtr: public RefPtr<T>
+{
+public:
+ NodePtr() { }
+ NodePtr(T *p): RefPtr<T>(p) { }
+ NodePtr(const NodePtr &p): RefPtr<T>(p ? p->clone() : 0) { }
+ NodePtr &operator=(const NodePtr &p) { RefPtr<T>::operator=(p); return *this; }
+
+ template<typename U>
+ NodePtr(const RefPtr<U> &p): RefPtr<T>(p) { }
+
+ template<typename U>
+ NodePtr(const NodePtr<U> &p): RefPtr<T>(p ? p->clone() : 0) { }
+};
+
+template<typename C>
+class NodeContainer: public C
+{
+public:
+ NodeContainer() { }
+ NodeContainer(const NodeContainer &);
+};
+
+template<typename T>
+class NodeList: public NodeContainer<std::list<RefPtr<T> > >
+{ };
+
+template<typename T>
+class NodeArray: public NodeContainer<std::vector<RefPtr<T> > >
+{ };
+