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,NONE,1.7.2.1


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/include pgfactory.h,NONE,1.7.2.1
Date: Wed, 26 Jun 2002 12:25:50 -0400

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

Added Files:
      Tag: devel-opengl
        pgfactory.h 
Log Message:
just a file from main CVS tree not yet used


--- NEW FILE ---
#ifndef PG_FACTORY_H
#define PG_FACTORY_H

#include <string>

class PG_Widget;

class PG_FactoryBaseObject {
public:
        
        PG_FactoryBaseObject();
        
        virtual ~PG_FactoryBaseObject();
};

template<class T> class PG_FactoryObject : public virtual PG_FactoryBaseObject {
public:
        static T* CreateObject(PG_Widget* parent = NULL) {
                return new T(parent);
        }
};

namespace PG_Factory {

        template<class t> void RegisterClass(const std::string& classname);
        
        PG_Widget* CreateObject(const std::string& classname, PG_Widget* parent 
= NULL);
        
} // namespace PG_Factory

#endif // PG_FACTORY_H




reply via email to

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