Om
giveable.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Giveable_
16 
17  #define Om_Giveable_ \
18  Om::Giveable
19 
20  #include "om/copyable.hpp"
21  #include "om/moveable.hpp"
22 
23 namespace Om {
24 
25  // MARK: - Om::Giveable
26 
31  class Giveable:
32  public Copyable,
33  public Moveable {
34 
35  public: // MARK: public (non-static)
36 
37  virtual ~Giveable() = 0;
38 
39  private: // MARK: private (non-static)
40 
42 
43  };
44 
45  // MARK: - Om::
46 
53  template <typename TheGiveable>
54  std::auto_ptr<TheGiveable> Give(TheGiveable &);
55 
62  template <typename TheGiveable>
63  std::auto_ptr<TheGiveable> Give(TheGiveable const &);
64 
71  template <typename TheGiveable>
72  std::auto_ptr<TheGiveable> Give(
73  std::auto_ptr<TheGiveable> &
74  );
75 
84  template <typename TheGiveable>
85  std::auto_ptr<TheGiveable> Give(
86  std::auto_ptr<TheGiveable> const &
87  );
88 
89 }
90 
91  #include "om/giveable.cpp"
92 
93 #endif
An object that can be passed to Copy to be copied.
Definition: copyable.hpp:34
An object that can be copied or moved via Give.
Definition: giveable.hpp:33
virtual ~Giveable()=0
Giveable & operator=(Giveable const &)
An object that can be passed to Move to be moved.
Definition: moveable.hpp:34
Om header file.
Om source file.
Om header file.
The Om library.
Definition: code_point.hpp:26
std::auto_ptr< TheGiveable > Give(TheGiveable &)
Calls Move on the object.