Om
copyable.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Copyable_
16 
17  #define Om_Copyable_ \
18  Om::Copyable
19 
20  #ifndef Om_Macro_Precompilation_
21 
22  #include <memory>
23 
24  #endif
25 
26 namespace Om {
27 
28  // MARK: - Om::Copyable
29 
34  class Copyable {
35 
36  template <typename TheCopyable>
37  friend std::auto_ptr<TheCopyable> Copy(TheCopyable const &);
38 
39  public: // MARK: public (non-static)
40 
41  virtual ~Copyable() = 0;
42 
47  virtual std::auto_ptr<Copyable> Copy() const = 0;
48 
49  private: // MARK: private (non-static)
50 
52 
53  };
54 
55  // MARK: - Om::
56 
61  template <typename TheCopyable>
62  std::auto_ptr<TheCopyable> Copy(TheCopyable const &);
63 
64 }
65 
66  #include "om/copyable.cpp"
67 
68 #endif
An object that can be passed to Copy to be copied.
Definition: copyable.hpp:34
friend std::auto_ptr< TheCopyable > Copy(TheCopyable const &)
virtual ~Copyable()=0
virtual std::auto_ptr< Copyable > Copy() const =0
Copyable & operator=(Copyable const &)
Om source file.
The Om library.
Definition: code_point.hpp:26
std::auto_ptr< TheCopyable > Copy(TheCopyable const &)