Replace TR1 headers with standard headers

Now that the C++11 standard is the default one, we can remove the TR1
headers and classes.
This commit is contained in:
Markus Mäkelä
2018-07-06 10:08:46 +03:00
parent 28ceb1bad8
commit 77a1417479
45 changed files with 100 additions and 112 deletions

View File

@ -16,7 +16,7 @@
#include <list> #include <list>
#include <string> #include <string>
#include <tr1/memory> #include <memory>
#include <maxscale/service.h> #include <maxscale/service.h>
#include <maxscale/session_command.hh> #include <maxscale/session_command.hh>
@ -359,6 +359,6 @@ private:
std::string m_uri; /**< The combined address and port */ std::string m_uri; /**< The combined address and port */
}; };
typedef std::tr1::shared_ptr<Backend> SBackend; typedef std::shared_ptr<Backend> SBackend;
typedef std::list<SBackend> BackendList; typedef std::list<SBackend> BackendList;
} }

View File

@ -29,10 +29,10 @@
#include <maxscale/query_classifier.h> #include <maxscale/query_classifier.h>
#ifdef __cplusplus #ifdef __cplusplus
#include <tr1/unordered_map> #include <unordered_map>
#include <string> #include <string>
// A mapping from a path to a percentage, e.g.: "/disk" -> 80. // A mapping from a path to a percentage, e.g.: "/disk" -> 80.
typedef std::tr1::unordered_map<std::string, int32_t> MxsDiskSpaceThreshold; typedef std::unordered_map<std::string, int32_t> MxsDiskSpaceThreshold;
#else #else
typedef void MxsDiskSpaceThreshold; typedef void MxsDiskSpaceThreshold;
#endif #endif

View File

@ -14,9 +14,9 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <string> #include <string>
#include <tr1/memory> #include <memory>
#include <tr1/unordered_map> #include <unordered_map>
#include <tr1/unordered_set> #include <unordered_set>
#include <maxscale/hint.h> #include <maxscale/hint.h>
#include <maxscale/router.h> #include <maxscale/router.h>
#include <maxscale/session.h> #include <maxscale/session.h>
@ -107,7 +107,7 @@ public:
virtual bool supports_hint(HINT_TYPE hint_type) const = 0; virtual bool supports_hint(HINT_TYPE hint_type) const = 0;
}; };
typedef std::tr1::unordered_set<std::string> TableSet; typedef std::unordered_set<std::string> TableSet;
// NOTE: For the time being these must be exactly like the ones in readwritesplit.hh // NOTE: For the time being these must be exactly like the ones in readwritesplit.hh
enum enum
@ -371,7 +371,7 @@ private:
class PSManager; class PSManager;
typedef std::shared_ptr<PSManager> SPSManager; typedef std::shared_ptr<PSManager> SPSManager;
typedef std::tr1::unordered_map<uint32_t, uint32_t> HandleMap; typedef std::unordered_map<uint32_t, uint32_t> HandleMap;
static bool find_table(QueryClassifier& qc, const std::string& table); static bool find_table(QueryClassifier& qc, const std::string& table);
static bool delete_table(QueryClassifier& qc, const std::string& table); static bool delete_table(QueryClassifier& qc, const std::string& table);

View File

