37 lines
959 B
C++
37 lines
959 B
C++
#ifndef NTX_ICLASSTYPE_H
|
|
#define NTX_ICLASSTYPE_H
|
|
|
|
#include <ntx.h>
|
|
|
|
namespace ntx
|
|
{
|
|
|
|
/**
|
|
* @brief Minimales Interface für den 'ClassType' Aspekt: Der CType entspricht
|
|
* dem Element-namen eines Knotens im XML. Die ClassTypeId ist eine performante
|
|
* Repräsentation (z.B. Hash) dieses Namens. Kann unterschiedliche Implementierungen haben,
|
|
* z.B.: einfaches Hochzählen, Hash des Strings, den String selbst oder eine Meta-Klasse,
|
|
* vgl. QObject.
|
|
*/
|
|
|
|
class NtxIClassType
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~NtxIClassType() = default;
|
|
|
|
virtual const NtxClassTypeId getClassTypeId() const = 0;
|
|
virtual const NtxString& getClassTypeLabel() const = 0;
|
|
|
|
protected:
|
|
|
|
// ✅ Protected - nur abgeleitete Klassen und Friends
|
|
virtual void setClassTypeLabel(const NtxString& idString) = 0;
|
|
virtual void setClassTypeId(NtxClassTypeId classTypeId) = 0;
|
|
|
|
};
|
|
|
|
} // namespace ntx
|
|
|
|
#endif // NTX_ICLASSTYPE_H
|