ObjectRef

ObjectRef#

template<typename T>
class ObjectRef#

the object ref.

Note

  • openYuanRong encourages users to store large objects in the data system using YR::Put and obtain a unique ObjectRef (object reference). When invoking user functions, use the ObjectRef instead of the object itself as a function parameter to reduce the overhead of transmitting large objects between openYuanRong and user function components, ensuring efficient flow.

  • The return value of each user function call will also be returned in the form of an ObjectRef, which the user can use as an input parameter for the next call or retrieve the corresponding object through YR::Get.

  • Currently, users cannot construct ObjectRef by themselves.

Template Parameters:

T – Type of referenced object.

Public Functions

inline std::string ID() const#

Get objId.

Returns:

The ID of the objectRef.

inline bool IsLocal() const#

Check whether the objectRef is local.

Returns:

true if objectRef is local, false otherwise.