-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathControl.h
More file actions
33 lines (26 loc) · 1.08 KB
/
Control.h
File metadata and controls
33 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// ===========================================================================
// Control.h - Pimpl Idiom with Copy- & Move-Semantics
// ===========================================================================
namespace PimplVariantWithCopyMoveSemantics {
class ControlPimpl;
class Control {
private:
// single property: opaque pointer / pointer to impl
std::unique_ptr<ControlPimpl> m_pimpl;
public:
// public class interface
Control();
~Control();
Control(Control&& op) noexcept; // move semantics
Control& operator=(Control&&) noexcept; // move semantics
Control(const Control&); // copy semantics
Control& operator=(const Control&); // copy semantics
void setText(const std::string&);
void resize(const int width, const int height);
void show();
void hide();
};
}
// ===========================================================================
// End-of-File
// ===========================================================================