MBEnvironmentLoader Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | MBEnvironmentLoader.h |
Overview
Instances of the MBEnvironmentLoader class are used to parse MBML tags when
loading an MBEnvironment.
For example, the MBVariableSpace class is an MBEnvironmentLoader, because
MBVariableSpace is capable of populating itself with variables based on the
contents of an MBML file.
Functionality can also be added to the Mockingbird Data Environment
through the use of MBModules. A module implementation has the option of
providing additional MBEnvironmentLoaders to use during the environment
loading process. This allows new MBML tags to be introduced without
needing to modify the code of the Mockingbird Data Environment itself.
See the documentation for the MBEnvironment class for more information
on extending the Mockingbird Data Environment using modules.
Properties
isActive
Returns YES if the receiver is associated with the active environment.
@property (nonatomic, readonly) BOOL isActiveDeclared In
MBEnvironmentLoader.h
MBML parsing
– acceptedTagNames
Returns the names of the XML tags accepted by the receiver.
- (nonnull NSArray *)acceptedTagNamesDeclared In
MBEnvironmentLoader.h
– parseElement:forMatch:
Asks the receiver to parse MBML represented by the passed-in XML element.
- (BOOL)parseElement:(nonnull RXMLElement *)mbml forMatch:(nonnull NSString *)matchParameters
mbml |
The MBML element. |
|---|---|
match |
The criterion that caused the match. Normally this is the
XML tag name, but in the case of a wildcard match, it will be “ |
Return Value
YES if the element was recognized and successfully parsed; NO otherwise.
Discussion
This method must be implemented by subclasses.
Declared In
MBEnvironmentLoader.h
Environment state changes
– environmentWillLoad:
Called to notify the receiver the receiver that the environment loading is about to begin.
- (void)environmentWillLoad:(nonnull MBEnvironment *)envParameters
env |
The |
|---|
Discussion
Subclasses that override this method must call super.
Declared In
MBEnvironmentLoader.h
– environmentDidLoad:
Called to notify the receiver that the environment loading has finished.
- (void)environmentDidLoad:(nonnull MBEnvironment *)envParameters
env |
The |
|---|
Discussion
Subclasses that override this method must call super.
Declared In
MBEnvironmentLoader.h
– environmentLoadFailed:
Called to notify the receiver that the environment loading was stopped due to an error.
- (void)environmentLoadFailed:(nonnull MBEnvironment *)envParameters
env |
The |
|---|
Discussion
Subclasses that override this method must call super.
Declared In
MBEnvironmentLoader.h
– environmentWillActivate:
Called to notify the receiver that the environment is about to become active.
- (void)environmentWillActivate:(nonnull MBEnvironment *)envParameters
env |
The |
|---|
Discussion
Subclasses that override this method must call super.
Declared In
MBEnvironmentLoader.h
– environmentDidActivate:
Called to notify the receiver that the environment became active.
- (void)environmentDidActivate:(nonnull MBEnvironment *)envParameters
env |
The |
|---|
Discussion
Subclasses that override this method must call super.
Declared In
MBEnvironmentLoader.h
– environmentWillDeactivate:
Called to notify the receiver that the environment is about to be deactived.
- (void)environmentWillDeactivate:(nonnull MBEnvironment *)envParameters
env |
The |
|---|
Discussion
Subclasses that override this method must call super.
Declared In
MBEnvironmentLoader.h
– environmentDidDeactivate:
Called to notify the receiver that the environment was deactived.
- (void)environmentDidDeactivate:(nonnull MBEnvironment *)envParameters
env |
The |
|---|
Discussion
Subclasses that override this method must call super.
Declared In
MBEnvironmentLoader.h