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.
| virtual makVrv::DtProceduralSoundFactory::~DtProceduralSoundFactory |
( |
| ) |
|
|
virtual |
| makVrv::DtProceduralSoundFactory::DtProceduralSoundFactory |
( |
DtDe & |
de | ) |
|
|
explicitprotected |
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.
| DtDe& makVrv::DtProceduralSoundFactory::myDe |
|
protected |
| CreatorMap makVrv::DtProceduralSoundFactory::myCreators |
|
protected |
The documentation for this class was generated from the following file: