MBMLEnvironmentFunctions Class Reference
Inherits from | NSObject |
---|---|
Declared in | MBMLEnvironmentFunctions.h |
Overview
This class implements MBML functions for accessing Mockingbird runtime environment information.
These functions are exposed to the Mockingbird environment via
<Function ... />
declarations in the MBDataEnvironmentModule.xml
file.
For more information on MBML functions, see the MBMLFunction
class.
+ mbmlLoadedPaths
Returns an array of the full pathnames of the MBML files that have been loaded into the current Mockingbird environment.
+ (NSArray *)mbmlLoadedPaths
Return Value
An array containing the paths of the files that have been loaded into the current environment.
Discussion
This Mockingbird function accepts no parameters.
Expression usage
The expression:
^mbmlLoadedPaths()
returns an array containing the full pathnames of the files that have already been loaded.
Declared In
MBMLEnvironmentFunctions.h
+ mbmlLoadedFiles
Returns an array of the names (i.e., the lastPathComponent
s of the file
paths) for the files that have been loaded into the current Mockingbird
environment.
+ (NSArray *)mbmlLoadedFiles
Return Value
An array containing the names of the files that have been loaded into the current environment.
Discussion
This Mockingbird function accepts no parameters.
Expression usage
The expression:
^mbmlLoadedFiles()
returns an array containing the file names of the files that have already been loaded.
Declared In
MBMLEnvironmentFunctions.h
+ mbmlPathIsLoaded:
Determines whether an MBML file with the given pathname has been loaded into the current Mockingbird environment.
+ (NSNumber *)mbmlPathIsLoaded:(NSString *)pathName
Parameters
pathName |
The full pathname of the file. |
---|
Return Value
@YES
if the specified file has been loaded into the current
environment, @NO
otherwise.
Discussion
This Mockingbird function accepts a single parameter: a string expression yielding the full path of the file being tested.
Expression usage
Assume $path
evaluates to the full file path of the initial manifest.xml
file. The expression:
^mbmlPathIsLoaded($path)
would return @YES
if the path represented by the expression $path
has already been loaded.
Declared In
MBMLEnvironmentFunctions.h
+ mbmlFileIsLoaded:
Determines whether a given MBML file has been loaded into the current Mockingbird environment.
+ (NSNumber *)mbmlFileIsLoaded:(NSString *)fileName
Parameters
fileName |
The name of the file. |
---|
Return Value
@YES
if the specified file has been loaded into the current
environment, @NO
otherwise.
Discussion
This Mockingbird function accepts a single parameter: a string expression
yielding the file name (i.e., the lastPathComponent
) of the file being
tested.
Expression usage
The expression:
^mbmlFileIsLoaded(manifest.xml)
would return a boolean YES
if any file named manifest.xml
(at any path)
has already been loaded.
Declared In
MBMLEnvironmentFunctions.h