Go to the documentation of this file.
36 #ifndef _UCOMMON_ACCESS_H_
37 #define _UCOMMON_ACCESS_H_
39 #ifndef _UCOMMON_CPR_H_
43 #ifndef _UCOMMON_PROTOCOLS_H_
60 virtual void _lock(
void) = 0;
62 virtual void _unlock(
void) = 0;
103 inline operator bool()
const {
132 virtual void _unshare(
void) = 0;
177 inline operator bool()
const {
259 inline operator bool()
const {
285 __DELETE_DEFAULTS(autoexclusive);
288 inline autoexclusive(T *lock) :
293 class autoshared :
private SharedProtocol::Locking
296 __DELETE_DEFAULTS(autoshared);
299 inline autoshared(T *lock) :
300 Locking(polystatic_cast<SharedProtocol *>(lock)) {};
308 #define __EXCLUSIVE(x) exclusive_access __autolock__ = x
309 #define __SHARE(x) shared_access __autolock__ = x
void exclusive(void)
Call exclusive access on referenced objects protocol.
An exclusive locking access interface base.
Abstract interfaces and support.
void release(void)
Release a held lock programmatically.
~Locking()
Destroy reference to shared locked object, release lock.
A kind of smart pointer object to support exclusive locking protocol.
bool operator!() const
Test if the reference holds an active lock.
Locking(SharedProtocol *object)
Create an instance of an exclusive object reference.
void share(void)
Restore shared access on referenced objects protocol.
Locking(ExclusiveProtocol *object)
Create an instance of an exclusive object reference.
virtual void share(void)
Share the lock with other referencers.
void exclusive(void)
Call exclusive access on referenced objects protocol.
Various miscellaneous platform specific headers and defines.
Common namespace for all ucommon objects.
virtual void exclusive(void)
Convert object to an exclusive lock.
bool operator!() const
Test if the reference holds an active lock.
~shared_access()
Destroy reference to shared locked object, release lock.
T copy(const T &src)
Convenience function to copy objects.
void release(void)
Release a held lock programmatically.
bool operator!() const
Test if the reference holds an active lock.
void release(void)
Release a held lock programmatically.
A kind of smart pointer object to support shared locking protocol.
virtual void _share(void)=0
Access interface to share lock the object.
An exclusive locking protocol interface base.
shared_access(SharedProtocol *object)
Create an instance of an exclusive object reference.
~Locking()
Destroy reference to exclusively locked object, release lock.
void share(void)
Restore shared access on referenced objects protocol.
A kind of smart pointer object to support shared locking protocol.