Lines Matching refs:object
41 * @note If this object is remote, its position will be used in
50 * @brief Creates a `Parcelable` object.
52 * @param asRemote Specifies whether the object is remote.
57 * @brief Writes a `Parcelable` object into a parcel.
62 * @note If the `Parcelable` object is remote, its position will be saved
65 * fetch data from the given parcel into this `Parcelable` object.
71 * @brief Enumerates the behavior types of a `Parcelable` object.
73 * @var IPC Indicate an object that can be used in IPC.
74 * @var RPC Indicate an object that can be used in RPC.
75 * @var HOLD_OBJECT Indicate an object that will be always alive
118 bool asRemote_; // If the object is remote.
119 mutable uint8_t behavior_; // Behavior of the object.
181 * @brief Creates a `Parcel` object with the specified memory allocator.
204 * @brief Obtains the position (offset) of every object written
351 * @param value Indicates the reference to an `std::string` object.
364 * @param value Indicates the reference to an `std::u16string` object.
374 * An `std::u16string` object will be constructed based on the `char16_t*`
376 * data in the `u16string` object with the appended terminator `\0` will
401 * @brief Writes a `Parcelable` object to this parcel.
403 * Call `WriteRemoteObject(const Parcelable *)` to write a remote object.
404 * Call `Marshalling(Parcel &parcel)` to write a non-remote object.
406 * @param object Indicates the pointer to a `Parcelable` object.
412 bool WriteParcelable(const Parcelable *object);
415 * @brief Writes a `Parcelable` object to this parcel, and enables its
418 * @param object Indicates the smart pointer to a `Parcelable` object.
422 bool WriteStrongParcelable(const sptr<Parcelable> &object);
425 * @brief Writes a remote object to this parcel.
427 * @param object Indicates the pointer to a remote object.
430 * @note If `HOLD_OBJECT` is enabled for the remote object, it will stay
434 bool WriteRemoteObject(const Parcelable *object);
437 * @brief Writes an object to this parcel.
442 * @tparam T Indicates the class type of the object.
443 * @param object Indicates the smart pointer to the object.
448 bool WriteObject(const sptr<T> &object);
553 * @brief Reads a C++ string (`std::string`) object from this parcel.
561 * @brief Reads a C++ string (`std::string`) object from this parcel to
562 * an object.
564 * @param value Indicates the `std::string` object to hold the data read.
571 * @brief Reads a C++ UTF-16 encoded string (`std::u16string`) object
580 * @brief Reads a C++ UTF-16 string (`std::u16string`) object from this
581 * parcel to an object.
583 * @param value Indicates the `std::u16string` object to hold the data read.
590 * @brief Reads a C++ UTF-16 string (`std::u16string`) object and its length
595 * @return Returns an `std::u16string` object.
600 * @brief Reads a C++ string (`std::string`) object and its length from
605 * @return Returns an `std::string` object.
646 * @brief Reads a `Parcelable` object and its child class objects
649 * @tparam T Indicates the class type of the output object.
650 * @return Returns the object read.
657 * @brief Reads a `Parcelable` object from this parcel and manages it by a
660 * @tparam T Indicates the class type of the output object.
661 * @return Returns the object managed by a smart pointer.
668 * @brief Checks whether it is valid to read an object from the current
676 * @brief Reads an object from this parcel.
679 * object.
681 * @tparam T Indicates the class type of the output object.
682 * @return Returns the smart pointer to the object.
694 * @param allocator Indicates the pointer to an `Allocator` object.
715 * @brief Writes an `std::vector` object to this parcel.
743 * @brief Reads an `std::vector` object from this parcel.
785 * @brief Records the position of the written object, which is represented
860 bool Parcel::WriteObject(const sptr<T> &object)
862 if (object == nullptr) {
863 return T::Marshalling(*this, object);
865 return WriteRemoteObject(object.GetRefPtr());
878 // Read data from the given parcel into this parcelable object.
889 // Read data from the given parcel into this parcelable object, and return sptr.