@ -28,13 +28,13 @@
#include <maxscale/jansson.h> #include <maxscale/jansson.h>
#ifdef __cplusplus #ifdef __cplusplus
#include <tr1/unordered_map> #include <unordered_map>
#include <tr1/unordered_set> #include <unordered_set>
#include <string> #include <string>
#include <deque> #include <deque>
#include <vector> #include <vector>
typedef std::deque<std::vector<uint8_t> > SessionStmtQueue; typedef std::deque<std::vector<uint8_t> > SessionStmtQueue;
typedef std::tr1::unordered_set<DCB*> DCBSet; typedef std::unordered_set<DCB*> DCBSet;
#else #else
typedef void SessionStmtQueue; typedef void SessionStmtQueue;
typedef void DCBSet; typedef void DCBSet;
@ -184,7 +184,7 @@ typedef struct session_variable
void* context; void* context;
} SESSION_VARIABLE; } SESSION_VARIABLE;
typedef std::tr1::unordered_map<std::string, SESSION_VARIABLE> SessionVarsByName; typedef std::unordered_map<std::string, SESSION_VARIABLE> SessionVarsByName;
#else #else
typedef void SessionVarsByName; typedef void SessionVarsByName;
#endif #endif

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <tr1/memory> #include <memory>
#include <list> #include <list>
#include <string> #include <string>
@ -24,7 +24,7 @@ namespace maxscale
{ {
class SessionCommand; class SessionCommand;
typedef std::tr1::shared_ptr<SessionCommand> SSessionCommand; typedef std::shared_ptr<SessionCommand> SSessionCommand;
typedef std::list<SSessionCommand> SessionCommandList; typedef std::list<SSessionCommand> SessionCommandList;
class SessionCommand class SessionCommand

View File

@ -13,7 +13,7 @@
*/ */
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <tr1/memory> #include <memory>
#include <maxscale/thread.h> #include <maxscale/thread.h>
#include <maxscale/future.hh> #include <maxscale/future.hh>

View File

@ -23,7 +23,7 @@
#include <functional> #include <functional>
#include <iterator> #include <iterator>
#include <string> #include <string>
#include <tr1/unordered_map> #include <unordered_map>
#include <maxscale/buffer.h> #include <maxscale/buffer.h>
#include <maxscale/utils.h> #include <maxscale/utils.h>
@ -352,7 +352,7 @@ public:
} }
private: private:
typedef typename std::tr1::unordered_map<id_type, entry_type> ContainerType; typedef typename std::unordered_map<id_type, entry_type> ContainerType;
ContainerType m_registry; ContainerType m_registry;
}; };

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <map> #include <map>
#include <tr1/unordered_set> #include <unordered_set>
#include <memory> #include <memory>
#include <maxscale/platform.h> #include <maxscale/platform.h>
#include <maxscale/session.h> #include <maxscale/session.h>
@ -1147,7 +1147,7 @@ private:
typedef DelegatingTimer<Worker> PrivateTimer; typedef DelegatingTimer<Worker> PrivateTimer;
typedef std::multimap<int64_t, DelayedCall*> DelayedCallsByTime; typedef std::multimap<int64_t, DelayedCall*> DelayedCallsByTime;
typedef std::tr1::unordered_map<uint32_t, DelayedCall*> DelayedCallsById; typedef std::unordered_map<uint32_t, DelayedCall*> DelayedCallsById;
STATISTICS m_statistics; /*< Worker statistics. */ STATISTICS m_statistics; /*< Worker statistics. */
MessageQueue* m_pQueue; /*< The message queue of the worker. */ MessageQueue* m_pQueue; /*< The message queue of the worker. */

View File

@ -17,7 +17,7 @@
#include <deque> #include <deque>
#include <map> #include <map>
#include <string> #include <string>
#include <tr1/memory> #include <memory>
#include <cstdint> #include <cstdint>
#include <microhttpd.h> #include <microhttpd.h>

View File

@ -16,7 +16,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include <tr1/memory> #include <memory>
#include <microhttpd.h> #include <microhttpd.h>
#include <maxscale/jansson.hh> #include <maxscale/jansson.hh>

View File

@ -362,9 +362,6 @@ private:
namespace std namespace std
{ {
namespace tr1
{
template<> template<>
struct hash<MessageRegistryKey> struct hash<MessageRegistryKey>
{ {
@ -377,8 +374,6 @@ struct hash<MessageRegistryKey>
} }
}; };
}
template<> template<>
struct equal_to<MessageRegistryKey> struct equal_to<MessageRegistryKey>
{ {
@ -428,7 +423,7 @@ public:
private: private:
mxs::SpinLock m_lock; mxs::SpinLock m_lock;
std::tr1::unordered_map<Key, Stats> m_registry; std::unordered_map<Key, Stats> m_registry;
}; };
} }

View File

