下面是三个interface:
*----------------------------------------------------------------------*
* INCLUDE ZBOBO_DP_002_CL_IF *
*----------------------------------------------------------------------*
*Interface definition.
*Interface for observer which just have one method, update()
interface observer.
methods:
* When the subject's data changed, it will update observer's data
update importing temp type f
hum type f
pre type f.
endinterface.
*Interface for subject which used to operating observers
interface subject.
methods:
* Register observer to subject
register_observer importing o type ref to observer,
* Delete observer in subject
remove_observer importing o type ref to observer,
* Notify observer that the status or data changed
notify_observer.
endinterface.
*Interface for display data
interface display_element.
methods:
* When data changed in subject, the observers could
* call this behavior to display data after they receive
* the changed data
display.
endinterface.
* INCLUDE ZBOBO_DP_002_CL_IF *
*----------------------------------------------------------------------*
*Interface definition.
*Interface for observer which just have one method, update()
interface observer.
methods:
* When the subject's data changed, it will update observer's data
update importing temp type f
hum type f
pre type f.
endinterface.
*Interface for subject which used to operating observers
interface subject.
methods:
* Register observer to subject
register_observer importing o type ref to observer,
* Delete observer in subject
remove_observer importing o type ref to observer,
* Notify observer that the status or data changed
notify_observer.
endinterface.
*Interface for display data
interface display_element.
methods:
* When data changed in subject, the observers could
* call this behavior to display data after they receive
* the changed data
display.
endinterface.