Boost logo

Boost-Commit :

From: mconsoni_at_[hidden]
Date: 2007-06-26 15:13:29


Author: mconsoni
Date: 2007-06-26 15:13:29 EDT (Tue, 26 Jun 2007)
New Revision: 7176
URL: http://svn.boost.org/trac/boost/changeset/7176

Log:

- This files are duplicated and/or deprecated.. so, we remove them... :)

Removed:
   sandbox/boost/extension/basic_factory_map.hpp
   sandbox/boost/extension/counted_factorymap.hpp
   sandbox/boost/extension/factorymap.hpp
   sandbox/boost/extension/impl/linked_library.hpp
   sandbox/boost/extension/zone.hpp

Deleted: sandbox/boost/extension/basic_factory_map.hpp
==============================================================================

Deleted: sandbox/boost/extension/counted_factorymap.hpp
==============================================================================
--- sandbox/boost/extension/counted_factorymap.hpp 2007-06-26 15:13:29 EDT (Tue, 26 Jun 2007)
+++ (empty file)
@@ -1,303 +0,0 @@
-/* (C) Copyright Jeremy Pack 2007
- * Distributed under the Boost Software License, Version 1.0. (See
- * accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- */
-
-#ifndef BOOST_EXTENSION_COUNTED_FACTORY_MAP_HPP
-#define BOOST_EXTENSION_COUNTED_FACTORYZONE_HPP
-#include <list>
-#include <memory>
-#include <map>
-#include <boost/extension/counted_factoryfactory.hpp>
-#include <boost/extension/impl/typeinfo.hpp>
-
-namespace boost{namespace extensions{
-
-
-template <class TypeInfo>
-class basic_counted_factory_map
-{
-private:
- class generic_factory_container
- {
- public:
- virtual ~generic_factory_container(){}
- };
- template <class Interface, class Info, class Param1 = void, class Param2 = void, class Param3 = void, class Param4 = void, class Param5 = void, class Param6 = void>
- class factory_container : public std::list<counted_factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> >, public generic_factory_container
- {
- public:
- factory_container(){}
- factory_container(basic_factory_map & z)
- :std::list<counted_factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> >(z.get<Interface, Param1, Param2, Param3, Param4, Param5, Param6>()){}
- virtual ~factory_container(){}
- };
- typedef std::map<TypeInfo, generic_factory_container *> FactoryMap;
- FactoryMap factories_;
- //template <class ClassType>
- //TypeInfo get_class_type();
-public:
- ~basic_factory_map(){
- for(typename FactoryMap::iterator it = factories_.begin(); it != factories_.end(); ++it)
- delete it->second;
- //TODO - test for memory leaks.
- }
- template <class Interface, class Info>
-operator std::list<counted_factory<Interface, Info> > & ()
- {return this->get<Interface, Info>();}
- template <class Interface, class Info>
-std::list<factory<Interface, Info> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info> * ret =
- new factory_container<Interface, Info>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info>
-void add(Info info)
- {
- typedef std::list<counted_factory<Interface, Info> > ListType;
- ListType & s = this->get<Interface, Info>();
- counted_factory<Interface, Info> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- f.set_library(current_library_);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1>
-operator std::list<counted_factory<Interface, Info, Param1> > & ()
- {return this->get<Interface, Info, Param1>();}
- template <class Interface, class Info, class Param1>
-std::list<factory<Interface, Info, Param1> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1> * ret =
- new factory_container<Interface, Info, Param1>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1>
-void add(Info info)
- {
- typedef std::list<counted_factory<Interface, Info, Param1> > ListType;
- ListType & s = this->get<Interface, Info, Param1>();
- counted_factory<Interface, Info, Param1> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- f.set_library(current_library_);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2>
-operator std::list<counted_factory<Interface, Info, Param1, Param2> > & ()
- {return this->get<Interface, Info, Param1, Param2>();}
- template <class Interface, class Info, class Param1, class Param2>
-std::list<factory<Interface, Info, Param1, Param2> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2> * ret =
- new factory_container<Interface, Info, Param1, Param2>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2>
-void add(Info info)
- {
- typedef std::list<counted_factory<Interface, Info, Param1, Param2> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2>();
- counted_factory<Interface, Info, Param1, Param2> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- f.set_library(current_library_);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3>
-operator std::list<counted_factory<Interface, Info, Param1, Param2, Param3> > & ()
- {return this->get<Interface, Info, Param1, Param2, Param3>();}
- template <class Interface, class Info, class Param1, class Param2, class Param3>
-std::list<factory<Interface, Info, Param1, Param2, Param3> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2, Param3> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3> * ret =
- new factory_container<Interface, Info, Param1, Param2, Param3>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2, Param3> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3>
-void add(Info info)
- {
- typedef std::list<counted_factory<Interface, Info, Param1, Param2, Param3> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3>();
- counted_factory<Interface, Info, Param1, Param2, Param3> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- f.set_library(current_library_);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4>
-operator std::list<counted_factory<Interface, Info, Param1, Param2, Param3, Param4> > & ()
- {return this->get<Interface, Info, Param1, Param2, Param3, Param4>();}
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4>
-std::list<factory<Interface, Info, Param1, Param2, Param3, Param4> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2, Param3, Param4> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3, Param4> * ret =
- new factory_container<Interface, Info, Param1, Param2, Param3, Param4>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2, Param3, Param4> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3, class Param4>
-void add(Info info)
- {
- typedef std::list<counted_factory<Interface, Info, Param1, Param2, Param3, Param4> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3, Param4>();
- counted_factory<Interface, Info, Param1, Param2, Param3, Param4> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- f.set_library(current_library_);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5>
-operator std::list<counted_factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> > & ()
- {return this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5>();}
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5>
-std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5> * ret =
- new factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5>
-void add(Info info)
- {
- typedef std::list<counted_factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5>();
- counted_factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- f.set_library(current_library_);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5, class Param6>
-operator std::list<counted_factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> > & ()
- {return this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6>();}
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5, class Param6>
-std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> * ret =
- new factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5, class Param6>
-void add(Info info)
- {
- typedef std::list<counted_factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6>();
- counted_factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- f.set_library(current_library_);
- //it->set_type<Actual>();
- }
-};
-
-typedef basic_counted_factory_map<default_type_info> counted_factory_map;
-}}
-
-#endif

Deleted: sandbox/boost/extension/factorymap.hpp
==============================================================================
--- sandbox/boost/extension/factorymap.hpp 2007-06-26 15:13:29 EDT (Tue, 26 Jun 2007)
+++ (empty file)
@@ -1,296 +0,0 @@
-/* (C) Copyright Jeremy Pack 2007
- * Distributed under the Boost Software License, Version 1.0. (See
- * accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- */
-
-#ifndef BOOST_EXTENSION_FACTORY_MAP_HPP
-#define BOOST_EXTENSION_FACTORYZONE_HPP
-#include <list>
-#include <memory>
-#include <map>
-#include <boost/extension/factoryfactory.hpp>
-#include <boost/extension/impl/typeinfo.hpp>
-
-namespace boost{namespace extensions{
-
-
-template <class TypeInfo>
-class basic_factory_map
-{
-private:
- class generic_factory_container
- {
- public:
- virtual ~generic_factory_container(){}
- };
- template <class Interface, class Info, class Param1 = void, class Param2 = void, class Param3 = void, class Param4 = void, class Param5 = void, class Param6 = void>
- class factory_container : public std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> >, public generic_factory_container
- {
- public:
- factory_container(){}
- factory_container(basic_factory_map & z)
- :std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> >(z.get<Interface, Param1, Param2, Param3, Param4, Param5, Param6>()){}
- virtual ~factory_container(){}
- };
- typedef std::map<TypeInfo, generic_factory_container *> FactoryMap;
- FactoryMap factories_;
- //template <class ClassType>
- //TypeInfo get_class_type();
-public:
- ~basic_factory_map(){
- for(typename FactoryMap::iterator it = factories_.begin(); it != factories_.end(); ++it)
- delete it->second;
- //TODO - test for memory leaks.
- }
- template <class Interface, class Info>
-operator std::list<factory<Interface, Info> > & ()
- {return this->get<Interface, Info>();}
- template <class Interface, class Info>
-std::list<factory<Interface, Info> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info> * ret =
- new factory_container<Interface, Info>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info>
-void add(Info info)
- {
- typedef std::list<factory<Interface, Info> > ListType;
- ListType & s = this->get<Interface, Info>();
- factory<Interface, Info> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1>
-operator std::list<factory<Interface, Info, Param1> > & ()
- {return this->get<Interface, Info, Param1>();}
- template <class Interface, class Info, class Param1>
-std::list<factory<Interface, Info, Param1> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1> * ret =
- new factory_container<Interface, Info, Param1>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1>
-void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1> > ListType;
- ListType & s = this->get<Interface, Info, Param1>();
- factory<Interface, Info, Param1> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2>
-operator std::list<factory<Interface, Info, Param1, Param2> > & ()
- {return this->get<Interface, Info, Param1, Param2>();}
- template <class Interface, class Info, class Param1, class Param2>
-std::list<factory<Interface, Info, Param1, Param2> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2> * ret =
- new factory_container<Interface, Info, Param1, Param2>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2>
-void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2>();
- factory<Interface, Info, Param1, Param2> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3>
-operator std::list<factory<Interface, Info, Param1, Param2, Param3> > & ()
- {return this->get<Interface, Info, Param1, Param2, Param3>();}
- template <class Interface, class Info, class Param1, class Param2, class Param3>
-std::list<factory<Interface, Info, Param1, Param2, Param3> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2, Param3> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3> * ret =
- new factory_container<Interface, Info, Param1, Param2, Param3>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2, Param3> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3>
-void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2, Param3> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3>();
- factory<Interface, Info, Param1, Param2, Param3> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4>
-operator std::list<factory<Interface, Info, Param1, Param2, Param3, Param4> > & ()
- {return this->get<Interface, Info, Param1, Param2, Param3, Param4>();}
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4>
-std::list<factory<Interface, Info, Param1, Param2, Param3, Param4> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2, Param3, Param4> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3, Param4> * ret =
- new factory_container<Interface, Info, Param1, Param2, Param3, Param4>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2, Param3, Param4> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3, class Param4>
-void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2, Param3, Param4> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3, Param4>();
- factory<Interface, Info, Param1, Param2, Param3, Param4> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5>
-operator std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> > & ()
- {return this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5>();}
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5>
-std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5> * ret =
- new factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5>
-void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5>();
- factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5, class Param6>
-operator std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> > & ()
- {return this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6>();}
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5, class Param6>
-std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> > & get()
- {
- TypeInfo current_type =
- type_info_handler<TypeInfo, factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> >::get_class_type();
- typename FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> * ret =
- new factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> &>(*(it->second));
- }
- }
-template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5, class Param6>
-void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6>();
- factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
-};
-
-typedef basic_factory_map<default_type_info> factory_map;
-}}
-
-#endif

Deleted: sandbox/boost/extension/impl/linked_library.hpp
==============================================================================
--- sandbox/boost/extension/impl/linked_library.hpp 2007-06-26 15:13:29 EDT (Tue, 26 Jun 2007)
+++ (empty file)
@@ -1,104 +0,0 @@
-#define BOOST_EXTENSIONS_IMPL_NAMESPACE_BEGIN namespace boost{ namespace extensions{ namespace impl {
-#define BOOST_EXTENSIONS_IMPL_NAMESPACE_END }}} // ns: boost::extensions::impl
-
-#ifdef BOOST_WINDOWS
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#endif
-
-#ifndef WINDOWS_LEAN_AND_MEAN
-#define WINDOWS_LEAN_AND_MEAN
-#endif
-
-#include <Windows.h>
-
-#define BOOST_EXTENSION_LIBRARY_EXTENSION "dll"
-
-BOOST_EXTENSIONS_IMPL_NAMESPACE_BEGIN
-
- typedef HMODULE library_handle;
- typedef FARPROC generic_function_ptr;
-
- inline bool is_library(const char * file_name) {
- int len = strlen(file_name);
- return (len > 3 && file_name[len-4] == '.'
- && file_name[len-3] == 'd' && file_name[len-2] == 'l' && file_name[len-1] == 'l');
- }
-
- inline library_handle load_shared_library(const char * libraryName) {
- return LoadLibrary(libraryName);
- }
-
- inline generic_function_ptr get_function(library_handle handle, const char * function_name) {
- return GetProcAddress(handle, function_name);
- }
-
- inline bool close_shared_library(library_handle handle){
- return FreeLibrary(handle) != 0;
- }
-
-BOOST_EXTENSIONS_IMPL_NAMESPACE_END
-
-#pragma comment(lib, "kernel32.lib")
-
-#else
-
-#ifdef __APPLE__
-
-#define BOOST_EXTENSION_LIBRARY_EXTENSION "dylib"
-
-BOOST_EXTENSIONS_IMPL_NAMESPACE_BEGIN
-
- inline bool is_library(const char * file_name)
- {
- int len = strlen(file_name);
- return ((len > 5 && file_name[len-7] == '.' && file_name[len-6] == 'b' && file_name[len-5] == 'u' &&
- file_name[len-4] == 'n' && file_name[len-3] == 'd' && file_name[len-2] == 'l' &&
- file_name[len-1] == 'e') || (len > 4 && file_name[len-6] == '.' &&
- file_name[len-5] == 'd' && file_name[len-4] == 'y' && file_name[len-3] == 'l' &&
- file_name[len-2] == 'i' && file_name[len-1] == 'b'));
- }
-BOOST_EXTENSIONS_IMPL_NAMESPACE_END
-
-#else
-
-#define BOOST_EXTENSION_LIBRARY_EXTENSION "so"
-
-BOOST_EXTENSIONS_IMPL_NAMESPACE_BEGIN
-
- inline bool is_library(const char * file_name) {
- int len = strlen(file_name);
- return (len > 2 && file_name[len-3] == '.'
- && file_name[len-2] == 's' && file_name[len-1] == 'o');
- }
-
-BOOST_EXTENSIONS_IMPL_NAMESPACE_END
-
-#endif
-
-#include <dlfcn.h>
-
-BOOST_EXTENSIONS_IMPL_NAMESPACE_BEGIN
-
- typedef void * library_handle;
- typedef void * generic_function_ptr;
-
- inline library_handle load_shared_library(const char * library_name) {
- return dlopen(library_name, RTLD_LAZY);
- }
-
- inline generic_function_ptr get_function(library_handle handle, const char * function_name) {
- return dlsym(handle, function_name);
- }
-
- inline bool close_shared_library(library_handle handle) {
- return dlclose(handle) == 0;
- }
-
-BOOST_EXTENSIONS_IMPL_NAMESPACE_END
-#endif
-
-#undef BOOST_EXTENSIONS_IMPL_NAMESPACE_BEGIN
-#undef BOOST_EXTENSIONS_IMPL_NAMESPACE_END
-

Deleted: sandbox/boost/extension/zone.hpp
==============================================================================
--- sandbox/boost/extension/zone.hpp 2007-06-26 15:13:29 EDT (Tue, 26 Jun 2007)
+++ (empty file)
@@ -1,303 +0,0 @@
-/*
- * Boost.Extension / zone:
- * ???
- *
- * (C) Copyright Jeremy Pack 2007
- * Distributed under the Boost Software License, Version 1.0. (See
- * accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- *
- * See http://www.boost.org/ for latest version.
- */
-
-#ifndef BOOST_EXTENSION_ZONE_HPP
-#define BOOST_EXTENSION_ZONE_HPP
-#include <list>
-#include <memory>
-#include <map>
-#include <boost/extension/factory.hpp>
-
-
-namespace boost{namespace extensions{
-
-template <class TypeInfo>
-class basic_factory_map
-{
-private:
- class generic_factory_container
- {
- public:
- virtual ~generic_factory_container(){}
- };
- template <class Interface, class Info, class Param1 = void, class Param2 = void, class Param3 = void, class Param4 = void, class Param5 = void, class Param6 = void>
- class factory_container : public std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> >, public generic_factory_container
- {
- public:
- factory_container(){}
- factory_container(factory_map & z)
- :std::list<factory<Interface, Info, Param1, Param2> >(z.get<Interface, Param1, Param2, Param3, Param4, Param5, Param6>()){}
- virtual ~factory_container(){}
- };
- typedef std::map<TypeInfo, generic_factory_container *> FactoryMap;
- FactoryMap factories_;
- template <class ClassType>
- TypeInfo get_class_type();
-public:
- ~factory_map(){
- for(FactoryMap::iterator it = factories_.begin(); it != factories_.end(); ++it)
- delete it->second;
- //TODO - test for memory leaks.
- }
- /*template <class Actual, class Interface, class Param1 = void,
- class Param2 = void, class param3 = void, class Param4 = void,
- class Param5 = void, class Param6 = void>
- extension & add(){}
- template <class Actual, class Interface, class Param1,
- class Param2, class param3, class Param4, class Param5>
- extension & add(){}
- template <class Actual, class Interface, class Param1,
- class Param2, class param3, class Param4>
- extension & add(){}
- template <class Actual, class Interface, class Param1,
- class Param2, class param3>
- extension & add(){}
- template <class Actual, class Interface, class Param1, class Param2>
- extension & add(){}
- template <class Actual, class Interface, class Param1>
- extension & add(){}
- template <class Actual, class Interface>
- extension & add(){}*/
-
-
- /*template <class Interface, class Param1 = void,
- class Param2 = void, class param3 = void, class Param4 = void,
- class Param5 = void, class Param6 = void>
- const std::set<factory<Interface, Param1, Param2, Param3, Param4, Param5, Param6> & get(){}*/
- template <class Interface, class Info, class Param1, class Param2>
- operator std::list<factory<Interface, Info, Param1, Param2> > & ()
- {return this->get<Interface, Info, Param1, Param2>();}
-
- template <class Interface, class Info>
- std::list<factory<Interface, Info> > & get()
- {
- type_info current_type =
- type_info::get_type_info<factory<Interface, Info> >();
- FactoryMap::iterator it =
- factories_.find(current_type);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info> * ret =
- new factory_container<Interface, Info>();
- factories_[current_type] = ret;
- return *ret;
- }
- else
- {
- // Change to dynamic if this fails
- return static_cast<factory_container<Interface, Info> &>(*(it->second));
- }
- }
- template <class Actual, class Interface, class Info>
- void add(Info info)
- {
- typedef std::list<factory<Interface, Info> > ListType;
- ListType & s = this->get<Interface, Info>();
- factory<Interface, Info> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1>
- std::list<factory<Interface, Info, Param1> > & get()
- {
- const std::type_info * current_type_ptr
- = &typeid(factory<Interface, Info, Param1>);
- FactoryMap::iterator it =
- factories_.find(current_type_ptr);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1> * ret
- = new factory_container<Interface, Info, Param1>();
- factories_[current_type_ptr] = ret;
- return *ret;
- }
- else
- {
- return dynamic_cast<factory_container<Interface, Info, Param1> &>(*(it->second));
- }
- }
- template <class Actual, class Interface, class Info, class Param1>
- void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1> > ListType;
- ListType & s = this->get<Interface, Info, Param1>();
- factory<Interface, Info, Param1> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2>
- std::list<factory<Interface, Info, Param1, Param2> > & get()
- {
- const std::type_info * current_type_ptr
- = &typeid(factory<Interface, Info, Param1, Param2>);
- FactoryMap::iterator it =
- factories_.find(current_type_ptr);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2> * ret
- = new factory_container<Interface, Info, Param1, Param2>();
- factories_[current_type_ptr] = ret;
- return *ret;
- }
- else
- {
- return dynamic_cast<factory_container<Interface, Info, Param1, Param2> &>(*(it->second));
- }
- }
- template <class Actual, class Interface, class Info, class Param1, class Param2>
- void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2>();
- factory<Interface, Info, Param1, Param2> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3>
- std::list<factory<Interface, Info, Param1, Param2, Param3> > & get()
- {
- const std::type_info * current_type_ptr
- = &typeid(factory<Interface, Info, Param1, Param2, Param3>);
- FactoryMap::iterator it =
- factories_.find(current_type_ptr);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3> * ret
- = new factory_container<Interface, Info, Param1, Param2, Param3>();
- factories_[current_type_ptr] = ret;
- return *ret;
- }
- else
- {
- return dynamic_cast<factory_container<Interface, Info, Param1, Param2, Param3> &>(*(it->second));
- }
- }
- template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3>
- void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2, Param3> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3>();
- factory<Interface, Info, Param1, Param2, Param3> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4>
- std::list<factory<Interface, Info, Param1, Param2, Param3, Param4> > & get()
- {
- const std::type_info * current_type_ptr
- = &typeid(factory<Interface, Info, Param1, Param2, Param3, Param4>);
- FactoryMap::iterator it =
- factories_.find(current_type_ptr);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3, Param4> * ret
- = new factory_container<Interface, Info, Param1, Param2, Param3, Param4>();
- factories_[current_type_ptr] = ret;
- return *ret;
- }
- else
- {
- return dynamic_cast<factory_container<Interface, Info, Param1, Param2, Param3, Param4> &>(*(it->second));
- }
- }
- template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3, class Param4>
- void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2, Param3, Param4> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3, Param4>();
- factory<Interface, Info, Param1, Param2, Param3, Param4> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5>
- std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> > & get()
- {
- const std::type_info * current_type_ptr
- = &typeid(factory<Interface, Info, Param1, Param2, Param3, Param4, Param5>);
- FactoryMap::iterator it =
- factories_.find(current_type_ptr);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5> * ret
- = new factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5>();
- factories_[current_type_ptr] = ret;
- return *ret;
- }
- else
- {
- return dynamic_cast<factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5> &>(*(it->second));
- }
- }
- template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5>
- void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5>();
- factory<Interface, Info, Param1, Param2, Param3, Param4, Param5> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
- template <class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5, class Param6>
- std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> > & get()
- {
- const std::type_info * current_type_ptr
- = &typeid(factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6>);
- FactoryMap::iterator it =
- factories_.find(current_type_ptr);
-
- if (it == factories_.end())
- {
- factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> * ret
- = new factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6>();
- factories_[current_type_ptr] = ret;
- return *ret;
- }
- else
- {
- return dynamic_cast<factory_container<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> &>(*(it->second));
- }
- }
- template <class Actual, class Interface, class Info, class Param1, class Param2, class Param3, class Param4, class Param5, class Param6>
- void add(Info info)
- {
- typedef std::list<factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> > ListType;
- ListType & s = this->get<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6>();
- factory<Interface, Info, Param1, Param2, Param3, Param4, Param5, Param6> f(info);
- //f.set_type<Actual>();
- f.set_type_special((Actual*)0);
- s.push_back(f);
- //it->set_type<Actual>();
- }
-};
-
-
-}}
-#include <boost/extension/impl/typeinfo.hpp>
-#endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk