IdLocker Class ReferenceHelper class to lock id of object when using assigment operator.
More...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Types | |
| enum | mode { , LOCKED, LOCKED_PRESERVE_STATE } |
| Lock mode. More... | |
Public Member Functions | |
| IdLocker (mode pMode=LOCKED) | |
| Constructor. | |
| ~IdLocker () | |
| Destructor. | |
Static Public Member Functions | |
| static bool | isLocked () |
| Check if locker is not in UNLOCKED state. | |
| static bool | isUnlocked () |
| Check if locker is in UNLOCKED state. | |
Detailed Description
Helper class to lock id of object when using assigment operator.Id of all objects are locked until at least one locker exists, so this object should be created only on stack.
Example of use:
Storable a; //new object Storeable b = loadFromDatabase(); //object with id IdLocker locker; b = a; // b still has its id
Member Enumeration Documentation
| enum mode |
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
pMode modify behaviour of Storeable copy constructor and assigment operator
Member Function Documentation
| static bool isLocked | ( | ) | [static] |
Check if locker is not in UNLOCKED state.
- Returns:
- true if locker is not in UNLOCKED state, false otherwise
| static bool isUnlocked | ( | ) | [static] |
Check if locker is in UNLOCKED state.
- Returns:
- true if locker is in UNLOCKED state, false otherwise
The documentation for this class was generated from the following file:
| Documentation |
|---|
| Quick start |
| Examples |
| API Documentation |
|---|
| Class hierarchy |
| Member index |
| API Reference |
| Store filters |
| Store table macros |
Generated by doxygen at Fri Oct 22 23:15:44 2010
