www.pudn.com > Loki.rar > Test_Factory.cpp


#include  
#include  
#include "Factory.h" 
#include "AbstractFactory.h" 
 
template 
void print_type() 
{ 
    printf("%s\n", typeid(T).name()); 
} 
 
using namespace ::Loki; 
 
struct A1 {}; struct A2 {}; struct A3 {}; struct A4 {}; 
struct A5 {}; struct A6 {}; struct A7 {}; struct A8 {}; 
 
typedef TL::MakeTypeList::Result typelist1_t; 
 
struct Abst : AbstractFactory {}; 
 
int main() 
{ 
    Factory     a; 
    CloneFactory     b; 
 
    typedef AbstractFactory abst_t; 
     
    struct AA1 : ConcreteFactory {}; 
    AA1 a1; 
 
    struct AA2 : ConcreteFactory {}; 
 
    AA2 a2; 
}