Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

VirtualBoxBaseProto::AutoCallerBase< aLimited > Class Template Reference

#include <VirtualBoxBase.h>

List of all members.

Detailed Description

template<bool aLimited>
class VirtualBoxBaseProto::AutoCallerBase< aLimited >

Smart class that automatically increases the number of callers of the given VirtualBoxBase object when an instance is constructed and decreases it back when the created instance goes out of scope (i.e. gets destroyed).

If rc() returns a failure after the instance creation, it means that the managed VirtualBoxBase object is not Ready, or in any other invalid state, so that the caller must not use the object and can return this failed result code to the upper level.

See VirtualBoxBase::addCaller(), VirtualBoxBase::addLimitedCaller() and VirtualBoxBase::releaseCaller() for more details about object callers.

aLimited |false| if this template should use VirtualiBoxBase::addCaller() calls to add callers, or |true| if VirtualiBoxBase::addLimitedCaller() should be used.
It is preferable to use the AutoCaller and AutoLimitedCaller classes than specify the aLimited argument, for better self-descriptiveness.

Definition at line 683 of file VirtualBoxBase.h.

Public Member Functions

void add ()
void attach (VirtualBoxBaseProto *aObj)
 AutoCallerBase (VirtualBoxBaseProto *aObj)
void detach ()
bool isOk () const
HRESULT rc () const
void release ()
State state () const
 ~AutoCallerBase ()

Private Attributes

State mState

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index