VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtProceduralSoundFactory Class Reference

Per-DtDe singleton factory for procedural sounds.

Mirrors the DtDriverFactory pattern. Plugin developers register a DtProceduralSoundCreator under a key string; at runtime the DtProceduralSoundscapeManager looks up that key (parsed from the "ProceduralSound:<key>" token in DtProceduralSoundscapeChannel::soundFile) and calls createSound() to obtain a configured DtProceduralSound.

Inheritance diagram for makVrv::DtProceduralSoundFactory:
Inheritance graph
[legend]

Public Types

using CreatorMap = std::map< std::string, DtProceduralSoundCreator * >
 

Public Member Functions

virtual ~DtProceduralSoundFactory ()
 
virtual void addSoundCreator (const std::string &key, DtProceduralSoundCreator *creator)
 
virtual DtProceduralSound * createSound (const std::string &key)
 
virtual const CreatorMap & creators () const
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Member Functions

static DtProceduralSoundFactory & instance (DtDe &de)
 

Protected Member Functions

 DtProceduralSoundFactory (DtDe &de)
 
virtual DtUniqueID generateSoundId ()
 

Protected Attributes

DtDe & myDe
 
CreatorMap myCreators
 

Member Typedef Documentation

Constructor & Destructor Documentation

virtual makVrv::DtProceduralSoundFactory::~DtProceduralSoundFactory ( )
virtual
makVrv::DtProceduralSoundFactory::DtProceduralSoundFactory ( DtDe &  de)
explicitprotected

Member Function Documentation

static DtProceduralSoundFactory& makVrv::DtProceduralSoundFactory::instance ( DtDe &  de)
static

Get or create the factory singleton for de.

virtual void makVrv::DtProceduralSoundFactory::addSoundCreator ( const std::string &  key,
DtProceduralSoundCreator *  creator 
)
virtual

Register (or replace) a creator under key. The factory takes ownership of creator and deletes it on destruction.

virtual DtProceduralSound* makVrv::DtProceduralSoundFactory::createSound ( const std::string &  key)
virtual

Construct a new DtProceduralSound for key.

On success returns a heap-allocated sound; the caller owns it. If key is not registered, logs a warning once and returns nullptr.

virtual const CreatorMap& makVrv::DtProceduralSoundFactory::creators ( ) const
virtual

Read-only view of registered creators.

virtual DtUniqueID makVrv::DtProceduralSoundFactory::generateSoundId ( )
protectedvirtual

Generate a unique ID for a locally-created DtProceduralSound.

Uses a monotonically increasing per-factory atomic counter seeded at 0xAD000000. These IDs are never registered with the distributed object system, so collisions with networked entities are not possible.

Returns
A unique DtUniqueID value.

Member Data Documentation

DtDe& makVrv::DtProceduralSoundFactory::myDe
protected
CreatorMap makVrv::DtProceduralSoundFactory::myCreators
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)