company logo

GlobalVariable :: refresh - Get global variable

Global variables are defined as elementary values, instances or collections. Usually, global variables can be created/allocated by calling create() or from within OSI expressions. Since global variables might be changed from different places, it may become necessary to refresh the global variable in order to get the current value.

Calling refresh() becomes necessary, when a global variable has been recreated, i.e. when a new property handle has been set for the global variable somewhere in the application (create()).

The global variable remains invalid, when the variable has not yet been defined.

// fragment

  GlobalVariable  userName("UserName");

  // ...

  if ( !userName.isValid() )

    userName.refresh();

Return value:   - internal feature (not documented) ( odaba::GlobalVariable & )

Implementation details