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