Changes between Version 6 and Version 7 of code/howto/Synchronisable
- Timestamp:
- Sep 25, 2008, 10:04:00 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/howto/Synchronisable
v6 v7 6 6 See also [wiki:network/Synchronisable Synchronisable reference] for more information. 7 7 == Basic steps == 8 '''This only applies to classes that don't inherit from a class that (indirectly) inherits from Synchronisable! ''' 9 For classes that indirectly inherit from Synchronisable see [wiki:howto/Synchronisable#indirect below] 8 10 1. Include the appropriate header file: 9 11 {{{ … … 92 94 93 95 94 } 96 }; 95 97 96 98 }}} 99 100 == Example class that inherits indirectly from Synchronisable == #indirect 101 These kind of classes only have to do some steps: 102 {{{ 103 class ABC: public XYZ { 104 private: 105 int someInt_; 106 registerAllVariables(){ REGISTER_DATA(someInt_); } 107 public: 108 ABC(){ 109 someInt_=0; 110 registerAllVariables(); 111 } 112 ~ABC(); 113 bool create(){ 114 if(!XZY::create()) 115 return false; 116 // do something here ... 117 return true; 118 } 119 }; 120 121 }}}