From b5d2cd3d111a2e68137d6b37784e42fdde8fb7a5 Mon Sep 17 00:00:00 2001 From: tslettebo Date: Fri, 23 Aug 2002 07:22:07 +0000 Subject: [PATCH] No message git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@40 7ec92016-0320-0410-acc4-a06ded1c099a --- Borland/AbstractFactory.h | 29 +-- Borland/AssocVector.h | 363 +++++----------------------------- Borland/EmptyType.h | 29 +-- Borland/Factory.h | 56 ++---- Borland/Functor.h | 31 +-- Borland/HierarchyGenerators.h | 146 ++++++-------- Borland/MultiMethods.h | 258 ++++++++++++------------ Borland/NullType.h | 29 +-- Borland/Singleton.cpp | 32 +-- Borland/Singleton.h | 52 ++--- Borland/SmallObj.cpp | 78 ++++---- Borland/SmallObj.h | 39 +--- Borland/SmartPtr.h | 260 +++++++++++------------- Borland/Threads.h | 147 ++++++++------ Borland/Tuple.h | 27 +-- Borland/TypeManip.h | 29 +-- Borland/TypeTraits.h | 29 +-- Borland/Typelist.h | 39 +--- Borland/Visitor.h | 75 +++---- Borland/loki_typeinfo.h | 108 ++++++++++ Borland/portby.txt | 1 - Borland/readme.txt | 22 +++ Borland/static_check.h | 47 ++--- 23 files changed, 742 insertions(+), 1184 deletions(-) create mode 100644 Borland/loki_typeinfo.h delete mode 100644 Borland/portby.txt create mode 100644 Borland/readme.txt diff --git a/Borland/AbstractFactory.h b/Borland/AbstractFactory.h index 5e8ef3d..c9e501f 100644 --- a/Borland/AbstractFactory.h +++ b/Borland/AbstractFactory.h @@ -1,26 +1,4 @@ -head 1.1; -access; -symbols; -locks; strict; -comment @ * @; - - -1.1 -date 2002.07.16.22.42.04; author tslettebo; state Exp; -branches; -next ; - - -desc -@@ - - -1.1 -log -@Initial commit -@ -text -@//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // The Loki Library // Copyright (c) 2001 by Andrei Alexandrescu // This code accompanies the book: @@ -35,7 +13,7 @@ text // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -// Last update: June 20, 2001 +// Last update: August 9, 2002 #ifndef ABSTRACTFACTORY_INC_ #define ABSTRACTFACTORY_INC_ @@ -181,8 +159,7 @@ namespace Loki //////////////////////////////////////////////////////////////////////////////// // Change log: // June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!! -// July 16, 2002: Ported by Terje Slettebų to BCC 5.6 +// July 16, 2002: Ported by Terje Slettebų and Pavel Vozenilek to BCC 5.6 //////////////////////////////////////////////////////////////////////////////// #endif // ABSTRACTFACTORY_INC_ -@ diff --git a/Borland/AssocVector.h b/Borland/AssocVector.h index 86010bf..012c2cd 100644 --- a/Borland/AssocVector.h +++ b/Borland/AssocVector.h @@ -1,40 +1,20 @@ -head 1.1; -access; -symbols; -locks; strict; -comment @ * @; - - -1.1 -date 2002.07.16.22.42.04; author tslettebo; state Exp; -branches; -next ; - - -desc -@@ - - -1.1 -log -@Initial commit -@ -text -@//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // The Loki Library // Copyright (c) 2001 by Andrei Alexandrescu // This code accompanies the book: -// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design +// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design // Patterns Applied". Copyright (c) 2001. Addison-Wesley. -// Permission to use, copy, modify, distribute and sell this software for any -// purpose is hereby granted without fee, provided that the above copyright -// notice appear in all copies and that both that copyright notice and this +// Permission to use, copy, modify, distribute and sell this software for any +// purpose is hereby granted without fee, provided that the above copyright +// notice appear in all copies and that both that copyright notice and this // permission notice appear in supporting documentation. -// The author or Addison-Wesley Longman make no representations about the -// suitability of this software for any purpose. It is provided "as is" +// The author or Addison-Wesley Longman make no representations about the +// suitability of this software for any purpose. It is provided "as is" // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// +// Last update: August 9, 2002 + #ifndef ASSOCVECTOR_INC_ #define ASSOCVECTOR_INC_ @@ -62,21 +42,21 @@ namespace Loki public: AssocVectorCompare() {} - + AssocVectorCompare(const C& src) : C(src) {} - - bool operator()(const first_argument_type& lhs, + + bool operator()(const first_argument_type& lhs, const first_argument_type& rhs) const { return C::operator()(lhs, rhs); } - + bool operator()(const Data& lhs, const Data& rhs) const { return operator()(lhs.first, rhs.first); } - - bool operator()(const Data& lhs, + + bool operator()(const Data& lhs, const first_argument_type& rhs) const { return operator()(lhs.first, rhs); } - + bool operator()(const first_argument_type& lhs, const Data& rhs) const { return operator()(lhs, rhs.first); } @@ -94,8 +74,6 @@ namespace Loki // * iterators are random //////////////////////////////////////////////////////////////////////////////// -#ifdef __BORLANDC__ - template < class K, @@ -103,7 +81,7 @@ namespace Loki class C = std::less, class A = std::allocator< std::pair > > - class AssocVector + class AssocVector : private std::vector< std::pair, A > , private Private::AssocVectorCompare { @@ -128,12 +106,12 @@ namespace Loki typedef typename Base::reverse_iterator reverse_iterator; typedef typename Base::const_reverse_iterator const_reverse_iterator; - class value_compare + class value_compare : public std::binary_function , private key_compare { friend class AssocVector; - + protected: value_compare(key_compare pred) : key_compare(pred) {} @@ -142,278 +120,28 @@ namespace Loki bool operator()(const value_type& lhs, const value_type& rhs) const { return key_compare::operator()(lhs.first, rhs.first); } }; - + // 23.3.1.1 construct/copy/destroy - explicit AssocVector(const key_compare& comp = key_compare(), - const A& alloc = A()) - : std::vector< std::pair, A >(alloc), MyCompare(comp) - {} - - template - AssocVector(InputIterator first, InputIterator last, - const key_compare& comp = key_compare(), - const A& alloc = A()) - : std::vector< std::pair, A >(first, last, alloc), MyCompare(comp) - { - MyCompare& me = *this; - std::sort(begin(), end(), me); - } - - AssocVector& operator=(const AssocVector& rhs) - { - AssocVector(rhs).swap(*this); - return *this; - } - - // iterators: - // The following are here because MWCW gets 'using' wrong - iterator begin() { return std::vector< std::pair, A >::begin(); } - const_iterator begin() const { return std::vector< std::pair, A >::begin(); } - iterator end() { return std::vector< std::pair, A >::end(); } - const_iterator end() const { return std::vector< std::pair, A >::end(); } - reverse_iterator rbegin() { return std::vector< std::pair, A >::rbegin(); } - const_reverse_iterator rbegin() const { return std::vector< std::pair, A >::rbegin(); } - reverse_iterator rend() { return std::vector< std::pair, A >::rend(); } - const_reverse_iterator rend() const { return std::vector< std::pair, A >::rend(); } - - // capacity: - bool empty() const { return std::vector< std::pair, A >::empty(); } - size_type size() const { return std::vector< std::pair, A >::size(); } - size_type max_size() { return std::vector< std::pair, A >::max_size(); } - - // 23.3.1.2 element access: - mapped_type& operator[](const key_type& key) - { return insert(value_type(key, mapped_type())).first->second; } - - // modifiers: - std::pair insert(const value_type& val) - { - bool found(true); - iterator i(lower_bound(val.first)); - - if (i == end() || operator()(val.first, i->first)) - { - i = std::vector< std::pair, A >::insert(i, val); - found = false; - } - return std::make_pair(i, !found); - } - - iterator insert(iterator pos, const value_type& val) - { - if (pos != end() && operator()(*pos, val) && - (pos == end() - 1 || - !operator()(val, pos[1]) && - operator()(pos[1], val))) - { - return std::vector< std::pair, A >::insert(pos, val); - } - return insert(val).first; - } - - template - iterator insert(InputIterator first, InputIterator last) - { for (; first != last; ++first) insert(*first); } - - void erase(iterator pos) - { std::vector< std::pair, A >::erase(pos); } - - size_type erase(const key_type& k) - { - iterator i(find(k)); - if (i == end()) return 0; - erase(i); - return 1; - } - - void erase(iterator first, iterator last) - { std::vector< std::pair, A >::erase(first, last); } - - void swap(AssocVector& other) - { - using namespace std; - std::vector< std::pair, A >::swap(other); - MyCompare& me = *this; - MyCompare& rhs = other; - swap(me, rhs); - } - - void clear() - { std::vector< std::pair, A >::clear(); } - - // observers: - key_compare key_comp() const - { return *this; } - - value_compare value_comp() const - { - const key_compare& comp = *this; - return value_compare(comp); - } - - // 23.3.1.3 map operations: - iterator find(const key_type& k) - { - iterator i(lower_bound(k)); - if (i != end() && operator()(k, i->first)) - { - i = end(); - } - return i; - } - - const_iterator find(const key_type& k) const - { - const_iterator i(lower_bound(k)); - if (i != end() && operator()(k, i->first)) - { - i = end(); - } - return i; - } - - size_type count(const key_type& k) const - { return find(k) != end(); } - - iterator lower_bound(const key_type& k) - { - MyCompare& me = *this; - return std::lower_bound(begin(), end(), k, me); - } - - const_iterator lower_bound(const key_type& k) const - { - const MyCompare& me = *this; - return std::lower_bound(begin(), end(), k, me); - } - - iterator upper_bound(const key_type& k) - { - MyCompare& me = *this; - return std::upper_bound(begin(), end(), k, me); - } - - const_iterator upper_bound(const key_type& k) const - { - const MyCompare& me = *this; - return std::upper_bound(begin(), end(), k, me); - } - - std::pair equal_range(const key_type& k) - { - MyCompare& me = *this; - return std::equal_range(begin(), end(), k, me); - } - - std::pair equal_range( - const key_type& k) const - { - const MyCompare& me = *this; - return std::equal_range(begin(), end(), k, me); - } - - friend bool operator==(const AssocVector& lhs, const AssocVector& rhs) - { - const std::vector< std::pair, A >& me = lhs; - return me == rhs; - } - - bool operator<(const AssocVector& rhs) const - { - const std::vector< std::pair, A >& me = *this; - const std::vector< std::pair, A >& yo = rhs; - return me < yo; - } - - friend bool operator!=(const AssocVector& lhs, const AssocVector& rhs) - { return !(lhs == rhs); } - - friend bool operator>(const AssocVector& lhs, const AssocVector& rhs) - { return rhs < lhs; } - - friend bool operator>=(const AssocVector& lhs, const AssocVector& rhs) - { return !(lhs < rhs); } - - friend bool operator<=(const AssocVector& lhs, const AssocVector& rhs) - { return !(rhs < lhs); } - }; - - // specialized algorithms: - template - void swap(AssocVector& lhs, AssocVector& rhs) - { lhs.swap(rhs); } - -#else - - template - < - class K, - class V, - class C = std::less, - class A = std::allocator< std::pair > - > - class AssocVector - : private std::vector< std::pair, A > - , private Private::AssocVectorCompare - { - typedef std::vector, A> Base; - typedef Private::AssocVectorCompare MyCompare; - - public: - typedef K key_type; - typedef V mapped_type; - typedef typename Base::value_type value_type; - - typedef C key_compare; - typedef A allocator_type; - typedef typename A::reference reference; - typedef typename A::const_reference const_reference; - typedef typename Base::iterator iterator; - typedef typename Base::const_iterator const_iterator; - typedef typename Base::size_type size_type; - typedef typename Base::difference_type difference_type; - typedef typename A::pointer pointer; - typedef typename A::const_pointer const_pointer; - typedef typename Base::reverse_iterator reverse_iterator; - typedef typename Base::const_reverse_iterator const_reverse_iterator; - - class value_compare - : public std::binary_function - , private key_compare - { - friend class AssocVector; - - protected: - value_compare(key_compare pred) : key_compare(pred) - {} - - public: - bool operator()(const value_type& lhs, const value_type& rhs) const - { return key_compare::operator()(lhs.first, rhs.first); } - }; - - // 23.3.1.1 construct/copy/destroy - - explicit AssocVector(const key_compare& comp = key_compare(), + explicit AssocVector(const key_compare& comp = key_compare(), const A& alloc = A()) : Base(alloc), MyCompare(comp) {} - + template - AssocVector(InputIterator first, InputIterator last, - const key_compare& comp = key_compare(), + AssocVector(InputIterator first, InputIterator last, + const key_compare& comp = key_compare(), const A& alloc = A()) : Base(first, last, alloc), MyCompare(comp) { MyCompare& me = *this; std::sort(begin(), end(), me); } - + AssocVector& operator=(const AssocVector& rhs) - { - AssocVector(rhs).swap(*this); - return *this; + { + AssocVector(rhs).swap(*this); // ### Borland fix: template params added to cast + return *this; } // iterators: @@ -426,7 +154,7 @@ namespace Loki const_reverse_iterator rbegin() const { return Base::rbegin(); } reverse_iterator rend() { return Base::rend(); } const_reverse_iterator rend() const { return Base::rend(); } - + // capacity: bool empty() const { return Base::empty(); } size_type size() const { return Base::size(); } @@ -452,7 +180,7 @@ namespace Loki iterator insert(iterator pos, const value_type& val) { - if (pos != end() && operator()(*pos, val) && + if (pos != end() && operator()(*pos, val) && (pos == end() - 1 || !operator()(val, pos[1]) && operator()(pos[1], val))) @@ -461,11 +189,11 @@ namespace Loki } return insert(val).first; } - + template - iterator insert(InputIterator first, InputIterator last) + void insert(InputIterator first, InputIterator last) { for (; first != last; ++first) insert(*first); } - + void erase(iterator pos) { Base::erase(pos); } @@ -482,13 +210,13 @@ namespace Loki void swap(AssocVector& other) { - using namespace std; + using std::swap; Base::swap(other); MyCompare& me = *this; MyCompare& rhs = other; swap(me, rhs); } - + void clear() { Base::clear(); } @@ -514,7 +242,7 @@ namespace Loki } const_iterator find(const key_type& k) const - { + { const_iterator i(lower_bound(k)); if (i != end() && operator()(k, i->first)) { @@ -562,28 +290,28 @@ namespace Loki const MyCompare& me = *this; return std::equal_range(begin(), end(), k, me); } - + friend bool operator==(const AssocVector& lhs, const AssocVector& rhs) { const Base& me = lhs; return me == rhs; - } + } bool operator<(const AssocVector& rhs) const { const Base& me = *this; const Base& yo = rhs; return me < yo; - } + } friend bool operator!=(const AssocVector& lhs, const AssocVector& rhs) - { return !(lhs == rhs); } + { return !(lhs == rhs); } friend bool operator>(const AssocVector& lhs, const AssocVector& rhs) { return rhs < lhs; } friend bool operator>=(const AssocVector& lhs, const AssocVector& rhs) - { return !(lhs < rhs); } + { return !(lhs < rhs); } friend bool operator<=(const AssocVector& lhs, const AssocVector& rhs) { return !(rhs < lhs); } @@ -593,9 +321,7 @@ namespace Loki template void swap(AssocVector& lhs, AssocVector& rhs) { lhs.swap(rhs); } - -#endif - + } // namespace Loki //////////////////////////////////////////////////////////////////////////////// @@ -604,8 +330,9 @@ namespace Loki // June 11, 2001: remove paren in equal_range - credit due to Cristoph Koegl // June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!! // January 22, 2002: fixed operator= - credit due to Tom Hyer -// July 16, 2002: Ported by Terje Slettebų to BCC 5.6 +// June 25, 2002: fixed template insert() - credit due to Robert Minsk +// June 27, 2002: fixed member swap() - credit due to David Brookman +// July 16, 2002: Ported by Terje Slettebų and Pavel Vozenilek to BCC 5.6 //////////////////////////////////////////////////////////////////////////////// #endif // ASSOCVECTOR_INC_ -@ diff --git a/Borland/EmptyType.h b/Borland/EmptyType.h index 6ac6b4b..29e8983 100644 --- a/Borland/EmptyType.h +++ b/Borland/EmptyType.h @@ -1,26 +1,4 @@ -head 1.1; -access; -symbols; -locks; strict; -comment @ * @; - - -1.1 -date 2002.07.16.22.42.05; author tslettebo; state Exp; -branches; -next ; - - -desc -@@ - - -1.1 -log -@Initial commit -@ -text -@//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // The Loki Library // Copyright (c) 2001 by Andrei Alexandrescu // This code accompanies the book: @@ -35,7 +13,7 @@ text // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -// Last update: June 20, 2001 +// Last update: August 9, 2002 #ifndef EMPTYTYPE_INC_ #define EMPTYTYPE_INC_ @@ -54,8 +32,7 @@ namespace Loki //////////////////////////////////////////////////////////////////////////////// // Change log: // June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!! -// July 16, 2002: Ported by Terje Slettebų to BCC 5.6 +// July 16, 2002: Ported by Terje Slettebų and Pavel Vozenilek to BCC 5.6 //////////////////////////////////////////////////////////////////////////////// #endif // EMPTYTYPE_INC_ -@ diff --git a/Borland/Factory.h b/Borland/Factory.h index 93eb262..d13d2e3 100644 --- a/Borland/Factory.h +++ b/Borland/Factory.h @@ -1,26 +1,4 @@ -head 1.1; -access; -symbols; -locks; strict; -comment @ * @; - - -1.1 -date 2002.07.16.22.42.05; author tslettebo; state Exp; -branches; -next ; - - -desc -@@ - - -1.1 -log -@Initial commit -@ -text -@//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // The Loki Library // Copyright (c) 2001 by Andrei Alexandrescu // This code accompanies the book: @@ -35,12 +13,12 @@ text // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -// Last update: June 20, 2001 +// Last update: August 9, 2002 #ifndef FACTORY_INC_ #define FACTORY_INC_ -#include "TypeInfo.h" +#include "Loki_TypeInfo.h" #include "AssocVector.h" #include @@ -57,13 +35,9 @@ namespace Loki { struct Exception : public std::exception { -#ifdef __BORLANDC__ - const char* what() { return "Unknown Type"; } -#else - const char* what() const { return "Unknown Type"; } -#endif + const char* what() const throw() { return "Unknown Type"; } }; - + static AbstractProduct* OnUnknownType(IdentifierType) { throw Exception(); @@ -77,16 +51,18 @@ namespace Loki template < - class AbstractProduct, + class AbstractProduct, typename IdentifierType, typename ProductCreator = AbstractProduct* (*)(), template class FactoryErrorPolicy = DefaultFactoryError > - class Factory + class Factory : public FactoryErrorPolicy { public: + typedef ProductCreator ProductCreator; //### added for convenience, Pavel + bool Register(const IdentifierType& id, ProductCreator creator) { return associations_.insert( @@ -100,7 +76,7 @@ namespace Loki AbstractProduct* CreateObject(const IdentifierType& id) { - typename IdToProductMap::const_iterator i = associations_.find(id); + typename IdToProductMap::iterator i = associations_.find(id); if (i != associations_.end()) { return (i->second)(); @@ -121,7 +97,7 @@ namespace Loki template < class AbstractProduct, - class ProductCreator = + class ProductCreator = AbstractProduct* (*)(const AbstractProduct*), template class FactoryErrorPolicy = DefaultFactoryError @@ -130,6 +106,8 @@ namespace Loki : public FactoryErrorPolicy { public: + typedef ProductCreator ProductCreator; //### added for convenience, Pavel + bool Register(const TypeInfo& ti, ProductCreator creator) { return associations_.insert( @@ -145,7 +123,7 @@ namespace Loki { if (model == 0) return 0; - typename IdToProductMap::const_iterator i = + typename IdToProductMap::iterator i = associations_.find(typeid(*model)); if (i != associations_.end()) { @@ -163,8 +141,10 @@ namespace Loki //////////////////////////////////////////////////////////////////////////////// // Change log: // June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!! -// July 16, 2002: Ported by Terje Slettebų to BCC 5.6 +// May 08, 2002: replaced const_iterator with iterator so that self-modifying +// ProductCreators are supported. Also, added a throw() spec to what(). +// Credit due to Jason Fischl. +// July 16, 2002: Ported by Terje Slettebų and Pavel Vozenilek to BCC 5.6 //////////////////////////////////////////////////////////////////////////////// #endif // FACTORY_INC_ -@ diff --git a/Borland/Functor.h b/Borland/Functor.h index 5413aac..0f46c05 100644 --- a/Borland/Functor.h +++ b/Borland/Functor.h @@ -1,26 +1,4 @@ -head 1.1; -access; -symbols; -locks; strict; -comment @ * @; - - -1.1 -date 2002.07.16.22.42.05; author tslettebo; state Exp; -branches; -next ; - - -desc -@@ - - -1.1 -log -@Initial commit -@ -text -@//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // The Loki Library // Copyright (c) 2001 by Andrei Alexandrescu // This code accompanies the book: @@ -35,7 +13,7 @@ text // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -// Last update: June 20, 2001 +// Last update: August 9, 2002 #ifndef FUNCTOR_INC_ #define FUNCTOR_INC_ @@ -738,7 +716,7 @@ namespace Loki // A generalized functor implementation with value semantics //////////////////////////////////////////////////////////////////////////////// - template class ThreadingModel = DEFAULT_THREADING> class Functor { @@ -1161,8 +1139,7 @@ namespace Loki //////////////////////////////////////////////////////////////////////////////// // Change log: // June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!! -// July 16, 2002: Ported by Terje Slettebų to BCC 5.6 +// July 16, 2002: Ported by Terje Slettebų and Pavel Vozenilek to BCC 5.6 //////////////////////////////////////////////////////////////////////////////// #endif // FUNCTOR_INC_ -@ diff --git a/Borland/HierarchyGenerators.h b/Borland/HierarchyGenerators.h index c75ca44..099acde 100644 --- a/Borland/HierarchyGenerators.h +++ b/Borland/HierarchyGenerators.h @@ -1,41 +1,19 @@ -head 1.1; -access; -symbols; -locks; strict; -comment @ * @; - - -1.1 -date 2002.07.16.22.42.05; author tslettebo; state Exp; -branches; -next ; - - -desc -@@ - - -1.1 -log -@Initial commit -@ -text -@//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // The Loki Library // Copyright (c) 2001 by Andrei Alexandrescu // This code accompanies the book: -// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design +// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design // Patterns Applied". Copyright (c) 2001. Addison-Wesley. -// Permission to use, copy, modify, distribute and sell this software for any -// purpose is hereby granted without fee, provided that the above copyright -// notice appear in all copies and that both that copyright notice and this +// Permission to use, copy, modify, distribute and sell this software for any +// purpose is hereby granted without fee, provided that the above copyright +// notice appear in all copies and that both that copyright notice and this // permission notice appear in supporting documentation. -// The author or Addison-Wesley Longman make no representations about the -// suitability of this software for any purpose. It is provided "as is" +// The author or Addison-Wesley Longman make no representations about the +// suitability of this software for any purpose. It is provided "as is" // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -// Last update: March 05, 2001 +// Last update: August 9, 2002 #ifndef HIERARCHYGENERATORS_INC_ #define HIERARCHYGENERATORS_INC_ @@ -51,13 +29,13 @@ namespace Loki // Generates a scattered hierarchy starting from a typelist and a template // Invocation (TList is a typelist, Model is a template of one arg): // GenScatterHierarchy -// The generated class inherits all classes generated by instantiating the -// template 'Model' with the types contained in TList +// The generated class inherits all classes generated by instantiating the +// template 'Model' with the types contained in TList //////////////////////////////////////////////////////////////////////////////// template class Unit> class GenScatterHierarchy; - + template class Unit> class GenScatterHierarchy, Unit> : public GenScatterHierarchy @@ -72,7 +50,7 @@ namespace Loki typedef Unit Result; }; }; - + template class Unit> class GenScatterHierarchy : public Unit { @@ -82,7 +60,7 @@ namespace Loki typedef Unit Result; }; }; - + template