NOMAD Source  Version 4.0.0 Beta
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AttributeFactory.hpp
Go to the documentation of this file.
1 //
2 // AttributeFactory.hpp
3 // nomad
4 //
5 // Created by Christophe Tribes on 2017-12-08.
6 // Copyright (c) 2017 GERAD. All rights reserved.
7 //
8 
9 #ifndef __NOMAD400_ATTRIBUTEFACTORY__
10 #define __NOMAD400_ATTRIBUTEFACTORY__
11 
12 #include "../Param/TypeAttribute.hpp"
13 
14 #include "../nomad_nsbegin.hpp"
15 
17 
18 public:
19 
20  template <typename T, typename ... ARGS> std::shared_ptr<Attribute> Create(std::string Name, T initValue, bool algoCompatibilityCheck, bool restartAttribute, bool uniqueEntry, ARGS && ... infoArgs )
21  {
22  return std::make_shared<TypeAttribute<T>>(Name, initValue, algoCompatibilityCheck,
23  restartAttribute, uniqueEntry, std::forward<ARGS>(infoArgs)...);
24 
25  }
26 
27 };
28 
29 #include "../nomad_nsend.hpp"
30 #endif // __NOMAD400_ATTRIBUTEFACTORY__
std::shared_ptr< Attribute > Create(std::string Name, T initValue, bool algoCompatibilityCheck, bool restartAttribute, bool uniqueEntry, ARGS &&...infoArgs)