usbdmx.com Home of the opto isolated, bus powered, DMX512 interface with both in and out universes. Cheap and simple to build. USBDMX logo

LOFileManager Class Reference

The File Manager is responsible for all LightsOn files. More...

#import <LOFileManager.h>


Public Member Functions

(id) - delegate
 Get the current delegate.
(void) - setDelegate:
 Set a new delegate object.
(BOOL) - saveChannelManagerAtPath:
 Save the channel manager configuration file.
(BOOL) - saveShowAtPath:
 Save the entire show as a file.
(BOOL) - loadChannelManagerFromPath:
 Load the channel manager configuration from a file.
(BOOL) - loadShowFromPath:
 Load the show from a file.
(NSString *) - replaceHWBridge:
 Called when loading a channel manager file if the required brige is not currently plugged into the system.

Static Public Member Functions

(LOFileManager *) + defaultManager
 Get the default File manager for the application.

Protected Attributes

id delegate
 A delegate to allow customisation of confirms etc.
NSError * fixtureError
 Hold any fixture parsing errors from the delegate.
NSMutableDictionary * renamedFixtures
 Hold mappings for renamed fixtures during a show load.


Detailed Description

The File Manager is responsible for all LightsOn files.

e.g. configuration files and show files.

See also:
NSObject(LOFileManagerDelegate) in LOFileManager.h

Member Function Documentation

+ (LOFileManager *) defaultManager  

Get the default File manager for the application.

This is the only way that a file manager should be obtained.

Returns:
The current applications default file manager

- (id) delegate  

Get the current delegate.

Returns:
The delegate object
See also:
- setDelegate:

NSObject(LOFileManagerDelegate) in LOFileManager.h

- (BOOL) loadChannelManagerFromPath: (NSString *)  thePath  

Load the channel manager configuration from a file.

The file can either be a show file, or a channel manager file

Parameters:
thePath The path to the file to load
Returns:
YES if the file was configuration was loaded

- (BOOL) loadShowFromPath: (NSString *)  thePath  

Load the show from a file.

Parameters:
thePath The path to the file to load
Returns:
YES if the file was configuration was loaded

- (NSString *) replaceHWBridge: (NSString *)  serial  

Called when loading a channel manager file if the required brige is not currently plugged into the system.

This method responds with the bridge to use.

Its main task is to call the delgate method of the same name so that application can decide what to do.

Parameters:
serial The serial number of the missing bridge
Returns:
A serial number of a bridge to use, or nil for a dummy

- (BOOL) saveChannelManagerAtPath: (NSString *)  thePath  

Save the channel manager configuration file.

Parameters:
thePath The path (including file name) where the file should be saved
Returns:
YES if the files was saved

- (BOOL) saveShowAtPath: (NSString *)  thePath  

Save the entire show as a file.

Parameters:
thePath The path (including file name) where the file should be saved
Returns:
YES if the files was saved

- (void) setDelegate: (id)  aDelegate  

Set a new delegate object.

Parameters:
aDelegate The object to receive all delegate messages
See also:
delegate:

NSObject(LOFileManagerDelegate) in LOFileManager.h


The documentation for this class was generated from the following files: