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 SB::Engine
6{
7 class NodeBase;
8 class Node;
9} // namespace SB::Engine
10
11namespace SB::Util
12{
13 class SB_CLASS TypeHelper 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 std::string_view getDisplayNameFromType(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 SB::Core::Object* getObjectFromInstance(const rttr::instance& instance);
35
36 static SB::Core::DatabaseObject* getDatabaseObjectFromInstance(const rttr::instance& instance);
37
38 static SB::Engine::Node* getNodeFromInstance(const rttr::instance& instance);
39
40 static SB::Engine::NodeBase* getNodeBaseFromInstance(const rttr::instance& instance);
41 };
42} // namespace SB::Util
Base object type for any object that can exist in the editor/database. Holds an ID and name.
Definition database_object.h:22
Simple base Object that all Sound Bakery objects should inherit from.
Definition object.h:33
Definition node.h:20
Root node that builds the core graph of sounds and busses.
Definition node.h:57
Definition type_helper.h:14