Isle
Loading...
Searching...
No Matches
mxobjectfactory.cpp
Go to the documentation of this file.
1#include "mxobjectfactory.h"
2
3#include "decomp.h"
5#include "mxeventpresenter.h"
6#include "mxflcpresenter.h"
10#include "mxmidipresenter.h"
11#include "mxpresenter.h"
12#include "mxsmkpresenter.h"
13#include "mxstillpresenter.h"
14#include "mxvideopresenter.h"
15#include "mxwavepresenter.h"
16
18
19// FUNCTION: LEGO1 0x100b0d80
21{
22#define X(V) m_id##V = MxAtomId(#V, e_exact);
24#undef X
25}
26
27// FUNCTION: LEGO1 0x100b12c0
28// FUNCTION: BETA10 0x10143177
29MxCore* MxObjectFactory::Create(const char* p_name)
30{
31 MxCore* object = NULL;
32 MxAtomId atom(p_name, e_exact);
33
34 if (0) {
35 }
36#define X(V) \
37 else if (m_id##V == atom) \
38 { \
39 object = new V; \
40 }
42#undef X
43 return object;
44}
45
46// FUNCTION: LEGO1 0x100b1a30
47// FUNCTION: BETA10 0x10143814
49{
50 delete p_object;
51}
[AI] Atomized (unique) string identifier, managed by reference counting.
Definition: mxatom.h:124
[AI] Base virtual class for all Mindscape engine (Mx) objects.
Definition: mxcore.h:15
[AI] Forward declaration for the factory responsible for constructing core objects from atom or type ...
virtual MxCore * Create(const char *p_name)
[AI] Creates a new instance of the class matching the provided string name.
virtual void Destroy(MxCore *p_object)
[AI] Destroys (deletes) a dynamic object created by this factory.
MxObjectFactory()
[AI] Constructs a new MxObjectFactory and initializes atom IDs for all supported presenter classes.
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
@ e_exact
[AI] Match the string exactly, no case change.
Definition: mxatom.h:106
#define X(V)
#define FOR_MXOBJECTFACTORY_OBJECTS(X)
[AI] Macro listing the presenter class types handled by the object factory.