00001 /* $Id: newgrf_string_type.h 11862 2008-01-15 13:19:49Z rubidium $ */ 00002 00005 #ifndef NEWGRF_STRING_TYPE_H 00006 #define NEWGRF_STRING_TYPE_H 00007 00008 #include "strings_type.h" 00009 00013 struct GRFMappedStringID 00014 { 00015 private: 00017 uint32 grfid; 00019 StringID string; 00020 00021 public: 00027 GRFMappedStringID(StringID str, uint32 grf_id) : grfid(grf_id), string(str) {} 00028 00032 GRFMappedStringID() {} 00033 00035 inline operator StringID() const 00036 { 00037 return string; 00038 } 00039 00041 GRFMappedStringID& operator = (StringID str) 00042 { 00043 string = str; 00044 grfid = 0; 00045 return *this; 00046 } 00047 00051 void MapString(); 00052 }; 00053 00054 #endif /* NEWGRF_STRING_TYPE_H */