C++QEDCore  2.100.2 (v2 Milestone 10 Development branch)
a framework for simulating open quantum dynamics – core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Act.h
Go to the documentation of this file.
1 // Copyright András Vukics 2006–2014. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt)
3 #ifndef CPPQEDCORE_COMPOSITES_ACT_H_INCLUDED
4 #define CPPQEDCORE_COMPOSITES_ACT_H_INCLUDED
5 
6 #include "SubSystem.h"
7 
8 #include "SmartPtr.h"
9 #include "TMP_Tools.h"
10 
11 #include <boost/mpl/size.hpp>
12 
13 
15 namespace composite {
16 
17 
18 #define BASE_class SubSystemsInteraction<mpl::size<tmptools::Vector<V...> >::value>
19 
21 
30 template<int... V>
31 class _
32  : public tmptools::Vector<V...>,
33  public BASE_class
34 {
35 public:
36  typedef tmptools::Vector<V...> Vector;
37 
38  template<typename IA>
39  explicit _(const IA& ia) : BASE_class(cpputils::sharedPointerize(ia)) {}
40 
41 };
42 
43 #undef BASE_class
44 
45 
46 }
47 
48 
50 template<int... V>
51 using Act = composite::_<V...>;
52 
53 
54 #endif // CPPQEDCORE_COMPOSITES_ACT_H_INCLUDED
Auxiliary tools to Composite.
Definition: Act.h:15
const boost::shared_ptr< T > sharedPointerize(boost::shared_ptr< T > t)
Part of a bundle of functions providing a unified interface to wrap objects into the shared-pointer i...
Definition: SmartPtr.h:52
Helper class to Composite.
Definition: Act.h:31
Tools for creating non-owning shared pointers.
Template metaprogramming tools, extending (and based on) Boost.MPL.
Defines composite::SubSystemFree and composite::SubSystemsInteraction.
A non-negative compile-time vector.
Definition: TMP_Tools.h:200