CTR Pia  4.11.3
Game Communication Engine
nn::pia::clone::ReverseSerializePolicy< Type_ > Class Template Reference

Reverses the byte order of the source data and then serializes it. More...

Public Types

typedef Type_ Type
 Defines the type of the data to be serialized.
 

Detailed Description

template<typename Type_>
class nn::pia::clone::ReverseSerializePolicy< Type_ >

Reverses the byte order of the source data and then serializes it.

Template Parameters
Type_Specifies the type of the data to be serialized.

This class is only implemented for the following types: u8, s8, u16, s16, u32, s32, u64, s64, f32, and f64. To use this class with a type, you must implement a Reverse function corresponding to that type.

For example:

struct Val
{
u32 a;
f32 b;
};

You would implement this type as follows.

template<> void ReverseSerializePolicy<Val>::Reverse(Val* pTo, const Val* cpFrom)
{
ReverseValue(&pTo->a, &cpFrom->a);
ReverseValue(&pTo->b, &cpFrom->b);
}


Revision History:
2013-07-18 Initial version.