Future.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <zeus/FutureBase.hpp>
9 
10 namespace zeus {
14  template<class ZEUS_RETURN>
15  class Future : public zeus::FutureBase {
16  public:
21  Future(const zeus::FutureBase& _base):
22  zeus::FutureBase(_base) {
23 
24  }
31  m_data = _base.m_data;
32  return *this;
33  }
38  ZEUS_RETURN get();
39  };
43  template<>
44  class Future<void> : public zeus::FutureBase {
45  public:
50  Future(const zeus::FutureBase& _base):
51  zeus::FutureBase(_base) {
52 
53  }
60  m_data = _base.m_data;
61  return *this;
62  }
63  };
64 }
Generic zeus Future interface to get data asynchronously.
Definition: FutureBase.hpp:14
future template to cast type in a specific type
Definition: Future.hpp:15
Future(const zeus::FutureBase &_base)
contructor of the Future with the basic FutureBase
Definition: Future.hpp:50
future template to cast type in a void methode (fallback)
Definition: Future.hpp:44
Main zeus library namespace.
Definition: AbstractFunction.hpp:15
zeus::Future< ZEUS_RETURN > & operator=(const zeus::FutureBase &_base)
Asignement operator with an other future.
Definition: Future.hpp:30
Future(const zeus::FutureBase &_base)
contructor of the Future with the basic FutureBase
Definition: Future.hpp:21