123456789101112131415161718192021222324252627282930 |
- #pragma once
- #include "DataStorage.h"
- #include <map>
- #include <string>
- #if (defined(__clang__) && defined(_LIBCPP_VERSION)) || (__cplusplus >= 201103L)
- #include <memory>
- #else
- #include <tr1/memory>
- #endif
- struct BBS2chProxyThreadInfo
- {
- int lastResNum;
- int cachedSize;
- DataStorage *cachedData;
- BBS2chProxyThreadInfo() : lastResNum(0), cachedSize(0), cachedData(NULL) {};
- ~BBS2chProxyThreadInfo()
- {
- if(cachedData) delete cachedData;
- }
- };
- #if (defined(__clang__) && defined(_LIBCPP_VERSION)) || (__cplusplus >= 201103L)
- typedef std::shared_ptr<BBS2chProxyThreadInfo> PBBS2chProxyThreadInfo;
- #else
- typedef std::tr1::shared_ptr<BBS2chProxyThreadInfo> PBBS2chProxyThreadInfo;
- #endif
- typedef std::map<const std::string, PBBS2chProxyThreadInfo> BBS2chProxyThreadCache;
|