Authors
- David Chisnall
-
- Declared in:
- ETDeserializerBackend.h
- Conforms to:
- NSObject
The ETDeserializerBackend protocol is a formal protocol
that must be implemented by deserializer backends.
Method summary
- (char*)
classNameOfPrincipalObject;
Return the name of the class containing the
principle object as a C string.
- (BOOL)
deserializeData: (char*)obj
withTypeChar: (char)type;
Handle the deserialization of data identified by an
unknown type. TODO: Probably make it a
delegate method of the backend.
- (BOOL)
deserializeFromData: (
NSData*)aData;
Use the specified data when reading objects to
deserialize. Returns YES
if
aData contains contains serialized object
data in a format understood by the backend.
- (BOOL)
deserializeFromStore: (id)store;
Use the specified store as the data source.
Returns YES
if the store is
of a supported type and can be used for deserialization,
NO
otherwise.
- (BOOL)
deserializeObjectWithID: (
CORef)aReference;
Load the specified object. Objects are stored with a
unique ID within the object graph.
- (BOOL)
deserializePrincipalObject;
Load the principal object of the stored object graph.
- (
CORef)
principalObject;
Return the reference of the principle object in the
serialized object graph.
- (BOOL)
setBranch: (
NSString*)aBranch;
Set the branch from which to deserialize.
- (void)
setDeserializer: (id)aDeserializer;
Specify the deserializer to use. When
deserializeObjectWithID: is called
on the backend, it will call methods in this
deserializer to actually perform the
deserialization.
- (int)
setVersion: (int)aVersion;
Jump to the specified version. Returns -1 if the
specified version does not exist, otherwise
returns the requested version.