@ -12,7 +12,7 @@
*/ */
#include <maxscale/queryclassifier.hh> #include <maxscale/queryclassifier.hh>
#include <tr1/unordered_map> #include <unordered_map>
#include <maxscale/alloc.h> #include <maxscale/alloc.h>
#include <maxscale/modutil.h> #include <maxscale/modutil.h>
#include <maxscale/query_classifier.h> #include <maxscale/query_classifier.h>
@ -322,8 +322,8 @@ public:
} }
private: private:
typedef std::tr1::unordered_map<uint32_t, uint32_t> BinaryPSMap; typedef std::unordered_map<uint32_t, uint32_t> BinaryPSMap;
typedef std::tr1::unordered_map<std::string, uint32_t> TextPSMap; typedef std::unordered_map<std::string, uint32_t> TextPSMap;
private: private:
BinaryPSMap m_binary_ps; BinaryPSMap m_binary_ps;

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <new> #include <new>
#include <tr1/unordered_map> #include <unordered_map>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
@ -54,7 +54,7 @@ class Users
Users& operator=(const Users&); Users& operator=(const Users&);
public: public:
typedef std::tr1::unordered_map<std::string, UserInfo> UserMap; typedef std::unordered_map<std::string, UserInfo> UserMap;
Users() Users()
{ {

View File

@ -13,8 +13,8 @@
*/ */
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <tr1/functional> #include <functional>
#include <tr1/memory> #include <memory>
#include <string> #include <string>
#include <maxscale/buffer.h> #include <maxscale/buffer.h>
#include <maxscale/session.h> #include <maxscale/session.h>
@ -35,8 +35,8 @@ public:
INFO_ALL = (INFO_RULES | INFO_PENDING | INFO_STORAGE) INFO_ALL = (INFO_RULES | INFO_PENDING | INFO_STORAGE)
}; };
typedef std::tr1::shared_ptr<CacheRules> SCacheRules; typedef std::shared_ptr<CacheRules> SCacheRules;
typedef std::tr1::shared_ptr<StorageFactory> SStorageFactory; typedef std::shared_ptr<StorageFactory> SStorageFactory;
virtual ~Cache(); virtual ~Cache();

View File

@ -15,7 +15,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <functional> #include <functional>
#include <string> #include <string>
#include <tr1/functional> #include <functional>
#include "cache_storage_api.h" #include "cache_storage_api.h"
@ -31,9 +31,6 @@ struct equal_to<CACHE_KEY>
} }
}; };
namespace tr1
{
template<> template<>
struct hash<CACHE_KEY> struct hash<CACHE_KEY>
{ {
@ -45,8 +42,6 @@ struct hash<CACHE_KEY>
} }
}
std::string cache_key_to_string(const CACHE_KEY& key); std::string cache_key_to_string(const CACHE_KEY& key);
inline bool operator == (const CACHE_KEY& lhs, const CACHE_KEY& rhs) inline bool operator == (const CACHE_KEY& lhs, const CACHE_KEY& rhs)

View File

