isle/LEGO1/mxobjectfactory.h
Christian Semmler bc5ca621a4
(Proposal) Introduction of naming convention checker (ncc) (#322)
* Add ncc tool

* Add symlink

* Fixes

* Try this

* Try this

* Try this

* Try this

* Add include path

* Update style

* Update style

* Add more rules

* Fix style

* Update styles

* Fix name parameter

* Fix MxParam p

* Fix m_unk0x pattern

* Allow 4 digits for relative hex

* Add missing offset

* Fix some parameters

* Fix some vtables

* Fix more vtables

* Update rules, fixes

* More fixes

* More fixes

* More fixes

* More fixes

* More fixes

* More fixes

* More fixes

* Fix last issue

* Update readme

* Update readme

* Update CONTRIBUTING.md

* Fix annotations

* Rename

* Update CONTRIBUTING.md

* Update README.md
2023-12-13 11:48:14 +01:00

48 lines
2.2 KiB
C++

#ifndef MXOBJECTFACTORY_H
#define MXOBJECTFACTORY_H
#include "mxatomid.h"
#include "mxcore.h"
#define FOR_MXOBJECTFACTORY_OBJECTS(X) \
X(MxPresenter) \
X(MxCompositePresenter) \
X(MxVideoPresenter) \
X(MxFlcPresenter) \
X(MxSmkPresenter) \
X(MxStillPresenter) \
X(MxWavePresenter) \
X(MxMIDIPresenter) \
X(MxEventPresenter) \
X(MxLoopingFlcPresenter) \
X(MxLoopingSmkPresenter) \
X(MxLoopingMIDIPresenter)
// VTABLE: LEGO1 0x100dc220
class MxObjectFactory : public MxCore {
public:
MxObjectFactory();
// FUNCTION: LEGO1 0x10008f70
inline virtual const char* ClassName() const override // vtable+0xc
{
// GLOBAL: LEGO1 0x100f0730
return "MxObjectFactory";
}
// FUNCTION: LEGO1 0x10008f80
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, MxObjectFactory::ClassName()) || MxCore::IsA(p_name);
}
virtual MxCore* Create(const char* p_name); // vtable 0x14
virtual void Destroy(MxCore* p_object); // vtable 0x18
private:
#define X(V) MxAtomId m_id##V;
FOR_MXOBJECTFACTORY_OBJECTS(X)
#undef X
};
#endif // MXOBJECTFACTORY_H