Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
switch_container.h
1#pragma once
2
3#include "sound_bakery/node/container/container.h"
4
5namespace sbk::engine
6{
7 class SB_CLASS switch_container : public container
8 {
9 public:
10 void gather_children_for_play(gather_children_context& context) const override;
11
12 void gatherParametersFromThis(global_parameter_list& parameters) override;
13
15
16 sbk::core::database_ptr<named_parameter> getSwitchParameter() const { return m_switchParameter; }
17
18 std::unordered_map<sbk::core::database_ptr<named_parameter_value>, sbk::core::child_ptr<container>>
19 getSwitchToChildMap() const
20 {
21 return m_switchToChild;
22 }
23
24 private:
25 void setSwitchToChild(
27
28 void populateChildKeys();
29
33 global_int_parameter m_switchParameter;
34
38 std::unordered_map<sbk::core::database_ptr<named_parameter_value>, sbk::core::child_ptr<container>>
39 m_switchToChild;
40
41 REGISTER_REFLECTION(switch_container, container)
42 RTTR_REGISTRATION_FRIEND
43 };
44} // namespace sbk::engine
Definition database_ptr.h:23
Base container type. Inherited types include sounds, random, sequence etc.
Definition container.h:49
Defines a database object with a changeable property.
Definition parameter.h:18
Definition switch_container.h:8
Contains all information required for gathering sounds for runtime playing and selection.
Definition container.h:13
Holds a list of parameters.
Definition parameter.h:227