paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/include pgfactory.h,1.6,1.7


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/include pgfactory.h,1.6,1.7
Date: Wed, 26 Jun 2002 09:21:44 -0400

Update of /cvsroot/paragui/paragui/include
In directory subversions:/tmp/cvs-serv28872/include

Modified Files:
        pgfactory.h 
Log Message:
factory, factory, factory,...
again



Index: pgfactory.h
===================================================================
RCS file: /cvsroot/paragui/paragui/include/pgfactory.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** pgfactory.h 26 Jun 2002 12:36:42 -0000      1.6
--- pgfactory.h 26 Jun 2002 13:21:42 -0000      1.7
***************
*** 22,30 ****
        typedef PG_Widget* (*CREATEFN)(PG_Widget* parent);
        
!       template<class T> static void RegisterClass(H classname) {
                GetInstance().RegisterCreateFn(classname, 
(CREATEFN)&PG_FactoryObject<T>::CreateObject);
        }
                
!       static PG_Widget* CreateObject(H classname, PG_Widget* parent = NULL) {
                CREATEFN create = GetInstance().creator_map[classname];
                
--- 22,30 ----
        typedef PG_Widget* (*CREATEFN)(PG_Widget* parent);
        
!       template<class T> static void RegisterClass(const H& classname) {
                GetInstance().RegisterCreateFn(classname, 
(CREATEFN)&PG_FactoryObject<T>::CreateObject);
        }
                
!       static PG_Widget* CreateObject(const H& classname, PG_Widget* parent = 
NULL) {
                CREATEFN create = GetInstance().creator_map[classname];
                
***************
*** 38,42 ****
  protected:
        
!       void RegisterCreateFn(H classname, CREATEFN fn) {
                creator_map[classname] = fn;
        }
--- 38,42 ----
  protected:
        
!       inline void RegisterCreateFn(const H& classname, CREATEFN fn) {
                creator_map[classname] = fn;
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]