Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
type_helper.h
1#pragma once
2
3#include "sound_bakery/pch.h"
4
5namespace sbk::engine
6{
7 class node_base;
8 class node;
9} // namespace sbk::engine
10
11namespace sbk::util
12{
13 class SB_CLASS type_helper final
14 {
15 public:
16 static SB_OBJECT_CATEGORY getCategoryFromType(rttr::type type);
17
18 static std::unordered_set<rttr::type> getTypesFromCategory(SB_OBJECT_CATEGORY category);
19
20 static rttr::string_view get_display_name_from_type(rttr::type type);
21
22 static std::string getFolderNameForObjectType(rttr::type type);
23
24 static std::string_view getFileExtensionOfObjectCategory(SB_OBJECT_CATEGORY category);
25
26 static std::string_view getPayloadFromType(rttr::type type);
27
28 static bool isTypePlayable(const rttr::type& type);
29
30 static rttr::enumeration getObjectCategoryEnum();
31
32 static rttr::string_view getObjectCategoryName(const SB_OBJECT_CATEGORY& objectCategory);
33
34 static sbk::core::object* getObjectFromInstance(const rttr::instance& instance);
35
36 static sbk::core::database_object* getDatabaseObjectFromInstance(const rttr::instance& instance);
37
38 static sbk::engine::node* getNodeFromInstance(const rttr::instance& instance);
39
40 static sbk::engine::node_base* getNodeBaseFromInstance(const rttr::instance& instance);
41 };
42} // namespace sbk::util
Base object type for any object that can exist in the editor/database. Holds an ID and name.
Definition database_object.h:12
Base object that all sound Bakery objects should inherit from.
Definition object.h:21
Generic node that can have a get_parent and own children.
Definition node.h:23
Root node that builds the core graph of sounds and busses.
Definition node.h:64
Definition type_helper.h:14