Here's an interesting utility class, a scoped value. This allows you to have a member variable that gets changed for a time, and then automatically restored back to the original value.
Looked at another way, a Scoped is a member variable where changes are not permanent. Instead, changes are kept during a particular scope of execution, then reverted.
When is this useful?
One sample use is for the mouse cursor - with a suitably configured Scoped you can simply change the cursor to an hour glass during a process and then have it automatically restored again afterwards.
Recent comments
2 weeks 1 day ago
2 weeks 2 days ago
3 weeks 5 days ago
3 weeks 6 days ago
8 weeks 3 days ago
9 weeks 2 days ago
9 weeks 2 days ago
9 weeks 2 days ago
11 weeks 6 days ago
12 weeks 2 days ago