acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
poolable.h
1
// Created by camilo on 2025-06-30 00:48 <3ThomasBorregaardSørensen!!
2
#pragma once
3
4
5
#include "acme/prototype/prototype/call.h"
6
#include "acme/prototype/prototype/pool.h"
7
8
9
template
<
typename
POOL_RESTORABLE >
10
class
poolable :
11
virtual
public
::particle
12
{
13
public
:
14
15
16
bool
m_bNew;
17
18
::pool < POOL_RESTORABLE >* m_ppool;
19
20
poolable()
21
{
22
23
m_bNew =
true
;
24
25
}
26
27
bool
is_new()
const
28
{
29
30
return
m_bNew;
31
32
}
33
34
void
handle(const ::call& call)
override
35
{
36
37
if
(call == e_call_off_to_pool)
38
{
39
40
m_ppool->m_aPool.add(
this
);
41
42
}
43
44
}
45
46
};
47
48
49
prototype
prototype
poolable.h
Generated by
1.17.0