Added +ecSetup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@38020 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2014-07-30 10:44:08 +00:00
parent 74cb75b1b1
commit 4573054ca2
3 changed files with 24 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2014-07-30 Richard Frith-Macdonald <rfm@gnu.org>
* EcProcess.h:
* EcProcess.m:
Added +ecSetup method to create/initialise the singleton instance.
2014-07-01 Richard Frith-Macdonald <rfm@gnu.org>
* Command.m:

View file

@ -417,6 +417,14 @@ extern NSString* cmdVersion(NSString *ver);
*/
+ (NSMutableDictionary*) ecInitialDefaults;
/** Convenience method to create the singleton EcProcess instance
* using the initial configuration provided by the +ecInitialDefaults
* method.<br />
* Raises NSGenericException if the singleton instance has already
* been created.
*/
+ (void) ecSetup;
/** Convenience method to produce a generic configuration alarm and send
* it via the -alarm: method.<br />
* The managed object may be nil (in which case it's the default managed object

View file

@ -1025,6 +1025,16 @@ findMode(NSDictionary* d, NSString* s)
count: 2];
}
+ (void) ecSetup
{
if (nil != EcProc)
{
[NSException raise: NSGenericException
format: @"+ecSetup called when EcProcess is already set up"];
}
[[self alloc] init];
}
- (void) _commandRemove
{
id connection = [cmdServer connectionForProxy];