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 {
|
|
|
|
LookupMode_Exact = 0,
|
|
|
|
LookupMode_LowerCase = 1,
|
|
|
|
LookupMode_UpperCase = 2,
|
|
|
|
LookupMode_LowerCase2 = 3
|
2023-06-19 00:45:25 -04:00
|
|
|
};
|
2023-06-11 21:03:54 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
class MxAtomId {
|
2023-04-27 22:19:39 -04:00
|
|
|
public:
|
2023-10-24 19:38:27 -04:00
|
|
|
__declspec(dllexport) MxAtomId(const char*, LookupMode);
|
2023-12-13 05:48:14 -05:00
|
|
|
__declspec(dllexport) MxAtomId& operator=(const MxAtomId& p_atomId);
|
2023-10-24 19:38:27 -04:00
|
|
|
__declspec(dllexport) ~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
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
const char* m_internal;
|
2023-04-27 22:19:39 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MXATOMID_H
|