整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
20
util/SimpleFactory.h
Normal file
20
util/SimpleFactory.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef FF4EF0DA_D455_437D_A5ED_BA7A7994B9CB
|
||||
#define FF4EF0DA_D455_437D_A5ED_BA7A7994B9CB
|
||||
|
||||
namespace Util
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
template <class T, class... TArgs> class SimpleFactory
|
||||
{
|
||||
public:
|
||||
static T* create(TArgs... args)
|
||||
{
|
||||
return new T(args...);
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue