48 template<
typename TDataType>
49 uint32_t streamify(
const char*,
const TDataType& inType )
51 return mArray->write( inType );
54 uint32_t streamify(
const char*,
const char*& inType )
56 PX_ASSERT( inType != NULL );
57 uint32_t len(
static_cast<uint32_t
>( strlen( inType ) ) );
59 uint32_t writtenSize = 0;
60 writtenSize = mArray->write(len);
61 writtenSize += mArray->write(inType, len);
65 uint32_t streamify(
const char*,
const uint8_t* inData, uint32_t len )
67 uint32_t writtenSize = mArray->write(len);
69 writtenSize += mArray->write(inData, len);
73 uint32_t streamify(
const char* nm,
const uint64_t& inType, EventStreamCompressionFlags::Enum inFlags )
75 uint32_t writtenSize = 0;
78 case EventStreamCompressionFlags::U8:
79 writtenSize = streamify(nm,
static_cast<uint8_t
>(inType));
81 case EventStreamCompressionFlags::U16:
82 writtenSize = streamify(nm,
static_cast<uint16_t
>(inType));
84 case EventStreamCompressionFlags::U32:
85 writtenSize = streamify(nm,
static_cast<uint32_t
>(inType));
87 case EventStreamCompressionFlags::U64:
88 writtenSize = streamify(nm, inType);
94 uint32_t streamify(
const char* nm,
const uint32_t& inType, EventStreamCompressionFlags::Enum inFlags )
96 uint32_t writtenSize = 0;
99 case EventStreamCompressionFlags::U8:
100 writtenSize = streamify(nm,
static_cast<uint8_t
>(inType));
102 case EventStreamCompressionFlags::U16:
103 writtenSize = streamify(nm,
static_cast<uint16_t
>(inType));
105 case EventStreamCompressionFlags::U32:
106 case EventStreamCompressionFlags::U64:
107 writtenSize = streamify(nm, inType);
121 const uint8_t* mData;
127 , mLength( inLength )
134 bool val() {
return TSwapBytes; }
136 uint32_t streamify(
const char* , uint8_t& inType )
138 uint8_t* theData =
reinterpret_cast<uint8_t*
>( &inType );
139 if ( mFail ||
sizeof( inType ) > mLength )
146 for( uint32_t idx = 0; idx <
sizeof( uint8_t ); ++idx, ++mData, --mLength )
147 theData[idx] = *mData;
153 template<
typename TDataType>
154 uint32_t streamify(
const char* , TDataType& inType )
156 uint8_t* theData =
reinterpret_cast<uint8_t*
>( &inType );
157 if ( mFail ||
sizeof( inType ) > mLength )
164 for( uint32_t idx = 0; idx <
sizeof( TDataType ); ++idx, ++mData, --mLength )
165 theData[idx] = *mData;
168 BlockParseFunctions::swapBytes<sizeof(TDataType)>( theData );
173 uint32_t streamify(
const char*,
const char*& inType )
176 streamify(
"", theLen );
177 theLen =
PxMin( theLen, mLength );
178 inType =
reinterpret_cast<const char*
>( mData );
184 uint32_t streamify(
const char*,
const uint8_t*& inData, uint32_t& len )
187 streamify(
"", theLen );
188 theLen =
PxMin( theLen, mLength );
190 inData =
reinterpret_cast<const uint8_t*
>( mData );
196 uint32_t streamify(
const char* nm, uint64_t& inType, EventStreamCompressionFlags::Enum inFlags )
200 case EventStreamCompressionFlags::U8:
203 streamify( nm, val );
207 case EventStreamCompressionFlags::U16:
210 streamify( nm, val );
214 case EventStreamCompressionFlags::U32:
217 streamify( nm, val );
221 case EventStreamCompressionFlags::U64:
222 streamify( nm, inType );
228 uint32_t streamify(
const char* nm, uint32_t& inType, EventStreamCompressionFlags::Enum inFlags )
232 case EventStreamCompressionFlags::U8:
235 streamify( nm, val );
239 case EventStreamCompressionFlags::U16:
242 streamify( nm, val );
246 case EventStreamCompressionFlags::U32:
247 case EventStreamCompressionFlags::U64:
248 streamify( nm, inType );
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_CUDA_CALLABLE PX_FORCE_INLINE T PxMin(T a, T b)
The return value is the lesser of the two specified values.
Definition PxMath.h:88