U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » Can I extend the Serialization to other types?
Re: Can I extend the Serialization to other types? [message #10744 is a reply to message #10743] Fri, 27 July 2007 11:07 Go to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
template <>
inline Stream& operator%(Stream& s, FooType& x)
{
        int n = x;
        s % n;
        x = (FooType)n;
	return s;
}


If FooType is a struct or class, the easier way is to provide Serialize(Stream& s) method for it.
 
Read Message
Read Message
Previous Topic: How to do interation on Vector<String>
Next Topic: best way to parse XML/svg/html style kind attribute pairs?
Goto Forum:
  


Current Time: Sun Oct 04 07:17:08 GMT+2 2026

Total time taken to generate the page: 0.00543 seconds