Workspace 6.21.5
Public Member Functions | List of all members
MeshModelSource::MeshModelInterfaceLockedPtr Class Reference

Reference to a MeshModelInterface that, when created, locks access to the MeshModelInterface via any of the lock-aware functions via a mutex internal to the MeshModelSource. When this Ref object goes out of scope, access is restored again.

#include <Mesh/DataStructures/meshmodelsource.h>

Public Member Functions

 MeshModelInterfaceLockedPtr ()
 
 MeshModelInterfaceLockedPtr (const MeshModelInterfaceLockedPtr &)=delete
 
 MeshModelInterfaceLockedPtr (MeshModelInterfaceLockedPtr &&other)
 
 MeshModelInterfaceLockedPtr (MeshModelSourceImpl &impl)
 
 ~MeshModelInterfaceLockedPtr ()
 
MeshModelInterfaceget ()
 
const MeshModelInterfaceget () const
 
const QString & getModelId () const
 
MeshModelInterfaceoperator* ()
 
const MeshModelInterfaceoperator* () const
 
MeshModelInterfaceoperator-> ()
 
const MeshModelInterfaceoperator-> () const
 
MeshModelInterfaceLockedPtroperator= (const MeshModelInterfaceLockedPtr &)=delete
 
MeshModelInterfaceLockedPtroperator= (MeshModelInterfaceLockedPtr &&)
 
bool ownsLock () const
 

Constructor & Destructor Documentation

◆ MeshModelInterfaceLockedPtr() [1/4]

Constructs a default (invalid) MeshModelInterfaceLockedPtr object.

◆ MeshModelInterfaceLockedPtr() [2/4]

MeshModelInterfaceLockedPtr ( MeshModelSourceImpl &  impl)

Constructs a MeshModelInterfaceLockedPtr object referring to the specified MeshModelSource implementation. as soon as it is constructed, it will attempt to take ownership of the mutex associated with this model, which will prevent updates occurring to the MeshModelInterface associated with the MeshModelSource.

Parameters
implThe MeshModelSource object containing the MeshModelInterface we are seeking to lock.

◆ MeshModelInterfaceLockedPtr() [3/4]

◆ MeshModelInterfaceLockedPtr() [4/4]

◆ ~MeshModelInterfaceLockedPtr()

Member Function Documentation

◆ get() [1/2]

MeshModelInterface * get ( )
Returns
A pointer to the MeshModelInterface object that this Ref object has a lock on. If the ref object does not hold the lock on the MeshModelInterface, a nullptr will be returned.

◆ get() [2/2]

const MeshModelInterface * get ( ) const
Returns
A pointer to the MeshModelInterface object that this Ref object has a lock on. If the ref object does not hold the lock on the MeshModelInterface, a nullptr will be returned.

◆ getModelId()

const QString & getModelId ( ) const

◆ operator*() [1/2]

MeshModelInterface & operator* ( )
Note
Unsafe if the lock is not held by this object.

◆ operator*() [2/2]

const MeshModelInterface & operator* ( ) const
Note
Unsafe if the lock is not held by this object.

◆ operator->() [1/2]

MeshModelInterface * operator-> ( )
Note
Unsafe if the lock is not held by this object.

◆ operator->() [2/2]

const MeshModelInterface * operator-> ( ) const
Note
Unsafe if the lock is not held by this object.

◆ operator=() [1/2]

MeshModelInterfaceLockedPtr & operator= ( const MeshModelInterfaceLockedPtr )
delete

◆ operator=() [2/2]

Move-assignment operator for this MeshModelInterfaceLockedPtr object. Note that copy-assignment is disabled.

◆ ownsLock()

bool ownsLock ( ) const
Returns
true if this object owns the lock on the MeshModelInterface object that it references. False otherwise.