VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
factoryTemplate.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include <vrfutil/vrfutilDefines.h>
14 #include <map>
15 
16 #include <vlutil/vlString.h>
17 
28 template <typename T_CreationObject, typename T_Key>
30 {
31 public:
34 
35 private:
40  orig);
41 
42 public:
43  typedef T_CreationObject* (*DtCreatorFcn)();
44 
48  };
49 
50  typedef std::map<T_Key, DtFactoryTemplateEntry> DtCreatorMapType;
51 
53  virtual ~DtFactoryTemplate();
54 
56  virtual void addCreatorFcn(const T_Key& key, DtCreatorFcn fcn);
57 
60  virtual bool removeCreatorFcn(const T_Key& key);
61 
65 
66  virtual T_CreationObject* createNew(const T_Key& key) const;
68 
69  virtual bool isKeyRegistered(const T_Key& key) const;
70 
72 
76  virtual DtString creationObjectName() const;
77 
78  virtual const DtCreatorMapType& creatorMap() const;
79 
80 protected:
81 
83 };
84 
85 #define factoryTemplate_inl_
86 #include "vrfutil/factoryTemplate.inl"
87 #undef factoryTemplate_inl_

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)