Can you serialize CRunObjectType or CRunObject?

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Thu Aug 06, 2009 10:14 pm

can you serialize these or does it require information created each runtime?
Spriter Dev
B
97
S
21
G
12
Posts: 3,259
Reputation: 16,844

Post » Sat Aug 15, 2009 9:35 pm

They're pointers to classes which are created/destroyed every runtime, so they'll change.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun Aug 16, 2009 12:49 pm

You can't (and wouldn't want to) manually save the states of the CRunObject or CRunObjType classes themselves, but you can save pointers to them by using these VRuntime functions:

[code:3qpx6ba0] virtual void SerializeObjectPtr(CRunObject*& obj, bin& ar) = 0;
virtual void SerializeObjectType(CRunObjType*& pType, bin& ar) = 0;[/code:3qpx6ba0]
Scirra Founder
B
384
S
227
G
86
Posts: 24,139
Reputation: 190,761


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests