02.05.2014 Views

Making custom domain objects RPT-enabled - Ocean - Schlumberger

Making custom domain objects RPT-enabled - Ocean - Schlumberger

Making custom domain objects RPT-enabled - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

public Droid Droid<br />

{<br />

get { return this.objectDroid; }<br />

}<br />

}<br />

With the implementation above, each XYZObject instance will have a unique identifier (Droid). This<br />

Droid is the key for saving this XYZObject in its CustomDataSource, which will be kept together<br />

with other data sources in the Petrel project DataManager.<br />

Figure 2: Schematic of the <strong>Ocean</strong> approach to serialization<br />

3. Implementing a <strong>custom</strong> data source<br />

To implement the <strong>custom</strong> data source, three steps must be followed.<br />

1) 1. Implementation of a data source factory, by extending DataSourceFactory, like in the example<br />

below:<br />

class CustomDSFactory : DataSourceFactory<br />

{<br />

(…)<br />

public override IDataSource GetDataSource()<br />

<strong>Ocean</strong> Developer Best Practices: <strong>Ocean</strong> for Petrel framework Page 3 of 9<br />

Submitted by the developer community<br />

*Mark of <strong>Schlumberger</strong>. Other company, product, and service names are the properties of their respective owners. Copyright © 2011<br />

<strong>Schlumberger</strong>. All rights reserved.

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

Saved successfully!

Ooh no, something went wrong!