@ -17,7 +17,7 @@
#include "storagefactory.hh" #include "storagefactory.hh"
using maxscale::SpinLockGuard; using maxscale::SpinLockGuard;
using std::tr1::shared_ptr; using std::shared_ptr;
CacheMT::CacheMT(const std::string& name, CacheMT::CacheMT(const std::string& name,
const CACHE_CONFIG* pConfig, const CACHE_CONFIG* pConfig,

View File

@ -21,7 +21,7 @@
#include "cachest.hh" #include "cachest.hh"
#include "storagefactory.hh" #include "storagefactory.hh"
using std::tr1::shared_ptr; using std::shared_ptr;
using std::string; using std::string;
namespace namespace

View File

@ -13,7 +13,7 @@
*/ */
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <tr1/memory> #include <memory>
#include <vector> #include <vector>
#include "cache.hh" #include "cache.hh"
@ -41,7 +41,7 @@ public:
cache_result_t del_value(const CACHE_KEY& key); cache_result_t del_value(const CACHE_KEY& key);
private: private:
typedef std::tr1::shared_ptr<Cache> SCache; typedef std::shared_ptr<Cache> SCache;
typedef std::vector<SCache> Caches; typedef std::vector<SCache> Caches;
CachePT(const std::string& name, CachePT(const std::string& name,

View File

@ -13,7 +13,7 @@
*/ */
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <tr1/unordered_map> #include <unordered_map>
#include "cache.hh" #include "cache.hh"
#include "cache_storage_api.hh" #include "cache_storage_api.hh"
@ -55,7 +55,7 @@ private:
CacheSimple& operator = (const CacheSimple&); CacheSimple& operator = (const CacheSimple&);
protected: protected:
typedef std::tr1::unordered_map<CACHE_KEY, const CacheFilterSession*> Pending; typedef std::unordered_map<CACHE_KEY, const CacheFilterSession*> Pending;
Pending m_pending; // Pending items; being fetched from the backend. Pending m_pending; // Pending items; being fetched from the backend.
Storage* m_pStorage; // The storage instance to use. Storage* m_pStorage; // The storage instance to use.

View File

@ -16,7 +16,7 @@
#include "storage.hh" #include "storage.hh"
#include "storagefactory.hh" #include "storagefactory.hh"
using std::tr1::shared_ptr; using std::shared_ptr;
CacheST::CacheST(const std::string& name, CacheST::CacheST(const std::string& name,
const CACHE_CONFIG* pConfig, const CACHE_CONFIG* pConfig,

View File

@ -13,7 +13,7 @@
*/ */
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <tr1/unordered_map> #include <unordered_map>
#include "cachefilter.h" #include "cachefilter.h"
#include "cache_storage_api.hh" #include "cache_storage_api.hh"
#include "storage.hh" #include "storage.hh"
@ -208,7 +208,7 @@ private:
Node* m_pPrev; /*< The previous node in the LRU list. */ Node* m_pPrev; /*< The previous node in the LRU list. */
}; };
typedef std::tr1::unordered_map<CACHE_KEY, Node*> NodesByKey; typedef std::unordered_map<CACHE_KEY, Node*> NodesByKey;
Node* vacate_lru(); Node* vacate_lru();
Node* vacate_lru(size_t space); Node* vacate_lru(size_t space);

View File

@ -17,7 +17,7 @@
#include <maxscale/cdefs.h> #include <maxscale/cdefs.h>
#include <stdbool.h> #include <stdbool.h>
#include <jansson.h> #include <jansson.h>
#include <tr1/memory> #include <memory>
#include <maxscale/buffer.h> #include <maxscale/buffer.h>
#include <maxscale/session.h> #include <maxscale/session.h>
#include <maxscale/pcre2.h> #include <maxscale/pcre2.h>
@ -184,7 +184,7 @@ MXS_END_DECLS
class CacheRules class CacheRules
{ {
public: public:
typedef std::tr1::shared_ptr<CacheRules> SCacheRules; typedef std::shared_ptr<CacheRules> SCacheRules;
CacheRules(const CacheRules&) = delete; CacheRules(const CacheRules&) = delete;
CacheRules& operator = (const CacheRules&) = delete; CacheRules& operator = (const CacheRules&) = delete;

View File

@ -16,7 +16,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include <tr1/unordered_map> #include <unordered_map>
#include "../../cache_storage_api.hh" #include "../../cache_storage_api.hh"
class InMemoryStorage class InMemoryStorage
@ -92,7 +92,7 @@ private:
uint64_t deletes; /*< How many times an existing key in the cache was deleted. */ uint64_t deletes; /*< How many times an existing key in the cache was deleted. */
}; };
typedef std::tr1::unordered_map<CACHE_KEY, Entry> Entries; typedef std::unordered_map<CACHE_KEY, Entry> Entries;
std::string m_name; std::string m_name;
const CACHE_STORAGE_CONFIG m_config; const CACHE_STORAGE_CONFIG m_config;

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <tr1/unordered_map> #include <unordered_map>
#include <maxscale/alloc.h> #include <maxscale/alloc.h>
#include <maxscale/paths.h> #include <maxscale/paths.h>
#include <maxscale/query_classifier.h> #include <maxscale/query_classifier.h>
@ -25,7 +25,6 @@
#include "tester.hh" #include "tester.hh"
using namespace std; using namespace std;
using namespace std::tr1;
namespace namespace
{ {

View File

@ -19,8 +19,8 @@
#include <string> #include <string>
#include <list> #include <list>
#include <vector> #include <vector>
#include <tr1/memory> #include <memory>
#include <tr1/unordered_map> #include <unordered_map>
#include <maxscale/filter.hh> #include <maxscale/filter.hh>
#include <maxscale/query_classifier.h> #include <maxscale/query_classifier.h>
@ -154,7 +154,7 @@ struct QuerySpeed
class Dbfw; class Dbfw;
class User; class User;
typedef std::tr1::shared_ptr<User> SUser; typedef std::shared_ptr<User> SUser;
/** /**
* The session structure for Firewall filter. * The session structure for Firewall filter.
@ -279,7 +279,7 @@ typedef std::list<std::string> ValueList;
/** Temporary typedef for SRule */ /** Temporary typedef for SRule */
class Rule; class Rule;
typedef std::tr1::shared_ptr<Rule> SRule; typedef std::shared_ptr<Rule> SRule;
/** Helper function for strdup'ing in printf style */ /** Helper function for strdup'ing in printf style */
char* create_error(const char* format, ...); char* create_error(const char* format, ...);

View File

@ -296,5 +296,5 @@ private:
mxs::Closer<pcre2_code*> m_re; mxs::Closer<pcre2_code*> m_re;
}; };
typedef std::tr1::shared_ptr<Rule> SRule; typedef std::shared_ptr<Rule> SRule;
typedef std::list<SRule> RuleList; typedef std::list<SRule> RuleList;

View File

@ -34,7 +34,7 @@ struct UserTemplate
ValueList rulenames; /** Names of the rules */ ValueList rulenames; /** Names of the rules */
}; };
typedef std::tr1::shared_ptr<UserTemplate> SUserTemplate; typedef std::shared_ptr<UserTemplate> SUserTemplate;
typedef std::list<SUserTemplate> TemplateList; typedef std::list<SUserTemplate> TemplateList;
/** /**
@ -101,5 +101,5 @@ private:
GWBUF *queue, match_mode mode, char** rulename); GWBUF *queue, match_mode mode, char** rulename);
}; };
typedef std::tr1::shared_ptr<User> SUser; typedef std::shared_ptr<User> SUser;
typedef std::tr1::unordered_map<std::string, SUser> UserMap; typedef std::unordered_map<std::string, SUser> UserMap;

View File

@ -122,7 +122,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE()
MaskingFilter::MaskingFilter(const Config& config, auto_ptr<MaskingRules> sRules) MaskingFilter::MaskingFilter(const Config& config, auto_ptr<MaskingRules> sRules)
: m_config(config) : m_config(config)
, m_sRules(sRules) , m_sRules(sRules.release())
{ {
MXS_NOTICE("Masking filter [%s] created.", m_config.name().c_str()); MXS_NOTICE("Masking filter [%s] created.", m_config.name().c_str());
} }
@ -171,7 +171,7 @@ uint64_t MaskingFilter::getCapabilities()
return RCAP_TYPE_NONE; return RCAP_TYPE_NONE;
} }
std::tr1::shared_ptr<MaskingRules> MaskingFilter::rules() const std::shared_ptr<MaskingRules> MaskingFilter::rules() const
{ {
return m_sRules; return m_sRules;
} }
@ -186,7 +186,7 @@ bool MaskingFilter::reload()
MXS_NOTICE("Rules for masking filter '%s' were reloaded from '%s'.", MXS_NOTICE("Rules for masking filter '%s' were reloaded from '%s'.",
m_config.name().c_str(), m_config.rules().c_str()); m_config.name().c_str(), m_config.rules().c_str());
m_sRules = sRules; m_sRules.reset(sRules.release());
rval = true; rval = true;
} }
else else

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <memory> #include <memory>
#include <tr1/memory> #include <memory>
#include <maxscale/filter.hh> #include <maxscale/filter.hh>
#include "maskingfilterconfig.hh" #include "maskingfilterconfig.hh"
#include "maskingfiltersession.hh" #include "maskingfiltersession.hh"
@ -25,7 +25,7 @@ class MaskingRules;
class MaskingFilter : public maxscale::Filter<MaskingFilter, MaskingFilterSession> class MaskingFilter : public maxscale::Filter<MaskingFilter, MaskingFilterSession>
{ {
public: public:
typedef std::tr1::shared_ptr<MaskingRules> SMaskingRules; typedef std::shared_ptr<MaskingRules> SMaskingRules;
typedef MaskingFilterConfig Config; typedef MaskingFilterConfig Config;
~MaskingFilter(); ~MaskingFilter();

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <memory> #include <memory>
#include <tr1/memory> #include <memory>
#include <maxscale/buffer.hh> #include <maxscale/buffer.hh>
#include <maxscale/filter.hh> #include <maxscale/filter.hh>
#include "maskingrules.hh" #include "maskingrules.hh"
@ -64,7 +64,7 @@ private:
bool reject_if_function_used(GWBUF* pPacket); bool reject_if_function_used(GWBUF* pPacket);
private: private:
typedef std::tr1::shared_ptr<MaskingRules> SMaskingRules; typedef std::shared_ptr<MaskingRules> SMaskingRules;
class ResponseState class ResponseState
{ {

View File

@ -27,7 +27,7 @@
using std::auto_ptr; using std::auto_ptr;
using std::string; using std::string;
using std::vector; using std::vector;
using std::tr1::shared_ptr; using std::shared_ptr;
using maxscale::Closer; using maxscale::Closer;
namespace namespace

View File

@ -15,7 +15,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <string> #include <string>
#include <tr1/memory> #include <memory>
#include <vector> #include <vector>
#include <maxscale/jansson.h> #include <maxscale/jansson.h>
@ -67,7 +67,7 @@ public:
virtual bool matches(const char* zUser, const char* zHost) const = 0; virtual bool matches(const char* zUser, const char* zHost) const = 0;
}; };
typedef std::tr1::shared_ptr<Account> SAccount; typedef std::shared_ptr<Account> SAccount;
/** /**
* Constructor of base Rule class * Constructor of base Rule class
@ -394,7 +394,7 @@ public:
const char* zUser, const char* zUser,
const char* zHost) const; const char* zHost) const;
typedef std::tr1::shared_ptr<Rule> SRule; typedef std::shared_ptr<Rule> SRule;
private: private:
MaskingRules(json_t* pRoot, const std::vector<SRule>& rules); MaskingRules(json_t* pRoot, const std::vector<SRule>& rules);

View File

@ -17,7 +17,6 @@
#include <maxscale/debug.h> #include <maxscale/debug.h>
using namespace std; using namespace std;
using namespace std::tr1;
const char valid_minimal[] = const char valid_minimal[] =
"{" "{"
@ -253,7 +252,7 @@ public:
{ {
int rc = EXIT_SUCCESS; int rc = EXIT_SUCCESS;
using std::tr1::shared_ptr; using std::shared_ptr;
auto_ptr<MaskingRules> sRules = MaskingRules::parse(valid_users); auto_ptr<MaskingRules> sRules = MaskingRules::parse(valid_users);
ss_dassert(sRules.get()); ss_dassert(sRules.get());

View File

@ -18,7 +18,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <tr1/unordered_map> #include <unordered_map>
#include <maxscale/monitor.hh> #include <maxscale/monitor.hh>
@ -34,7 +34,7 @@ struct GaleraNode
std::string cluster_uuid; /**< Cluster UUID */ std::string cluster_uuid; /**< Cluster UUID */
}; };
typedef std::tr1::unordered_map<MXS_MONITORED_SERVER*, GaleraNode> NodeMap; typedef std::unordered_map<MXS_MONITORED_SERVER*, GaleraNode> NodeMap;
class GaleraMonitor : public maxscale::MonitorInstanceSimple class GaleraMonitor : public maxscale::MonitorInstanceSimple
{ {

View File

@ -16,7 +16,7 @@
#include <condition_variable> #include <condition_variable>
#include <functional> #include <functional>
#include <string> #include <string>
#include <tr1/unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <maxscale/monitor.hh> #include <maxscale/monitor.hh>
@ -29,11 +29,11 @@ extern const char * const CN_PROMOTION_SQL_FILE;
extern const char * const CN_DEMOTION_SQL_FILE; extern const char * const CN_DEMOTION_SQL_FILE;
// Map of base struct to MariaDBServer. Does not own the server objects. May not be needed at the end. // Map of base struct to MariaDBServer. Does not own the server objects. May not be needed at the end.
typedef std::tr1::unordered_map<MXS_MONITORED_SERVER*, MariaDBServer*> ServerInfoMap; typedef std::unordered_map<MXS_MONITORED_SERVER*, MariaDBServer*> ServerInfoMap;
// Map of server id:s to MariaDBServer. Useful when constructing the replication graph. // Map of server id:s to MariaDBServer. Useful when constructing the replication graph.
typedef std::tr1::unordered_map<int64_t, MariaDBServer*> IdToServerMap; typedef std::unordered_map<int64_t, MariaDBServer*> IdToServerMap;
// Map of cycle number to cycle members // Map of cycle number to cycle members
typedef std::tr1::unordered_map<int, ServerArray> CycleMap; typedef std::unordered_map<int, ServerArray> CycleMap;
// MariaDB Monitor instance data // MariaDB Monitor instance data
class MariaDBMonitor : public maxscale::MonitorInstance class MariaDBMonitor : public maxscale::MonitorInstance

View File

@ -464,7 +464,7 @@ public:
private: private:
MYSQL_RES* m_resultset; // Underlying result set, freed at dtor. MYSQL_RES* m_resultset; // Underlying result set, freed at dtor.
std::tr1::unordered_map<std::string, int64_t> m_col_indexes; // Map of column name -> index std::unordered_map<std::string, int64_t> m_col_indexes; // Map of column name -> index
int64_t m_columns; // How many columns does the data have. Usually equal to column index map size. int64_t m_columns; // How many columns does the data have. Usually equal to column index map size.
MYSQL_ROW m_rowdata; // Data for current row MYSQL_ROW m_rowdata; // Data for current row
int64_t m_current_row; // Index of current row int64_t m_current_row; // Index of current row

View File

@ -39,8 +39,8 @@ struct AvroTable
avro_schema_t avro_schema; /*< Native Avro schema of the table */ avro_schema_t avro_schema; /*< Native Avro schema of the table */
}; };
typedef std::tr1::shared_ptr<AvroTable> SAvroTable; typedef std::shared_ptr<AvroTable> SAvroTable;
typedef std::tr1::unordered_map<std::string, SAvroTable> AvroTables; typedef std::unordered_map<std::string, SAvroTable> AvroTables;
// Converts replicated events into CDC events // Converts replicated events into CDC events
class AvroConverter : public RowEventHandler class AvroConverter : public RowEventHandler

