As the developer of LoggingPackageSchema, you decide that you want to make the public and read-only features (excluding create and delete methods, which cannot be exported) of LogManager, Log, and LogTagDict available for other schemas to use.
To do this using packages
Define a package called Logging. Schemas can export multiple packages, but we only need one in this example.
Add the LogManager class to the Logging package. When you add this class, you can specify the features of the class that you want to export so that you define an exported LogManager class, as follows.
LogManager ( exportedPropertyDefinitions allLogs; exportedMethodDefinitions createLog; deleteLog; )
Note that only a subset of the LogManager implementation has been exported (create, delete, initialize, and finalize methods have not been exported). The exported LogManager class effectively provides an interface to services provided by the implementation LogManager class.
Add the Log class to the Logging package and specify the features to be exported, as shown in the following pseudo schema file.
Log ( exportedPropertyDefinitions appTag; fileName; logTag; exportedMethodDefinitions close; log; open; )
Again, only a subset of the Log class has been exported.
Add the LogTagDict class to the Logging package, as follows.
LogTagDict ( )
Specify the application that will be used at run time to initialize the package when it is opened (that is, when a process that uses the package is initiated) and to finalize the package when it is closed (that is, when the process terminates). When the package is opened, the
The Logging package is now ready to be imported for use in another schema.