home *** CD-ROM | disk | FTP | other *** search
/ Game Programming in C++ - Start to Finish / GameProgrammingS.iso / developer_install / ReplicaNetFreewareV5_4.exe / data1.cab / Program_Executable_Files / Example6 / AnObject.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-30  |  1.1 KB  |  40 lines

  1. /* START_LICENSE_HEADER
  2.  
  3. Copyright (C) 2000 Martin Piper, original design and program code
  4. Copyright (C) 2001-2005 Replica Software
  5.  
  6. This program file is copyright (C) Replica Software and can only be used under license.
  7. For more information visit: http://www.replicanet.com/
  8. Or email: info@replicanet.com
  9.  
  10. END_LICENSE_HEADER */
  11. #include "AnObject.h"
  12. using namespace RNReplicaNet;
  13.  
  14. AnObject::AnObject()
  15. {
  16.     mWatchedValue.SetValue(0);
  17.     mWatchedValueSelfRegister.SetValue(0);
  18.     mAnIntValue = 0;
  19.  
  20.     // Register the extended DataBlock variable with ReplicaNet without using ROL.
  21.     AddAutoRegisterDataBlock(&mWatchedValueSelfRegister);
  22.  
  23.     // This function call on the DataBlock uses the ReplicaObject pointer to pre-register the three datablocks used for the three vector components.
  24.     mVector.AddAutoRegisterDataBlock(this);
  25.  
  26.     mDataBlockList.SetIsAllocated(false);
  27.     // This ensures that any changes in this STL list are done in order
  28.     mDataBlockList.RegisterInClassPointer(&mList);
  29. //    AddAutoRegisterDataBlock(&mDataBlockList);
  30. }
  31.  
  32. AnObject::~AnObject()
  33. {
  34. }
  35.  
  36. void AnObject::UserRegisterDataBlocks(void)
  37. {
  38.     RegisterDataBlock(&mDataBlockList);
  39. }
  40.