2023-04-27 22:19:39 -04:00
|
|
|
#ifndef MXATOMID_H
|
|
|
|
#define MXATOMID_H
|
|
|
|
|
2023-08-16 13:09:44 -04:00
|
|
|
#include "mxatomidcounter.h"
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "mxtypes.h"
|
2023-07-02 03:00:28 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
enum LookupMode {
|
2024-01-17 11:53:53 -05:00
|
|
|
e_exact = 0,
|
|
|
|
e_lowerCase,
|
|
|
|
e_upperCase,
|
|
|
|
e_lowerCase2,
|
2023-06-19 00:45:25 -04:00
|
|
|
};
|
2023-06-11 21:03:54 -04:00
|
|
|
|
2024-01-15 14:37:50 -05:00
|
|
|
// SIZE 0x04
|
2023-10-24 19:38:27 -04:00
|
|
|
class MxAtomId {
|
2023-04-27 22:19:39 -04:00
|
|
|
public:
|
2024-01-24 21:16:29 -05:00
|
|
|
MxAtomId(const char*, LookupMode);
|
|
|
|
MxAtomId& operator=(const MxAtomId& p_atomId);
|
|
|
|
~MxAtomId();
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
MxAtomId() { this->m_internal = 0; }
|
2023-04-27 22:19:39 -04:00
|
|
|
|
2023-12-13 05:48:14 -05:00
|
|
|
inline MxBool operator==(const MxAtomId& p_atomId) const { return this->m_internal == p_atomId.m_internal; }
|
2024-01-06 12:56:15 -05:00
|
|
|
inline MxBool operator!=(const MxAtomId& p_atomId) const { return this->m_internal != p_atomId.m_internal; }
|
2023-09-25 22:30:56 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
void Clear();
|
2023-07-02 03:00:28 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
const char* GetInternal() const { return m_internal; }
|
2023-09-25 22:30:56 -04:00
|
|
|
|
2023-06-19 20:18:53 -04:00
|
|
|
private:
|
2023-10-24 19:38:27 -04:00
|
|
|
MxAtomIdCounter* GetCounter(const char*, LookupMode);
|
|
|
|
void Destroy();
|
2023-08-16 13:09:44 -04:00
|
|
|
|
2024-01-15 14:37:50 -05:00
|
|
|
const char* m_internal; // 0x00
|
2023-04-27 22:19:39 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MXATOMID_H
|