1 /*****************************************************************************/ 2 /* */ 3 /* STR.H */ 4 /* */ 5 /* (C) 1993,94 Ullrich von Bassewitz */ 6 /* Zwehrenbuehlstrasse 33 */ 7 /* D-72070 Tuebingen */ 8 /* EMail: uz@ibb.schwaben.com */ 9 /* */ 10 /*****************************************************************************/ 11 12 13 14 // $Id$ 15 // 16 // $Log$ 17 // 18 // 19 20 21 22 #include "machine.h" 23 #include "object.h" 24 #include "strmable.h" 25 #include "stream.h" 26 #include "string.h" 27 #include "msg.h" 28 #include "streamid.h" 29 30 31 32 // Link in class Msg 33 LINK (Msg, ID_Msg); 34 35 36 /*****************************************************************************/ 37 /* class Msg */ 38 /*****************************************************************************/ 39 40 41 Load(Stream & S)42void Msg::Load (Stream &S) 43 { 44 String::Load (S); 45 S >> MsgNum; 46 } 47 48 49 50 Store(Stream & S) const51void Msg::Store (Stream &S) const 52 { 53 String::Store (S); 54 S << MsgNum; 55 } 56 57 58 59 60 StreamableID() const61u16 Msg::StreamableID () const 62 { 63 return ID_Msg; 64 } 65 66 67 68 69 Build()70Streamable * Msg::Build () 71 { 72 return new Msg (Empty); 73 } 74 75 76 operator =(const Msg & S)77Msg & Msg::operator = (const Msg &S) 78 { 79 String::operator = (S); 80 MsgNum = S.MsgNum; 81 return *this; 82 } 83 84 85 86 87 88 89