03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RStoreWriteStream stream;<br />

TStreamId id = stream.CreateLC(aStore);<br />

iEngine->ExternalizeL(stream);<br />

ExternalizeL(stream);<br />

stream.CommitL();<br />

CleanupStack::PopAndDestroy(); // stream<br />

return id;<br />

}<br />

The idea here is to create a stream, write both the engine and any controller data to it, and<br />

then close the stream. Symbian OS programs conventionally calls functions that write an<br />

object's data to a stream ExternalizeL().<br />

The engine's ExternalizeL() function looks like this:<br />

void CGameEngine::ExternalizeL(RWriteStream& aStream) const<br />

{<br />

aStream

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!