Isle
Loading...
Searching...
No Matches
mxobjectfactory.h
Go to the documentation of this file.
1#ifndef MXOBJECTFACTORY_H
2#define MXOBJECTFACTORY_H
3
4#include "mxatom.h"
5#include "mxcore.h"
6
10#define FOR_MXOBJECTFACTORY_OBJECTS(X) \
11 X(MxPresenter) \
12 X(MxCompositePresenter) \
13 X(MxVideoPresenter) \
14 X(MxFlcPresenter) \
15 X(MxSmkPresenter) \
16 X(MxStillPresenter) \
17 X(MxWavePresenter) \
18 X(MxMIDIPresenter) \
19 X(MxEventPresenter) \
20 X(MxLoopingFlcPresenter) \
21 X(MxLoopingSmkPresenter) \
22 X(MxLoopingMIDIPresenter)
23
34class MxObjectFactory : public MxCore {
35public:
39
42 const char* ClassName() const override // vtable+0x0c
43 {
44 return "MxObjectFactory";
45 }
46
50 MxBool IsA(const char* p_name) const override // vtable+0x10
51 {
52 return !strcmp(p_name, MxObjectFactory::ClassName()) || MxCore::IsA(p_name);
53 }
54
58 virtual MxCore* Create(const char* p_name); // vtable+0x14
59
63 virtual void Destroy(MxCore* p_object); // vtable+0x18
64
65 // SYNTHETIC: LEGO1 0x100b1160
66 // MxObjectFactory::`scalar deleting destructor'
67 // @brief [AI] Scalar deleting destructor used internally. [AI]
68
69 // SYNTHETIC: LEGO1 0x10009020
70 // MxObjectFactory::~MxObjectFactory
71 // @brief [AI] Destructor for MxObjectFactory. [AI]
72
73private:
74#define X(V) \
75
76 MxAtomId m_id##V;
78#undef X
79};
80
81#endif // MXOBJECTFACTORY_H
[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
virtual MxBool IsA(const char *p_name) const
[AI] Checks whether this object's class type or parents match the given name.
Definition: mxcore.h:46
[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.
const char * ClassName() const override
[AI] Returns the class 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.
MxBool IsA(const char *p_name) const override
[AI] Determines whether this class is or inherits from the named class.
#define override
Definition: compat.h:21
#define X(V)
#define FOR_MXOBJECTFACTORY_OBJECTS(X)
[AI] Macro listing the presenter class types handled by the object factory.
MxU8 MxBool
[AI]
Definition: mxtypes.h:124