Home / Data Monitor / Annex E
Page options

Annex E



By default, observers are triggered only when the value changes. If we are going to display something, this is typically the most efficient way.

But, there is a way to override this.

When a message comes in, the var will check if the value has changed (from its previous value). When there is a change it will call setDirty on observers. If not, it will call notDirty. The default behaviour of setDirty is to set a dirty flag, while the default behaviour to notDirty is to do nothing. To override this behavior:

void myshow::notDirty(mpt_var *var)

{

setDirty(var);

}


    Post a comment

    Your Name or E-mail ID (mandatory)

     

    Note: Your comment will be published after approval of the owner.

    No Attachments Found. Click here to upload new file.




     RSS of this page

    Author: paikkang   Version: 1.0   Last Edited By: Guest   Modified: 08 Apr 2009