00001 00033 #ifndef LL_LLSTYLE_MAP_H 00034 #define LL_LLSTYLE_MAP_H 00035 00036 #include "llstyle.h" 00037 #include "lluuid.h" 00038 00039 // Lightweight class for holding and managing mappings between UUIDs and links. 00040 // Used (for example) to create clickable name links off of IM chat. 00041 00042 typedef std::map<LLUUID, LLStyleSP> style_map_t; 00043 00044 class LLStyleMap : public style_map_t 00045 { 00046 public: 00047 LLStyleMap(); 00048 ~LLStyleMap(); 00049 // Just like the [] accessor but it will add the entry in if it doesn't exist. 00050 const LLStyleSP &lookup(const LLUUID &source); 00051 static LLStyleMap &instance(); 00052 }; 00053 00054 #endif // LL_LLSTYLE_MAP_H