File Index Symbol Index

#include "GuiGraphicsResourceManager.h"
namespace
vl
{
namespace
presentation
{
namespace
elements
{
using
namespace
collections
;
/*********************************************************************** GuiGraphicsResourceManager ***********************************************************************/
GuiGraphicsResourceManager
::
GuiGraphicsResourceManager
() { }
GuiGraphicsResourceManager
::
~
GuiGraphicsResourceManager
() { }
vint
GuiGraphicsResourceManager
::
RegisterElementType
(
const
WString
&
elementTypeName
) {
return
elementTypes
.
Add
(
elementTypeName
); }
void
GuiGraphicsResourceManager
::
RegisterRendererFactory
(
vint
elementType
,
Ptr
<
IGuiGraphicsRendererFactory
>
factory
) {
if
(
rendererFactories
.
Count
() <=
elementType
) {
rendererFactories
.
Resize
(
elementType
+
1
);
rendererFactories
[
elementType
]
=
factory
; }
else
{
rendererFactories
[
elementType
]
=
factory
; } }
IGuiGraphicsRendererFactory
*
GuiGraphicsResourceManager
::
GetRendererFactory
(
vint
elementType
) {
return
rendererFactories
.
Count
() >
elementType
?
rendererFactories
[
elementType
].
Obj
() :
nullptr
; }
GuiGraphicsResourceManager
*
guiGraphicsResourceManager
=
0
;
GuiGraphicsResourceManager
*
GetGuiGraphicsResourceManager
() {
return
guiGraphicsResourceManager
; }
void
SetGuiGraphicsResourceManager
(
GuiGraphicsResourceManager
*
resourceManager
) {
guiGraphicsResourceManager
=
resourceManager
; } } } }