DiaDes  0.1
DIAgnosis of Discrete-Event System
Pointer.hh
Go to the documentation of this file.
1 
9 #ifndef __DIADES__UTILS__POINTER__HH__
10 #define __DIADES__UTILS__POINTER__HH__
11 
12 namespace Diades
13 {
14  namespace Utils
15  {
21  template<typename T>
22  struct Ptr
23  {
27  using P = T *;
31  using ConstP = const T *;
32 
36  static ConstP
37  get(const T & obj)
38  {
39  return &obj;
40  }
41 
45  static P
46  get(T & obj)
47  {
48  return &obj;
49  }
50  };
51  }
52 }
53 
54 
55 #endif /* __DIADES__UTILS__POINTER__HH__ */
56 
const std::vector< typename Diades::Utils::Ptr< StateMachine >::ConstP > * ConstP
Definition: Pointer.hh:31
Namespace of the Diades project.
std::vector< typename Diades::Utils::Ptr< StateMachine >::ConstP > * P
Definition: Pointer.hh:27