File: consoleevent.h

package info (click to toggle)
openmohaa 0.82.1%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 34,192 kB
  • sloc: cpp: 315,720; ansic: 275,789; sh: 312; xml: 246; asm: 141; makefile: 7
file content (32 lines) | stat: -rw-r--r-- 619 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include <listener.h>
#include <mem_blockalloc.h>
#include "g_public.h"

class ConsoleEvent : public Event
{
private:
    gentity_t *m_consoleedict;

public:
    CLASS_PROTOTYPE(ConsoleEvent);

    void *operator new(size_t size);
    void  operator delete(void *ptr);

    ConsoleEvent();

    ConsoleEvent(str name)
        : Event(name)
    {
        m_consoleedict = NULL;
    }

    void       SetConsoleEdict(gentity_t *edict);
    gentity_t *GetConsoleEdict(void) const;

    void ErrorInternal(Listener *l, str text) const override;
};

extern MEM_BlockAlloc<ConsoleEvent> ConsoleEvent_allocator;