Ignore:
Timestamp:
Mar 11, 2010, 10:37:32 AM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
ff1812
Parents:
4c60ef
Message:

Made the UIFactory an instance of the Singleton Pattern

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/UIElements/UIFactory.hpp

    r4c60ef r4fc41a  
    1717
    1818struct menuPopulaters;
     19
     20#include "Patterns/Singleton.hpp"
     21
    1922/**
    2023 * Abstract Factory to create any kind of User interface object needed by the programm.
     
    2427 * UIs can be handled in a concise abstract way.
    2528 */
    26 class UIFactory
     29class UIFactory : public Singleton<UIFactory,false>
    2730{
    2831
     
    4548  UIFactory();
    4649
    47 // singleton stuff
    48 private:
    49   static UIFactory *theFactory;
    50 
    5150public:
    5251  /**
     
    5554  static void makeUserInterface(InterfaceTypes type);
    5655
    57   /**
    58    * get the previously created factory
    59    */
    60   static UIFactory* get();
    61 
    62   /**
    63    * Destroy the created factory.
    64    *
    65    * Make sure that all UIElements that were created by the factory are destroyed before calling this method.
    66    */
    67   static void purgeInstance();
    6856};
    6957
Note: See TracChangeset for help on using the changeset viewer.