Class Object

Contents

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 xbe::sdk::AuthMethod, xbe::sdk::ModelBase, xbe::sdk::PasswordConfig, xbe::sdk::UsersRequiredProps, xbe::sdk::models::ACLRecord, xbe::sdk::models::Address, xbe::sdk::models::AssignServerInstance, xbe::sdk::models::OrderItem, xbe::sdk::models::ResourceCost, xbe::sdk::models::ResourceDefaults, xbe::sdk::models::Ticket::TeamSize, xbe::sdk::models::Transaction::TransactionApproval

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.

template<>
inline bool GetProperty(const utility::char_t *name) const#
template<>
inline bool GetProperty(const utility::string_t &name) const#
template<>
inline double GetProperty(const utility::char_t *name) const#
template<>
inline double GetProperty(const utility::string_t &name) const#
template<>
inline float GetProperty(const utility::char_t *name) const#
template<>
inline float GetProperty(const utility::string_t &name) const#
template<>
inline std::shared_ptr<Object> GetProperty(const utility::char_t *name) const#
template<>
inline std::shared_ptr<Object> GetProperty(const utility::string_t &name) const#
template<>
inline std::vector<Variant> GetProperty(const utility::char_t *name) const#
template<>
inline std::vector<Variant> GetProperty(const utility::string_t &name) const#
template<>
inline datetime GetProperty(const utility::char_t *name) const#
template<>
inline datetime GetProperty(const utility::string_t &name) const#
template<>
inline utility::string_t GetProperty(const utility::char_t *name) const#
template<>
inline utility::string_t GetProperty(const utility::string_t &name) const#
template<>
inline int8_t GetProperty(const utility::char_t *name) const#
template<>
inline int8_t GetProperty(const utility::string_t &name) const#
template<>
inline uint8_t GetProperty(const utility::char_t *name) const#
template<>
inline uint8_t GetProperty(const utility::string_t &name) const#
template<>
inline int16_t GetProperty(const utility::char_t *name) const#
template<>
inline int16_t GetProperty(const utility::string_t &name) const#
template<>
inline uint16_t GetProperty(const utility::char_t *name) const#
template<>
inline uint16_t GetProperty(const utility::string_t &name) const#
template<>
inline int32_t GetProperty(const utility::char_t *name) const#
template<>
inline int32_t GetProperty(const utility::string_t &name) const#
template<>
inline uint32_t GetProperty(const utility::char_t *name) const#
template<>
inline uint32_t GetProperty(const utility::string_t &name) const#
template<>
inline int64_t GetProperty(const utility::char_t *name) const#
template<>
inline int64_t GetProperty(const utility::string_t &name) const#
template<>
inline uint64_t GetProperty(const utility::char_t *name) const#
template<>
inline uint64_t GetProperty(const utility::string_t &name) const#

Public Static Functions

static inline const utility::char_t *ClassName()#

Returns the fully qualified name of the class.

static Object Parse(json::Value &jsonValue)#

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#