Class Object

Inheritance Relationships

Derived Types

Class Documentation

class Object

Provides a dynamic object capable of storing any arbitrary set of properties at runtime.

Subclassed by axr::sdk::ModelBase, axr::sdk::models::ACLRecord, axr::sdk::models::Address, axr::sdk::models::AssignServerInstance, axr::sdk::models::OrderItem, axr::sdk::models::Ticket::TeamSize

Public Functions

Object()
Object(const Object &value) noexcept
Object(Object &&value) noexcept
Object(const std::map<utility::string_t, Variant> &map)
Object(std::map<utility::string_t, Variant> &&map)
Object(const Variant &obj)
Object &operator=(const Object &other) noexcept
Object &operator=(Object &&other) noexcept
Object &operator=(const Variant &obj)
bool operator==(const Object &other) noexcept
bool operator!=(const Object &other) noexcept
inline Variant &operator[](const utility::char_t *name)
inline Variant &operator[](const utility::string_t &name)
virtual ~Object()
utility::string_t GetRemoteUrl() const

Returns the URL of the remote server endpoint where the object is managed.

virtual Object &SetRemoteUrl(const utility::string_t &url)

Returns the URL of the remote server endpoint where the object is managed.

std::map<utility::string_t, Variant> &GetProperties()

Returns the object’s underlying map of stored values.

virtual Object &SetProperties(const std::map<utility::string_t, Variant> &value)

Sets the object’s underlying map of stored values.

virtual Object &SetProperties(std::map<utility::string_t, Variant> &&value)

Sets the underlying map of stored values for the object.

inline bool HasProperty(const utility::char_t *name) const

Returns true if the object contains a property with the given name, otherwise false.

inline bool HasProperty(const utility::string_t &name) const

Returns true if the object contains a property with the given name, otherwise false.

inline Variant GetProperty(const utility::char_t *name) const

Returns the value for the property with the given name if found, otherwise a null value.

template<class T>
T GetProperty(const utility::char_t *name) const

Returns the value for the property with the given name if found, otherwise a null value.

inline Variant GetProperty(const utility::string_t &name) const

Returns the value for the property with the given name if found, otherwise a null value.

template<class T>
T GetProperty(const utility::string_t &name) const

Returns the value for the property with the given name if found, otherwise a null value.

void RemoveProperty(const utility::char_t *name)

Deletes the value for the property with the given name.

void RemoveProperty(const utility::string_t &name)

Deletes the value for the property with the given name.

virtual Object &SetProperty(const utility::char_t *name, const Variant &value)

Sets the property of the given name to the provided value.

virtual Object &SetProperty(const utility::string_t &name, const Variant &value)

Sets the property of the given name to the provided value.

void CopyFrom(const Object &other)

Overwrites the state of the object with a copy of the contents of other.

void CopyFrom(std::shared_ptr<Object> other)

Overwrites the state of the object with a copy of the contents of other.

void MoveFrom(Object &&other)

Overwrites the state of the object with the contents of other. This is a move operation and will steal the resources from other.

void MoveFrom(std::shared_ptr<Object> other)

Overwrites the state of the object with the contents of other. This is a move operation and will steal the resources from other.

void ToString(json::StringWriter &writer) const

Returns the state of the object encoded as a JSON string using the provided writer.

Parameters

writer – The JSON writer utility to use to generate the string.

utility::string_t ToString() const

Returns the state of the object encoded as a JSON string.

Public Static Functions

static inline const utility::char_t *ClassName()

Returns the fully qualified name of the class.

static Object Parse(json::Value &value)

Parses the given JSON object into a new Object instance.

static Object Parse(const utility::string_t &json)

Parses the given JSON encoded string into a new Object instance.

Protected Attributes

std::map<utility::string_t, Variant> m_properties
utility::string_t m_remoteUrl