02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Units<br />

unit catalogs, systems, and events (Fig. 4-12 on page 4-202). The product family is<br />

responsible for implementing the IUnitServiceSettings interface.<br />

Application<br />

Units Service<br />

Units Settings<br />

Catalog<br />

Catalog<br />

Catalog<br />

UI System<br />

Invariant System<br />

Current<br />

Catalog<br />

Fig. 4-12 Unit Service and Unit Settings<br />

Locating the Unit Service and Unit Service Settings<br />

The application gets the service and settings from the <strong>Ocean</strong> Core and then uses them for<br />

subsequent unit service operations. This discussion will start with the service and settings<br />

initialized and registered through the IModule Initialize method of the module<br />

lifecycle. It is the responsibility of the product family to initialize and register the service<br />

and settings with the <strong>Ocean</strong> Core. Access to them is provided through the GetService<br />

method of the <strong>Ocean</strong> Core.<br />

// Find the unit service.<br />

IUnitService us = CoreSystem.GetService();<br />

// Find the unit service settings.<br />

IUnitServiceSettings uss;<br />

uss = CoreSystem.GetService();<br />

The IUnitService interface accesses the available unit catalogs. You can get a specific<br />

catalog by name, the current default catalog, or a list of all available catalogs. In <strong>Ocean</strong><br />

2006 there is exactly one catalog available and it is called “<strong>Ocean</strong>”. Therefore all requests<br />

will return the same catalog.<br />

4-202 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!