Documentation Set for Swarm 2.2
Prev | Reference VI. Simtools Library | Next

# ObjectLoader [Deprecated]

## Name

ObjectLoader -- A class to load an object's instance variables from a file.

## Description

Deprecated: Use the Archiver protocol in the defobj library as a replacement for this ad-hoc format

This class is used to initialize the variables of a target object from a data file. The data file is required to have a very simple format.

## Protocols adopted by ObjectLoader

SwarmObject CREATABLE

## Methods

### Phase: Creating

- + load: anObject fromAppDataFileNamed: (const char *)aFileName
  The load:fromAppConfigFileNamed: method loads anObject from th application-specific data file named aFileName. The ObjectLoader class will open the file, initialize the object with its contents and then close the file.

- + load: anObject fromAppConfigFileNamed: (const char *)aFileName
  The load:fromAppConfigFileNamed: method loads anObject from th application-specific configuration file named aFileName. The ObjectLoader class will open the file, initialize the object with its contents and then close the file.

- + load: anObject fromFileNamed: (const char *)aFileName
  The load:fromFileNamed: method loads anObject from the file named aFileName. The ObjectLoader class will open the file, initialize the object with its contents and then close the file.

- + load: anObject from: aFileObject
  The load:from: method loads anObject from the previously opened aFileObject without returning an actual instance of the ObjectLoader class. The FileObject remains open after the method has been called.

### Phase: Setting

- - setTemplateProbeMap: (id <ProbeMap>)probeMap
  The setTemplateProbeMap: method is used to specify which variables of the target object(s) should be loaded by the ObjectLoader instance to which this message was sent.

- - setFileObject: aFileObject
  The setFileObject: method sets the source fileObject which the instance of the ObjectLoader class should use by sending it this message.

### Phase: Using

- - updateCache: exampleTarget
  The updateCache: method should be called if an ObjectLoader instance is going to initialize a large number of objects from the same class.

- - loadObject: anObject
  The loadObject: message must be sent to an instance of the ObjectLoader class in order to initialize the target object from the requested file.

Prev | Home | Next
NSelect | Up | ObjectSaver [Deprecated]