1 //------------------------------------------------------------------------------ 2 // RemoteTestObject.cpp 3 // 4 //------------------------------------------------------------------------------ 5 6 // Standard Includes ----------------------------------------------------------- 7 #include <iostream> 8 9 // System Includes ------------------------------------------------------------- 10 #include <Message.h> 11 12 // Project Includes ------------------------------------------------------------ 13 14 // Local Includes -------------------------------------------------------------- 15 #include "RemoteTestObject.h" 16 17 // Local Defines --------------------------------------------------------------- 18 19 // Globals --------------------------------------------------------------------- 20 21 //------------------------------------------------------------------------------ 22 TRemoteTestObject::TRemoteTestObject(int32 i) 23 : data(i) 24 { 25 ; 26 } 27 //------------------------------------------------------------------------------ 28 TRemoteTestObject::TRemoteTestObject(BMessage *archive) 29 { 30 data = archive->FindInt32("TRemoteTestObject::data"); 31 } 32 //------------------------------------------------------------------------------ 33 status_t TRemoteTestObject::Archive(BMessage *archive, bool deep) 34 { 35 status_t err = archive->AddString("class", "TRemoteTestObject"); 36 37 if (!err) 38 err = archive->AddInt32("TRemoteTestObject::data", data); 39 40 return err; 41 } 42 //------------------------------------------------------------------------------ 43 TRemoteTestObject* TRemoteTestObject::Instantiate(BMessage *archive) 44 { 45 if (validate_instantiation(archive, "TRemoteTestObject")) 46 return new TRemoteTestObject(archive); 47 return NULL; 48 } 49 //------------------------------------------------------------------------------ 50 51 /* 52 * $Log $ 53 * 54 * $Id $ 55 * 56 */ 57 58