Cogs.Core
GuiManager.h
1#pragma once
2
3#include "Resources/ResourceManager.h"
4
5#include "GuiDocument.h"
6
7namespace Cogs
8{
9 namespace Core
10 {
12 {
13
14 };
15
16 class GuiManager : public ResourceManager<GuiDocument, GuiLoadInfo>, public IValueTypeManager
17 {
18 public:
19 GuiManager(Context * context) : ResourceManager(context) {
20 this->resourceType = ResourceTypes::Gui;
21 }
22 ~GuiManager() override;
23
24 void initialize() override;
25
26 GuiDocumentHandle load(const StringView & source, ResourceId resourceId);
27
28 void handleLoad(GuiLoadInfo * loadInfo) override;
29
30 bool doesManage(DefaultValueType valueType) override;
31
32 void readSource(Context* ctx, ResourceDefinition& definition, const void * jsonResource) override;
33
34 void applyFieldValue(void* object, const Reflection::Field* field, const FieldValue& fieldValue) override;
35 };
36 }
37}
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
void handleLoad(GuiLoadInfo *loadInfo) override
Handler for resource loading.
Definition: GuiManager.cpp:26
The generic resource manager provides a base implementation for specialized resource managers to buil...
Field definition describing a single data member of a data structure.
Definition: Field.h:68
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
DefaultValueType
Defines value types for default values.
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
Defines a value to apply to a field.