PixelLightAPI  .
Public Types | Public Member Functions | Protected Member Functions
PLSound::Resource Class Reference

Sound resource. More...

#include <Resource.h>

Inheritance diagram for PLSound::Resource:
Inheritance graph
[legend]

List of all members.

Public Types

enum  EType { TypeBuffer = 0, TypeSource = 1 }
 Resource type. More...

Public Member Functions

virtual PLSOUND_API ~Resource ()
 Destructor.
PLSOUND_API SoundManagerGetSoundManager () const
 Returns the owner sound manager.
PLSOUND_API EType GetType () const
 Returns the resource type.
PLSOUND_API PLCore::uint32 GetNumOfResourceHandlers () const
 Returns the number of resource handlers.
PLSOUND_API bool IsResourceHandler (ResourceHandler &cHandler) const
 Returns whether a resource handler is using this resource.
PLSOUND_API bool AddResourceHandler (ResourceHandler &cHandler)
 Adds a resource handler.
PLSOUND_API bool RemoveResourceHandler (ResourceHandler &cHandler)
 Removes a resource handler.
PLSOUND_API void ClearResourceHandlers ()
 Clears the list of handlers.

Protected Member Functions

PLSOUND_API Resource (SoundManager &cSoundManager, EType nType)
 Constructor.

Detailed Description

Sound resource.


Member Enumeration Documentation

Resource type.

Enumerator:
TypeBuffer 

Sound buffer

TypeSource 

Sound source


Constructor & Destructor Documentation

virtual PLSOUND_API PLSound::Resource::~Resource ( ) [virtual]

Destructor.

PLSOUND_API PLSound::Resource::Resource ( SoundManager cSoundManager,
EType  nType 
) [protected]

Constructor.

Parameters:
[in]cSoundManagerOwner sound manager
[in]nTypeResource type

Member Function Documentation

Returns the owner sound manager.

Returns:
The owner sound manager
PLSOUND_API EType PLSound::Resource::GetType ( ) const

Returns the resource type.

Returns:
Resource type
PLSOUND_API PLCore::uint32 PLSound::Resource::GetNumOfResourceHandlers ( ) const

Returns the number of resource handlers.

Returns:
The number of resource handlers
PLSOUND_API bool PLSound::Resource::IsResourceHandler ( ResourceHandler cHandler) const

Returns whether a resource handler is using this resource.

Parameters:
[in]cHandlerResource handler to check
Returns:
'true' if the given resource handler is using this resource, else 'false'
Note:
  • The handlers will be informed if the resource was lost
  • The handlers itself are not deleted etc. they are only 'added' to a list
PLSOUND_API bool PLSound::Resource::AddResourceHandler ( ResourceHandler cHandler)

Adds a resource handler.

Parameters:
[in]cHandlerResource handler which should be added
Returns:
'true' if all went fine, else 'false'
See also:
  • IsHandler()

Removes a resource handler.

Parameters:
[in]cHandlerResource handler to remove
Returns:
'true' if all went fine, else 'false'
See also:
  • IsHandler()

Clears the list of handlers.

See also:
  • IsHandler()

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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:42
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported