CObject2dFactory.h
Go to the documentation of this file.
1 #ifndef i2d_CObject2dFactory_included
2 #define i2d_CObject2dFactory_included
3 
4 
5 // ACF includes
6 #include <iser/IObject.h>
7 
8 
9 namespace i2d
10 {
11 
12 
17 {
18 public:
19  // reimplemented (istd::TIFactory<iser::IObject>)
20  virtual iser::IObject* CreateInstance(const QByteArray& keyId = "") const;
21 
22  // reimplemented (istd::IFactoryInfo)
23  virtual KeyList GetFactoryKeys() const;
24 
25  // static methods
26  static const CObject2dFactory& GetInstance();
27 
28 private:
29  static KeyList GetInitialFactoryKeys();
30 
31  // static attributes
32  static KeyList s_factoryKeys;
33  static CObject2dFactory s_instance;
34 };
35 
36 
37 } // namespace i2d
38 
39 
40 #endif // !i2d_CObject2dFactory_included
41 
42 
QSet< QByteArray > KeyList
Definition: IFactoryInfo.h:23
virtual iser::IObject * CreateInstance(const QByteArray &keyId="") const
Create an instance of the object, mapped to the keyId keyId.
Common interface for factorisable model objects.
Definition: IObject.h:19
static const CObject2dFactory & GetInstance()
virtual KeyList GetFactoryKeys() const
Returns all posible keys for this factory.
Generic interface for a factory.
Definition: TIFactory.h:17
Simple factory for 2D-objects.

© 2007-2017 Witold Gantzke and Kirill Lepskiy