|
Aegis
4.25.D505
|
#include <user.h>
Public Member Functions | |
| become (user_ty::pointer a_up) | |
| ~become () | |
Private Member Functions | |
| become (const become &) | |
| become & | operator= (const become &) |
Private Attributes | |
| user_ty::pointer | up |
The user_ty::become class is used to take care of becoming a user, and then ceasing to become that user at the end of the scope. For example:
{ user_ty::become scoped(up); ...glue... if (something) return; ...execute... }
No matter how the flow of execution leaves the scope (break, continue, return, exceptions) the become_end will always occur, because the destructor is automatically called by the compiler.
This is an example of the Resoure Acquisition Is Initialisation (RAII) design pattern.
| user_ty::become::become | ( | user_ty::pointer | a_up | ) | [inline] |
| user_ty::become::~become | ( | ) | [inline] |
| user_ty::become::become | ( | const become & | ) | [private] |
The copy constructor. Do not use.
The assignment operator. Do not use.
user_ty::pointer user_ty::become::up [private] |
1.7.6.1