Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 19, 2008, 1:36:13 AM (16 years ago)
Author:
landauf
Message:

added option "forceCallback" to updateData(…) in Synchronisable to get a callback when synchronizing a variable for the first time (even if it didn't changed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/network/Synchronisable.cc

    r1940 r1945  
    139139    COUT(3) << "fabricate objectID: " << no->objectID << " classID: " << no->classID << std::endl;
    140140          // update data and create object/entity...
    141     bool b = no->updateData(mem, mode);
     141    bool b = no->updateData(mem, mode, true);
    142142    assert(b);
    143143    b = no->create();
     
    297297   * @return true/false
    298298   */
    299   bool Synchronisable::updateData(uint8_t*& mem, int mode){
     299  bool Synchronisable::updateData(uint8_t*& mem, int mode, bool forceCallback){
    300300    if(mode==0x0)
    301301      mode=state_;
     
    349349      }
    350350      // call the callback function, if defined
    351       if(callback && (*i)->callback)
     351      if((callback || forceCallback) && (*i)->callback)
    352352        (*i)->callback->call();
    353353    }
Note: See TracChangeset for help on using the changeset viewer.