View File

@ -16,8 +16,8 @@
#include <cstdint> #include <cstdint>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <tr1/memory> #include <memory>
#include <tr1/unordered_map> #include <unordered_map>
#include <maxscale/pcre2.h> #include <maxscale/pcre2.h>
#include <maxscale/service.h> #include <maxscale/service.h>
@ -72,7 +72,7 @@ struct Column
}; };
struct TableCreateEvent; struct TableCreateEvent;
typedef std::tr1::shared_ptr<TableCreateEvent> STableCreateEvent; typedef std::shared_ptr<TableCreateEvent> STableCreateEvent;
/** A CREATE TABLE abstraction */ /** A CREATE TABLE abstraction */
struct TableCreateEvent struct TableCreateEvent
@ -151,12 +151,12 @@ struct TableMapEvent
Bytes column_metadata; Bytes column_metadata;
}; };
typedef std::tr1::shared_ptr<TableMapEvent> STableMapEvent; typedef std::shared_ptr<TableMapEvent> STableMapEvent;
// Containers for the replication events // Containers for the replication events
typedef std::tr1::unordered_map<std::string, STableCreateEvent> CreatedTables; typedef std::unordered_map<std::string, STableCreateEvent> CreatedTables;
typedef std::tr1::unordered_map<std::string, STableMapEvent> MappedTables; typedef std::unordered_map<std::string, STableMapEvent> MappedTables;
typedef std::tr1::unordered_map<uint64_t, STableMapEvent> ActiveMaps; typedef std::unordered_map<uint64_t, STableMapEvent> ActiveMaps;
// Handler class for row based replication events // Handler class for row based replication events
class RowEventHandler class RowEventHandler

