Lines Matching refs:T
46 template <typename T> class Flattenable;
47 template <typename T> class LightFlattenable;
182 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
183 status_t writeEnumVector(const std::vector<T>& val);
184 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
185 status_t writeEnumVector(const std::optional<std::vector<T>>& val);
186 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
187 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val);
189 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
190 status_t writeEnumVector(const std::vector<T>& val);
191 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
192 status_t writeEnumVector(const std::optional<std::vector<T>>& val);
193 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
194 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val);
196 template<typename T>
197 status_t writeParcelableVector(const std::optional<std::vector<std::optional<T>>>& val);
198 template<typename T>
199 status_t writeParcelableVector(const std::unique_ptr<std::vector<std::unique_ptr<T>>>& val);
200 template<typename T>
201 status_t writeParcelableVector(const std::shared_ptr<std::vector<std::unique_ptr<T>>>& val);
202 template<typename T>
203 status_t writeParcelableVector(const std::vector<T>& val);
205 template<typename T>
206 status_t writeNullableParcelable(const std::optional<T>& parcelable);
207 template<typename T>
208 status_t writeNullableParcelable(const std::unique_ptr<T>& parcelable);
212 template<typename T>
213 status_t write(const Flattenable<T>& val);
215 template<typename T>
216 status_t write(const LightFlattenable<T>& val);
218 template<typename T>
219 status_t writeVectorSize(const std::vector<T>& val);
220 template<typename T>
221 status_t writeVectorSize(const std::optional<std::vector<T>>& val);
222 template<typename T>
223 status_t writeVectorSize(const std::unique_ptr<std::vector<T>>& val);
326 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
327 status_t readEnumVector(std::vector<T>* val) const;
328 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
329 status_t readEnumVector(std::unique_ptr<std::vector<T>>* val) const;
330 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
331 status_t readEnumVector(std::optional<std::vector<T>>* val) const;
333 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
334 status_t readEnumVector(std::vector<T>* val) const;
335 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
336 status_t readEnumVector(std::unique_ptr<std::vector<T>>* val) const;
337 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool> = 0>
338 status_t readEnumVector(std::optional<std::vector<T>>* val) const;
340 template<typename T>
342 std::optional<std::vector<std::optional<T>>>* val) const;
343 template<typename T>
345 std::unique_ptr<std::vector<std::unique_ptr<T>>>* val) const;
346 template<typename T>
347 status_t readParcelableVector(std::vector<T>* val) const;
351 template<typename T>
352 status_t readParcelable(std::optional<T>* parcelable) const;
353 template<typename T>
354 status_t readParcelable(std::unique_ptr<T>* parcelable) const;
356 template<typename T>
357 status_t readStrongBinder(sp<T>* val) const;
359 template<typename T>
360 status_t readNullableStrongBinder(sp<T>* val) const;
404 template<typename T>
405 status_t read(Flattenable<T>& val) const;
407 template<typename T>
408 status_t read(LightFlattenable<T>& val) const;
410 template<typename T>
411 status_t resizeOutVector(std::vector<T>* val) const;
412 template<typename T>
413 status_t resizeOutVector(std::optional<std::vector<T>>* val) const;
414 template<typename T>
415 status_t resizeOutVector(std::unique_ptr<std::vector<T>>* val) const;
416 template<typename T>
417 status_t reserveOutVector(std::vector<T>* val, size_t* size) const;
418 template<typename T>
419 status_t reserveOutVector(std::optional<std::vector<T>>* val,
421 template<typename T>
422 status_t reserveOutVector(std::unique_ptr<std::vector<T>>* val,
523 template<class T>
524 status_t readAligned(T *pArg) const;
526 template<class T> T readAligned() const;
528 template<class T>
529 status_t writeAligned(T val);
534 template<typename T, std::enable_if_t<std::is_same_v<typename std::underlying_type_t<T>,int32_t>, bool> = 0>
535 status_t writeEnum(const T& val);
536 template<typename T, std::enable_if_t<std::is_same_v<typename std::underlying_type_t<T>,int64_t>, bool> = 0>
537 status_t writeEnum(const T& val);
539 template<typename T, std::enable_if_t<std::is_same_v<typename std::underlying_type_t<T>,int32_t>, bool> = 0>
540 status_t readEnum(T* pArg) const;
541 template<typename T, std::enable_if_t<std::is_same_v<typename std::underlying_type_t<T>,int64_t>, bool> = 0>
542 status_t readEnum(T* pArg) const;
545 template<typename T>
546 status_t readByteVectorInternal(std::vector<T>* val, size_t size) const;
548 template<typename T, typename U>
549 status_t unsafeReadTypedVector(std::vector<T>* val,
551 template<typename T>
552 status_t readNullableTypedVector(std::optional<std::vector<T>>* val,
553 status_t(Parcel::*read_func)(T*) const) const;
554 template<typename T>
555 status_t readNullableTypedVector(std::unique_ptr<std::vector<T>>* val,
556 status_t(Parcel::*read_func)(T*) const) const;
557 template<typename T>
558 status_t readTypedVector(std::vector<T>* val,
559 status_t(Parcel::*read_func)(T*) const) const;
560 template<typename T, typename U>
561 status_t unsafeWriteTypedVector(const std::vector<T>& val,
563 template<typename T>
564 status_t writeNullableTypedVector(const std::optional<std::vector<T>>& val,
565 status_t(Parcel::*write_func)(const T&));
566 template<typename T>
567 status_t writeNullableTypedVector(const std::unique_ptr<std::vector<T>>& val,
568 status_t(Parcel::*write_func)(const T&));
569 template<typename T>
570 status_t writeNullableTypedVector(const std::optional<std::vector<T>>& val,
571 status_t(Parcel::*write_func)(T));
572 template<typename T>
573 status_t writeNullableTypedVector(const std::unique_ptr<std::vector<T>>& val,
574 status_t(Parcel::*write_func)(T));
575 template<typename T>
576 status_t writeTypedVector(const std::vector<T>& val,
577 status_t(Parcel::*write_func)(const T&));
578 template<typename T>
579 status_t writeTypedVector(const std::vector<T>& val,
580 status_t(Parcel::*write_func)(T));
645 // specified class T implementing the Flattenable protocol. It "virtualizes" a compile-time
647 template<typename T>
650 const Flattenable<T>& val;
651 explicit FlattenableHelper(const Flattenable<T>& _val) : val(_val) { }
666 return const_cast<Flattenable<T>&>(val).unflatten(buffer, size, fds, count);
697 template<typename T>
698 status_t Parcel::write(const Flattenable<T>& val) {
699 const FlattenableHelper<T> helper(val);
703 template<typename T>
704 status_t Parcel::write(const LightFlattenable<T>& val) {
724 template<typename T>
725 status_t Parcel::read(Flattenable<T>& val) const {
726 FlattenableHelper<T> helper(val);
730 template<typename T>
731 status_t Parcel::read(LightFlattenable<T>& val) const {
751 template<typename T>
752 status_t Parcel::writeVectorSize(const std::vector<T>& val) {
759 template<typename T>
760 status_t Parcel::writeVectorSize(const std::optional<std::vector<T>>& val) {
768 template<typename T>
769 status_t Parcel::writeVectorSize(const std::unique_ptr<std::vector<T>>& val) {
777 template<typename T>
778 status_t Parcel::resizeOutVector(std::vector<T>* val) const {
792 template<typename T>
793 status_t Parcel::resizeOutVector(std::optional<std::vector<T>>* val) const {
808 template<typename T>
809 status_t Parcel::resizeOutVector(std::unique_ptr<std::vector<T>>* val) const {
818 val->reset(new std::vector<T>(size_t(size)));
824 template<typename T>
825 status_t Parcel::reserveOutVector(std::vector<T>* val, size_t* size) const {
840 template<typename T>
841 status_t Parcel::reserveOutVector(std::optional<std::vector<T>>* val, size_t* size) const {
859 template<typename T>
860 status_t Parcel::reserveOutVector(std::unique_ptr<std::vector<T>>* val,
870 val->reset(new std::vector<T>());
879 template<typename T>
880 status_t Parcel::readStrongBinder(sp<T>* val) const {
885 *val = interface_cast<T>(tmp);
895 template<typename T>
896 status_t Parcel::readNullableStrongBinder(sp<T>* val) const {
901 *val = interface_cast<T>(tmp);
911 template<typename T, typename U>
913 std::vector<T>* val,
947 template<typename T>
948 status_t Parcel::readTypedVector(std::vector<T>* val,
949 status_t(Parcel::*read_func)(T*) const) const {
953 template<typename T>
954 status_t Parcel::readNullableTypedVector(std::optional<std::vector<T>>* val,
955 status_t(Parcel::*read_func)(T*) const) const {
977 template<typename T>
978 status_t Parcel::readNullableTypedVector(std::unique_ptr<std::vector<T>>* val,
979 status_t(Parcel::*read_func)(T*) const) const {
990 val->reset(new std::vector<T>());
1001 template<typename T, typename U>
1002 status_t Parcel::unsafeWriteTypedVector(const std::vector<T>& val,
1025 template<typename T>
1026 status_t Parcel::writeTypedVector(const std::vector<T>& val,
1027 status_t(Parcel::*write_func)(const T&)) {
1031 template<typename T>
1032 status_t Parcel::writeTypedVector(const std::vector<T>& val,
1033 status_t(Parcel::*write_func)(T)) {
1037 template<typename T>
1038 status_t Parcel::writeNullableTypedVector(const std::optional<std::vector<T>>& val,
1039 status_t(Parcel::*write_func)(const T&)) {
1047 template<typename T>
1048 status_t Parcel::writeNullableTypedVector(const std::unique_ptr<std::vector<T>>& val,
1049 status_t(Parcel::*write_func)(const T&)) {
1057 template<typename T>
1058 status_t Parcel::writeNullableTypedVector(const std::optional<std::vector<T>>& val,
1059 status_t(Parcel::*write_func)(T)) {
1067 template<typename T>
1068 status_t Parcel::writeNullableTypedVector(const std::unique_ptr<std::vector<T>>& val,
1069 status_t(Parcel::*write_func)(T)) {
1077 template<typename T>
1078 status_t Parcel::readParcelableVector(std::vector<T>* val) const {
1079 return unsafeReadTypedVector<T, Parcelable>(val, &Parcel::readParcelable);
1082 template<typename T>
1083 status_t Parcel::readParcelableVector(std::optional<std::vector<std::optional<T>>>* val) const {
1096 using NullableT = std::optional<T>;
1106 template<typename T>
1107 status_t Parcel::readParcelableVector(std::unique_ptr<std::vector<std::unique_ptr<T>>>* val) const {
1118 val->reset(new std::vector<std::unique_ptr<T>>());
1120 using NullableT = std::unique_ptr<T>;
1130 template<typename T>
1131 status_t Parcel::readParcelable(std::optional<T>* parcelable) const {
1153 template<typename T>
1154 status_t Parcel::readParcelable(std::unique_ptr<T>* parcelable) const {
1165 parcelable->reset(new T());
1176 template<typename T>
1177 status_t Parcel::writeNullableParcelable(const std::optional<T>& parcelable) {
1181 template<typename T>
1182 status_t Parcel::writeNullableParcelable(const std::unique_ptr<T>& parcelable) {
1186 template<typename T>
1187 status_t Parcel::writeParcelableVector(const std::vector<T>& val) {
1188 return unsafeWriteTypedVector<T,const Parcelable&>(val, &Parcel::writeParcelable);
1191 template<typename T>
1192 status_t Parcel::writeParcelableVector(const std::optional<std::vector<std::optional<T>>>& val) {
1197 using NullableT = std::optional<T>;
1201 template<typename T>
1202 status_t Parcel::writeParcelableVector(const std::unique_ptr<std::vector<std::unique_ptr<T>>>& val) {
1207 return unsafeWriteTypedVector(*val, &Parcel::writeNullableParcelable<T>);
1210 template<typename T>
1211 status_t Parcel::writeParcelableVector(const std::shared_ptr<std::vector<std::unique_ptr<T>>>& val) {
1216 using NullableT = std::unique_ptr<T>;
1220 template<typename T, std::enable_if_t<std::is_same_v<typename std::underlying_type_t<T>,int32_t>, bool>>
1221 status_t Parcel::writeEnum(const T& val) {
1224 template<typename T, std::enable_if_t<std::is_same_v<typename std::underlying_type_t<T>,int64_t>, bool>>
1225 status_t Parcel::writeEnum(const T& val) {
1229 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1230 status_t Parcel::writeEnumVector(const std::vector<T>& val) {
1233 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1234 status_t Parcel::writeEnumVector(const std::optional<std::vector<T>>& val) {
1238 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1239 status_t Parcel::writeEnumVector(const std::unique_ptr<std::vector<T>>& val) {
1243 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1244 status_t Parcel::writeEnumVector(const std::vector<T>& val) {
1247 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1248 status_t Parcel::writeEnumVector(const std::optional<std::vector<T>>& val) {
1251 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1252 status_t Parcel::writeEnumVector(const std::unique_ptr<std::vector<T>>& val) {
1256 template<typename T, std::enable_if_t<std::is_same_v<typename std::underlying_type_t<T>,int32_t>, bool>>
1257 status_t Parcel::readEnum(T* pArg) const {
1260 template<typename T, std::enable_if_t<std::is_same_v<typename std::underlying_type_t<T>,int64_t>, bool>>
1261 status_t Parcel::readEnum(T* pArg) const {
1265 template<typename T>
1266 inline status_t Parcel::readByteVectorInternal(std::vector<T>* val, size_t size) const {
1269 const T* data = reinterpret_cast<const T*>(readInplace(size));
1276 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1277 status_t Parcel::readEnumVector(std::vector<T>* val) const {
1282 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1283 status_t Parcel::readEnumVector(std::optional<std::vector<T>>* val) const {
1293 template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1294 status_t Parcel::readEnumVector(std::unique_ptr<std::vector<T>>* val) const {
1304 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1305 status_t Parcel::readEnumVector(std::vector<T>* val) const {
1308 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1309 status_t Parcel::readEnumVector(std::optional<std::vector<T>>* val) const {
1312 template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlying_type_t<T>,int8_t>, bool>>
1313 status_t Parcel::readEnumVector(std::unique_ptr<std::vector<T>>* val) const {