Changes between Version 3 and Version 4 of documentation/tutorials/Datagrid
- Timestamp:
- 01/08/08 15:12:15 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
documentation/tutorials/Datagrid
v3 v4 205 205 { 206 206 EMP::Core::Colourb ship_colour; 207 EMP TypeConverter< EMP::Core::String, EMP::Core::Colourb >::Convert(raw_data[0], ship_colour);207 EMP::Core::TypeConverter< EMP::Core::String, EMP::Core::Colourb >::Convert(raw_data[0], ship_colour); 208 208 209 209 EMP::Core::String colour_string(32, "%d,%d,%d", ship_colour.red, ship_colour.green, ship_colour.blue); 211 211 } 212 212 }}} 213 214 Be sure to include <EMP/Core/TypeConverter.h> at the top of your .cpp file. 213 215 214 216 Then to tie it all together we need to instance the formatter. It'll automatically add itself to the formatter database, so in the main.cpp we only have to include the .h file and construct an instance after Rocket is initialised.