00001 #include "StringTable.hxx" 00002 00003 #include <OpenThreads/ScopedLock> 00004 00005 namespace simgear 00006 { 00007 using namespace std; 00008 00009 const string* StringTable::insert(const string& str) 00010 { 00011 using namespace OpenThreads; 00012 ScopedLock<Mutex> lock(_mutex); 00013 StringContainer::iterator it = _strings.insert(str).first; 00014 return &*it; 00015 } 00016 }