Faro Engine 0.0.0.b519570 (main)
Loading...
Searching...
No Matches
GraphicsAdapterChild.hpp
Go to the documentation of this file.
1#pragma once
2#include <Memory/Object.hpp>
3
4namespace Faro
5{
6 class GraphicsAdapter;
7
9 {
10 public:
11 /**
12 * @brief Initialize this as a child object for an adapter. Also invokes IObject::Init, derived classes should use that for initialization.
13 * @param adapter Graphics adapter to initialize this child on.
14 */
15 void Init(GraphicsAdapter* adapter);
16
18
19 template<class T>
21 {
22 return (T*)GetAdapter();
23 }
24
25 protected:
26 void Init() override;
27
28 private:
29 GraphicsAdapter* adapter = nullptr;
30 };
31}
Definition GraphicsAdapter.hpp:27
Definition GraphicsAdapterChild.hpp:9
GraphicsAdapter * GetAdapter()
Definition GraphicsAdapterChild.cpp:11
void Init() override
Run the initialization logic of this object. Should be overriden by deriving classes.
Definition GraphicsAdapterChild.cpp:16
T * GetTypedAdapter()
Definition GraphicsAdapterChild.hpp:20
Base class for dynamically allocated objects.
Definition Object.hpp:7
Definition Array.hpp:8