ModErn Text Analysis
META Enumerates Textual Applications
pimpl.h
Go to the documentation of this file.
1 
11 #ifndef META_UTIL_PIMPL_H_
12 #define META_UTIL_PIMPL_H_
13 
14 #include <memory>
15 #include "util/shim.h"
16 
17 namespace meta
18 {
19 namespace util
20 {
21 
25 template <class Impl>
26 class pimpl
27 {
28  public:
32  pimpl();
33 
37  pimpl(pimpl&&);
38 
42  pimpl& operator=(pimpl&&);
43 
48  template <class... Args>
49  pimpl(Args&&... args);
50 
54  ~pimpl();
55 
60  Impl* operator->();
61 
66  const Impl* operator->() const;
67 
72  Impl& operator*();
73 
78  const Impl& operator*() const;
79 
80  private:
82  std::unique_ptr<Impl> impl_;
83 };
84 }
85 }
86 
87 #endif
pimpl()
Constructor.
Definition: pimpl.tcc:18
Impl * operator->()
Member access operator.
Definition: pimpl.tcc:42
Class to assist in simple pointer-to-implementation classes.
Definition: pimpl.h:26
pimpl & operator=(pimpl &&)
Move assignment.
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition: analyzer.h:24
std::unique_ptr< Impl > impl_
The internal pointer to the Impl class.
Definition: pimpl.h:82
Impl & operator*()
Dereference operator.
Definition: pimpl.tcc:54
~pimpl()
Destructor.