Lines Matching refs:T
61 template<typename T>
62 static void write(void*& buffer, size_t& size, const T& value) { in write()
63 *static_cast<T*>(buffer) = value; in write()
64 advance(buffer, size, sizeof(T)); in write()
68 template<typename T>
69 static void read(void const*& buffer, size_t& size, T& value) { in read()
70 value = *static_cast<T const*>(buffer); in read()
71 advance(buffer, size, sizeof(T)); in read()
82 template <typename T>
108 template<typename T>
109 inline size_t Flattenable<T>::getFlattenedSize() const { in getFlattenedSize()
110 return static_cast<T const*>(this)->T::getFlattenedSize(); in getFlattenedSize()
112 template<typename T>
113 inline size_t Flattenable<T>::getFdCount() const { in getFdCount()
114 return static_cast<T const*>(this)->T::getFdCount(); in getFdCount()
116 template<typename T>
117 inline status_t Flattenable<T>::flatten( in flatten()
119 return static_cast<T const*>(this)->T::flatten(buffer, size, fds, count); in flatten()
121 template<typename T>
122 inline status_t Flattenable<T>::unflatten( in unflatten()
124 return static_cast<T*>(this)->T::unflatten(buffer, size, fds, count); in unflatten()
133 template <typename T>
150 template <typename T>
151 inline bool LightFlattenable<T>::isFixedSize() const { in isFixedSize()
152 return static_cast<T const*>(this)->T::isFixedSize(); in isFixedSize()
154 template <typename T>
155 inline size_t LightFlattenable<T>::getFlattenedSize() const { in getFlattenedSize()
156 return static_cast<T const*>(this)->T::getFlattenedSize(); in getFlattenedSize()
158 template <typename T>
159 inline status_t LightFlattenable<T>::flatten(void* buffer, size_t size) const { in flatten()
160 return static_cast<T const*>(this)->T::flatten(buffer, size); in flatten()
162 template <typename T>
163 inline status_t LightFlattenable<T>::unflatten(void const* buffer, size_t size) { in unflatten()
164 return static_cast<T*>(this)->T::unflatten(buffer, size); in unflatten()
173 template <typename T>
174 class LightFlattenablePod : public LightFlattenable<T> {
181 return sizeof(T); in getFlattenedSize()
184 if (size < sizeof(T)) return NO_MEMORY; in flatten()
185 *reinterpret_cast<T*>(buffer) = *static_cast<T const*>(this); in flatten()
189 *static_cast<T*>(this) = *reinterpret_cast<T const*>(buffer); in unflatten()