[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/factory pgfactory.cpp,1.3,1.4
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/factory pgfactory.cpp,1.3,1.4 |
Date: |
Wed, 26 Jun 2002 08:21:05 -0400 |
Update of /cvsroot/paragui/paragui/src/factory
In directory subversions:/tmp/cvs-serv17281/src/factory
Modified Files:
pgfactory.cpp
Log Message:
changed PG_Factory to singleton class
Index: pgfactory.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/factory/pgfactory.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** pgfactory.cpp 26 Jun 2002 12:10:20 -0000 1.3
--- pgfactory.cpp 26 Jun 2002 12:21:02 -0000 1.4
***************
*** 1,7 ****
- #include <map>
#include "pgfactory.h"
- static std::map<std::string, PG_Factory::CREATEFN> creator_map;
-
void PG_Factory::RegisterCreateFn(const std::string& classname, CREATEFN fn) {
creator_map[classname] = fn;
--- 1,4 ----
***************
*** 9,13 ****
PG_Widget* PG_Factory::CreateObject(const std::string& classname, PG_Widget*
parent) {
! CREATEFN create = creator_map[classname];
if(create == NULL) {
--- 6,10 ----
PG_Widget* PG_Factory::CreateObject(const std::string& classname, PG_Widget*
parent) {
! CREATEFN create = GetInstance().creator_map[classname];
if(create == NULL) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/factory pgfactory.cpp,1.3,1.4,
Alexander Pipelka <address@hidden> <=