Ocular Engine
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
RoutineRegistrar.hpp
1
17
#pragma once
18
#ifndef __H__OCULAR_CORE_SCENE_ROUTINE_REGISTRAR__H__
19
#define __H__OCULAR_CORE_SCENE_ROUTINE_REGISTRAR__H__
20
21
#include "OcularEngine.hpp"
22
23
//------------------------------------------------------------------------------------------
24
29
namespace
Ocular
30
{
35
namespace
Core
36
{
37
template
<
class
T>
38
class
RoutineRegistrar
39
{
40
public
:
41
42
RoutineRegistrar
(std::string
const
& name)
43
{
44
if
(!OcularScene->getRoutineFactory().registerComponent<T>(name))
45
{
46
OcularLogger->error(
"Failed to register Routine with name '"
, name,
"' as the name is already in use"
,
47
OCULAR_INTERNAL_LOG(
"RoutineRegistrar"
,
"RoutineRegistrar"
));
48
}
49
}
50
51
~
RoutineRegistrar
()
52
{
53
54
}
55
56
protected
:
57
58
private
:
59
};
60
}
64
}
69
#define OCULAR_REGISTER_ROUTINE(x,y) Ocular::Core::RoutineRegistrar<x> OCULAR_INTERNAL_RoutineRegistrar(y);
70
71
//------------------------------------------------------------------------------------------
72
73
#endif
Ocular::Core::RoutineRegistrar
Definition:
RoutineRegistrar.hpp:38
Ocular
Note: Once this library is made dynamic, this will no longer be needed.
Definition:
Common.hpp:70
OcularCore
include
Scene
RoutineRegistrar.hpp
Generated on Tue Oct 18 2016 01:28:56 for Ocular Engine by
1.8.10