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 
16 #include "meta/config.h"
17 #include "meta/util/shim.h"
18 
19 namespace meta
20 {
21 namespace util
22 {
23 
27 template <class Impl>
28 class pimpl
29 {
30  public:
34  pimpl();
35 
39  pimpl(pimpl&&);
40 
44  pimpl& operator=(pimpl&&);
45 
50  template <class... Args>
51  pimpl(Args&&... args);
52 
56  ~pimpl();
57 
62  Impl* operator->();
63 
68  const Impl* operator->() const;
69 
74  Impl& operator*();
75 
80  const Impl& operator*() const;
81 
82  private:
84  std::unique_ptr<Impl> impl_;
85 };
86 }
87 }
88 
89 #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:28
pimpl & operator=(pimpl &&)
Move assignment.
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retrieval, data mining, and other applications of text processing.
Definition: analyzer.h:25
std::unique_ptr< Impl > impl_
The internal pointer to the Impl class.
Definition: pimpl.h:84
Impl & operator*()
Dereference operator.
Definition: pimpl.tcc:54
~pimpl()
Destructor.