View File

@ -14,14 +14,14 @@
#include "hintrouterdefs.hh" #include "hintrouterdefs.hh"
#include <tr1/memory> #include <memory>
#include <maxscale/dcb.h> #include <maxscale/dcb.h>
class Dcb class Dcb
{ {
public: public:
typedef std::tr1::shared_ptr<DCB> SDCB; typedef std::shared_ptr<DCB> SDCB;
explicit Dcb(DCB* pDcb); explicit Dcb(DCB* pDcb);

View File

@ -15,7 +15,7 @@
#include "hintrouterdefs.hh" #include "hintrouterdefs.hh"
#include <deque> #include <deque>
#include <tr1/unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <string> #include <string>
@ -29,7 +29,7 @@ class HintRouter;
class HintRouterSession : public maxscale::RouterSession class HintRouterSession : public maxscale::RouterSession
{ {
public: public:
typedef std::tr1::unordered_map<string, Dcb> BackendMap; // All backends, indexed by name typedef std::unordered_map<string, Dcb> BackendMap; // All backends, indexed by name
typedef std::vector<Dcb> BackendArray; typedef std::vector<Dcb> BackendArray;
typedef std::vector<SERVER_REF*> RefArray; typedef std::vector<SERVER_REF*> RefArray;
typedef BackendMap::value_type MapElement; typedef BackendMap::value_type MapElement;

View File

@ -20,8 +20,8 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <tr1/unordered_set> #include <unordered_set>
#include <tr1/unordered_map> #include <unordered_map>
#include <map> #include <map>
#include <string> #include <string>
@ -200,7 +200,7 @@ struct Config
bool optimistic_trx; /**< Enable optimistic transactions */ bool optimistic_trx; /**< Enable optimistic transactions */
}; };
typedef std::tr1::shared_ptr<Config> SConfig; typedef std::shared_ptr<Config> SConfig;
/** /**
* The statistics for this router instance * The statistics for this router instance

View File

@ -15,7 +15,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <map> #include <map>
#include <tr1/memory> #include <memory>
#include <maxscale/backend.hh> #include <maxscale/backend.hh>
#include <maxscale/modutil.h> #include <maxscale/modutil.h>
@ -35,7 +35,7 @@ enum reply_state_t
typedef std::map<uint32_t, uint32_t> BackendHandleMap; /** Internal ID to external ID */ typedef std::map<uint32_t, uint32_t> BackendHandleMap; /** Internal ID to external ID */
class RWBackend; class RWBackend;
typedef std::tr1::shared_ptr<RWBackend> SRWBackend; typedef std::shared_ptr<RWBackend> SRWBackend;
typedef std::list<SRWBackend> SRWBackendList; typedef std::list<SRWBackend> SRWBackendList;
class RWBackend: public mxs::Backend class RWBackend: public mxs::Backend

View File

@ -30,14 +30,14 @@
typedef std::map<uint32_t, uint32_t> ClientHandleMap; /** External ID to internal ID */ typedef std::map<uint32_t, uint32_t> ClientHandleMap; /** External ID to internal ID */
typedef std::tr1::unordered_set<std::string> TableSet; typedef std::unordered_set<std::string> TableSet;
typedef std::map<uint64_t, uint8_t> ResponseMap; typedef std::map<uint64_t, uint8_t> ResponseMap;
/** List of slave responses that arrived before the master */ /** List of slave responses that arrived before the master */
typedef std::list< std::pair<mxs::SRWBackend, uint8_t> > SlaveResponseList; typedef std::list< std::pair<mxs::SRWBackend, uint8_t> > SlaveResponseList;
/** Map of COM_STMT_EXECUTE targets by internal ID */ /** Map of COM_STMT_EXECUTE targets by internal ID */
typedef std::tr1::unordered_map<uint32_t, mxs::SRWBackend> ExecMap; typedef std::unordered_map<uint32_t, mxs::SRWBackend> ExecMap;
/** /**
* The client session of a RWSplit instance * The client session of a RWSplit instance

View File

@ -24,7 +24,7 @@
#include <list> #include <list>
#include <set> #include <set>
#include <string> #include <string>
#include <tr1/memory> #include <memory>
#include <maxscale/buffer.hh> #include <maxscale/buffer.hh>
#include <maxscale/pcre2.h> #include <maxscale/pcre2.h>
@ -128,7 +128,7 @@ private:
bool m_mapped; /**< Whether the backend has been mapped */ bool m_mapped; /**< Whether the backend has been mapped */
}; };
typedef std::tr1::shared_ptr<SRBackend> SSRBackend; typedef std::shared_ptr<SRBackend> SSRBackend;
typedef std::list<SSRBackend> SSRBackendList; typedef std::list<SSRBackend> SSRBackendList;
} }

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <tr1/unordered_map> #include <unordered_map>
#include <string> #include <string>
#include <list> #include <list>
@ -24,7 +24,7 @@
using namespace maxscale; using namespace maxscale;
/** This contains the database to server mapping */ /** This contains the database to server mapping */
typedef std::tr1::unordered_map<std::string, SERVER*> ServerMap; typedef std::unordered_map<std::string, SERVER*> ServerMap;
class Shard class Shard
{ {
@ -96,7 +96,7 @@ private:
time_t m_last_updated; time_t m_last_updated;
}; };
typedef std::tr1::unordered_map<std::string, Shard> ShardMap; typedef std::unordered_map<std::string, Shard> ShardMap;
class ShardManager class ShardManager
{ {