Adun  0.83
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes
ULTemplate Class Reference

#import <ULTemplate.h>

Inheritance diagram for ULTemplate:
Inheritance graph
Collaboration diagram for ULTemplate:
Collaboration graph

List of all members.

Public Member Functions

(id) - initWithObjectTemplates:
(id) - initWithCoreRepresentation:
(NSMutableDictionary *) - coreRepresentation
(NSDictionary *) - objectTemplates
(NSDictionary *) - objectTemplatesInSection:
(NSDictionary *) - objectTemplateWithName:
(NSDictionary *) - objectTemplatesOfClass:
(NSArray *) - externalReferences
(NSDictionary *) - externalReferenceTypes
(void) - setValues:forObjectTemplateWithName:
(NSDictionary *) - valuesForObjectTemplateWithName:
(BOOL) - validateTemplate:
- Public Member Functions inherited from AdModelObject
(BOOL) - archiveToDirectory:
(BOOL) - archiveToFile:
(NSString *) - identification
(NSString *) - archivePathExtension
(id) - creator
(id) - created
(NSString *) - name
(NSString *) - type
(id) - keywords
(NSDictionary *) - reference
(NSString *) - database
(NSString *) - schema
(NSDictionary *) - properties
(NSDictionary *) - systemMetadata
(NSDictionary *) - userMetadata
(NSDictionary *) - metadata
(NSDictionary *) - combinedMetadata
(NSDictionary *) - allMetadata
(id) - valueForMetadataKey:
(void) - setValue:forMetadataKey:
(void) - setValue:forMetadataKey:inDomain:
(void) - removeMetadataKey:
(AdMetadataDomain- domainForMetadataKey:
(void) - setDomain:forMetadataKey:
(void) - updateMetadata:
(void) - updateMetadata:inDomains:
(id) - valueForVolatileMetadataKey:
(void) - setValue:forVolatileMetadataKey:
(void) - removeVolatileMetadataKey:
(NSArray *) - inputReferencesToObjectsOfClass:
(NSArray *) - inputReferences
(void) - addInputReference:
(void) - addInputReferenceToObject:
(void) - addInputReferenceToObjectWithID:ofType:
(void) - removeInputReferenceToObject:
(void) - removeInputReferenceToObjectWithID:ofType:
(NSArray *) - outputReferencesToObjectsOfClass:
(NSArray *) - outputReferences
(void) - addOutputReferenceToObject:
(void) - addOutputReferenceToObjectWithID:ofType:
(void) - removeOutputReferenceToObject:
(void) - removeOutputReferenceToObjectWithID:ofType:
(void) - removeOutputReferenceToObjectWithID:
(void) - removeAllOutputReferences
(void) - copyMetadataInDomains:fromObject:
(void) - copyInputReferencesFromObject:
(void) - copyOutputReferencesFromObject:

Static Public Member Functions

(NSArray *) + systemObjectTemplates
(NSArray *) + forceFieldObjectTemplates
(NSArray *) + configurationGenerationObjectTemplates
(NSArray *) + controllerTemplates
(NSArray *) + allObjectTemplates
(NSArray *) + miscellaneousObjectTemplates
- Static Public Member Functions inherited from AdModelObject
(id) + unarchiveFromFile:

Protected Attributes

NSMutableDictionary * objectTemplates

Detailed Description

ULTemplate instances represent a certain configuration of the AdunCore simulator. In this case "configuration" is analogous to a UML state diagram of a simulation process. Hence "configuration" only refers to the objects that make up the simulator and their relationships - object attribute values are not considered when deciding template equality. ULTemplates objects also contain some general input options for simulations process e.g. checkpointing, metadata etc.

At any time the current state of the template can be retrieved as a property list object which can be used as the input to a AdunCore simulation run. ULTemplate instances are immutable - their configuration is set on initialisation and cannot be changed afterwards. The ULMutableTemplate subclass allows configuration editing.

Template Sections

There are three main parts in a simulation process - system, force field & configuration generator - and each of these parts can contain many components. In addition to these known sections a template instance can containing specifications for an arbitrary number of other objects if desired.

Notes: ULTemplate class contains information on the objects that can be added to the template along with how they are categorised. Controllers read dynamically on startup. Knows restrictions on object composition i,e, type restrictions. Kept in a file a read on call to inititialize. Automatically adds systems to an AdSystemCollection and forcefields to an AdForceField collection. Knows about simulator components and custom force field terms.

Member Function Documentation

+ (NSArray *) allObjectTemplates

Returns an array containing the templates for all available objects.

+ (NSArray *) configurationGenerationObjectTemplates

Returns an array containing templates for all configuration generation components

+ (NSArray *) controllerTemplates

Returns an array containing templates for all available controllers

- (NSMutableDictionary *) coreRepresentation

Returns a representation of the template as a dictionary which can be used as the input to AdunCore.

- (NSArray*) externalReferences

Returns the external references. An external reference is a when a value for a template option, whose type is not a property list object , does not refer to the any other template in the receiver.

- (NSDictionary*) externalReferenceTypes

Returns a dictionary containing name:type pairs for the current external references.

+ (NSArray *) forceFieldObjectTemplates

Returns an array containing templates for all force field components

- (id) initWithCoreRepresentation: (NSDictionary*)  aDict

Initialises a new template with the dictionary representation of a previous template

Initialises a new template with the core representation of a previous template

- (id) initWithObjectTemplates: (NSDictionary*)  templates

Initialises a new ULTemplate instance using the templates and names in templates. Designated initialiser.

+ (NSArray *) miscellaneousObjectTemplates

Returns an array containing templates for all miscellaneous components.

- (NSDictionary*) objectTemplates

Returns a dictionary containing all the object templates the template contains

- (NSDictionary *) objectTemplatesInSection: (NSString*)  aString

Returns a dictionary containing all the object templates assigned to a given section

- (NSDictionary *) objectTemplatesOfClass: (NSString*)  className

Returns all the object templates of a given class

- (NSDictionary *) objectTemplateWithName: (NSString*)  aString

Returns the object template corresponding to name or nil if there is none.

- (void) setValues: (NSDictionary*)  aDictionary
forObjectTemplateWithName: (NSString*)  name 

Sets the value for the object template associated with name to those in aDictionary

+ (NSArray *) systemObjectTemplates

Returns an array containing templates for all system components

- (BOOL) validateTemplate: (NSError**)  error

Validates the template.

- (NSDictionary *) valuesForObjectTemplateWithName: (NSString*)  name

Returns the values for the object template associated with name

Member Data Documentation

- (NSDictionary *) objectTemplates

Returns a dictionary containing all the object templates the template contains