Cogs.Core
Source
Services
PipelineService.cpp
1
#include "Foundation/Logging/Logger.h"
2
#include "PipelineService.h"
3
4
namespace
5
{
6
using namespace
Cogs::Core
;
7
Cogs::Logging::Log
logger =
Cogs::Logging::getLogger
(
"PipelineService"
);
8
}
9
10
Cogs::Core::PipelineService::PipelineService(
Context
*
/*context*/
)
11
{
12
}
13
Cogs::Core::PipelineService::~PipelineService()
14
{
15
for
(
auto
& run : runs) {
16
delete
run;
17
}
18
runs.clear();
19
}
20
Cogs::Core::PipelineRun
* Cogs::Core::PipelineService::createPipelineRun()
21
{
22
auto
* run =
new
PipelineRun
();
23
runs.push_back(run);
24
return
run;
25
}
26
void
Cogs::Core::PipelineService::destroyPipelineRun(
PipelineRun
* run)
27
{
28
if
(run) {
29
for
(
size_t
i = 0, n = runs.size(); i < n; i++) {
30
if
(runs[i] == run) {
31
runs[i] = runs[n - 1];
32
runs.pop_back();
33
delete
run;
34
return
;
35
}
36
}
37
LOG_ERROR(logger,
"destroying unknown pipeline run %#zx"
,
reinterpret_cast<
size_t
>
(run));
38
}
39
else
{
40
LOG_WARNING(logger,
"Destroying null pipeline run."
);
41
}
42
}
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Logging::Log
Log implementation class.
Definition:
LogManager.h:139
Cogs::Core
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
Definition:
ComponentFunctions.h:10
Cogs::Logging::getLogger
constexpr Log getLogger(const char(&name)[LEN]) noexcept
Definition:
LogManager.h:180
Cogs::Core::PipelineRun
Definition:
PipelineService.h:11
Generated by
1.9.6