android.speech.recognition.utilities.RefCounter Class Reference

Inheritance diagram for android.speech.recognition.utilities.RefCounter:

Inheritance graph
[legend]

List of all members.


Detailed Description

A class that monitors the references to a particular object. This class is not thread safe.

Public Member Functions

 RefCounter (void *object, bool loggingAllowed, ReturnCode::Type &returnCode)
virtual ARRAY_LIMIT increment (ReturnCode::Type &returnCode)
virtual ARRAY_LIMIT decrement (ReturnCode::Type &returnCode)
ARRAY_LIMIT getCount () const
void * getObject () const
bool isLoggingAllowed () const

Protected Attributes

ARRAY_LIMIT count
void * object
bool loggingAllowed

Constructor & Destructor Documentation

android.speech.recognition.utilities.RefCounter.RefCounter ( void *  object,
bool  loggingAllowed,
ReturnCode::Type returnCode 
)

Creates a new RefCounter with an initial value of one.

Parameters:
object the underlying object to wrap
loggingAllowed true if the object and its dependencies are allowed to log
returnCode SUCCESS unless a fatal error has occured


Member Function Documentation

virtual ARRAY_LIMIT android.speech.recognition.utilities.RefCounter.increment ( ReturnCode::Type returnCode  )  [virtual]

This function increases the reference count by one.

Parameters:
returnCode SUCCESS unless a fatal error has occured
Returns:
the resulting reference count

virtual ARRAY_LIMIT android.speech.recognition.utilities.RefCounter.decrement ( ReturnCode::Type returnCode  )  [virtual]

This function decreases the reference count by 1.

Parameters:
returnCode SUCCESS unless a fatal error has occured
Returns:
the resulting reference count

ARRAY_LIMIT android.speech.recognition.utilities.RefCounter.getCount (  )  const

Returns the number of references to the object.

Returns:
the number of references to the object

void* android.speech.recognition.utilities.RefCounter.getObject (  )  const

Returns the object whose references are being monitored.

bool android.speech.recognition.utilities.RefCounter.isLoggingAllowed (  )  const

Returns true if the object and its dependencies are allowed to log.

Returns:
true if the object and its dependencies are allowed to log


Member Data Documentation

ARRAY_LIMIT android.speech.recognition.utilities.RefCounter.count [protected]

The number of references to the underlying object.

void* android.speech.recognition.utilities.RefCounter.object [protected]

The underlying object.


Generated on Thu May 1 17:16:53 2008 for UAPI by  doxygen 1.5.3