λ61
|
#include <Object.hpp>
Public Member Functions | |
virtual | ~Object ()=default |
virtual std::string | toString () const |
Returns a human-readable string representation of the object. | |
virtual std::size_t | hashCode () const |
Returns a hash code for the object. | |
std::string | typeName () const |
Returns the demangled name of the type. | |
const std::type_info & | typeInfo () const |
Returns RTTI type information object. | |
virtual nlohmann::json | toJsonValue () const |
Serializes the object into JSON form. | |
operator std::string () const | |
Explicit conversion operator to std::string. | |
operator nlohmann::json () const | |
Explicit conversion operator to nlohmann::json. |
|
virtualdefault |
|
virtual |
Returns a hash code for the object.
This is useful for putting objects into unordered containers (e.g., std::unordered_map, std::unordered_set) or for comparisons by value. Derived classes should override this to compute a stable hash of their data.
Reimplemented in l61::RosettaSystem::EnvironmentVariable.
|
explicit |
Explicit conversion operator to nlohmann::json.
Delegates to toJsonValue().
|
explicit |
Explicit conversion operator to std::string.
Enables syntax like:
By default, this should delegate to toString().
|
virtual |
Serializes the object into JSON form.
Intended for persistence, logging, or communication. Derived classes should override this to produce structured JSON output representing their state.
Reimplemented in l61::RosettaSystem::EnvironmentVariable.
|
virtual |
Returns a human-readable string representation of the object.
Derived classes should override this to provide a meaningful textual description of their internal state. Default implementation may just return the type name or placeholder text.
Reimplemented in l61::ExtensionSystem::NativeExtension, l61::RosettaSystem::EnvironmentVariable, and l61::ScriptEngine::FileBackedScriptEnvironment.
const std::type_info & l61::Object::typeInfo | ( | ) | const |
Returns RTTI type information object.
This returns a reference to std::type_info for the actual dynamic type of the object, enabling type-safe runtime comparisons.
std::string l61::Object::typeName | ( | ) | const |
Returns the demangled name of the type.
Provides the runtime name of the object’s dynamic type. Typically uses RTTI (typeid) internally and may demangle compiler-specific output.