Gateware Libraries  6.3.A
Beta Build
GW::CORE::GInterface Class Referenceabstract

Base interface all Gateware interfaces must support at a minimum. More...

#include <GInterface.h>

Inheritance diagram for GW::CORE::GInterface:
GW::CORE::GMultiThreaded GW::CORE::GSingleThreaded GW::AUDIO::GAudio GW::AUDIO::GMusic GW::AUDIO::GSound GW::CORE::GBroadcasting GW::CORE::GListener GW::SYSTEM::GFile GW::SYSTEM::GLog GW::MATH::GMatrix GW::MATH::GQuaternion GW::MATH::GVector GW::SYSTEM::GInput

Public Member Functions

virtual GReturn GetCount (unsigned int &_outCount)=0
 Return the total number of active references to this object. More...
 
virtual GReturn IncrementCount ()=0
 Increase the total number of active references to this object. More...
 
virtual GReturn DecrementCount ()=0
 Decrease the total number of active references to this object. More...
 
virtual GReturn RequestInterface (const GUUIID &_interfaceID, void **_outputInterface)=0
 Requests an interface that may or may not be supported by this object. More...
 

Detailed Description

Base interface all Gateware interfaces must support at a minimum.

Core features include: Interface Upgrades, Reference Counting, Event Broadcasting.

Member Function Documentation

◆ DecrementCount()

virtual GReturn GW::CORE::GInterface::DecrementCount ( )
pure virtual

Decrease the total number of active references to this object.

Once the internal count reaches zero this object will be deallocated and your pointer will become invalid.

Return values
SUCCESSSuccessfully decremented the internal reference count.
FAILUREDecrementing of internal reference count would underflow the value.

Implemented in GW::AUDIO::GSound, GW::AUDIO::GMusic, and GW::AUDIO::GAudio.

◆ GetCount()

virtual GReturn GW::CORE::GInterface::GetCount ( unsigned int &  _outCount)
pure virtual

Return the total number of active references to this object.

Parameters
[out]_outCountThe total number of active references of this object.
Return values
SUCCESSSuccessfully ran.
FAILUREEither class does not exist or the internal reference count is corrupt.

Implemented in GW::AUDIO::GSound, GW::AUDIO::GMusic, and GW::AUDIO::GAudio.

◆ IncrementCount()

virtual GReturn GW::CORE::GInterface::IncrementCount ( )
pure virtual

Increase the total number of active references to this object.

End users should only call this operation if they are familiar with reference counting behavior.

Return values
SUCCESSSuccessfully incremented the internal reference count.
FAILUREIncrementation of internal reference count would overflow the value.

Implemented in GW::AUDIO::GSound, GW::AUDIO::GMusic, and GW::AUDIO::GAudio.

◆ RequestInterface()

virtual GReturn GW::CORE::GInterface::RequestInterface ( const GUUIID _interfaceID,
void **  _outputInterface 
)
pure virtual

Requests an interface that may or may not be supported by this object.

Can be used by the end-user to query for a new interface using the unique ID of the interface they want and implement an interface update.

Parameters
[in]_interfaceIDThe GUUIID of the interface you are requesting.
[out]_outputInterfaceWhere the interface will be stored if function is successful.
Return values
SUCCESSThe interface is supported and function succeded.
INTERFACE_UNSUPPORTEDThe requested interface is not supported.

Implemented in GW::AUDIO::GSound, GW::AUDIO::GMusic, and GW::AUDIO::GAudio.


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