Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
CntrCloner.hh File Reference
Detailed Description
Class template definition file for cloning a container of pointers.
These classes are used by Owned<T>::cloneObjNew() when T is a container of pointers. Requirements on T:
- Elements of T can be copied using new(), i.e. T is a non-polymorphic container. For polymorphic containers, you must copy the elements yourself, or provide a specialization for your container element type.
- T::iterator is an iterator, T::value_type is the type of element stored in T, and T::iterator has begin(), end() and operator++(int) methods defined.
Note that std::queue and std::stack cannot be cloned as they do not have iterators (though specializations could be defined). Note also that the CntrCloner class and its specializations allow for a variety of combinations of containers and pointers to be used. For instance, typedef Owned<std::list<T*> > OListTP;
typedef std::list< std::vector<OListTP*> > ListVec;
typedef Owned<ListVec> OListComplex;
is possible.
Copyright:
Copyright (C) 2002 Oliver Schoenborn
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
You can redistribute it and/or modify it under the terms found in the LICENSE file that is included in the library distribution.
Definition in file CntrCloner.hh.#include "nullness.hh"
#include "OwnedFWD.hh"
#include "CntrClonerFWD.hh"
Include dependency graph for CntrCloner.hh:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Generated on Tue Nov 12 20:43:57 2002 for Mango-ptr Library by
1.2.18