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:
@ -16,7 +16,7 @@
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
|
||||
#include <maxscale/service.h>
|
||||
#include <maxscale/session_command.hh>
|
||||
@ -359,6 +359,6 @@ private:
|
||||
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;
|
||||
}
|
||||
|
@ -29,10 +29,10 @@
|
||||
#include <maxscale/query_classifier.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
// 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
|
||||
typedef void MxsDiskSpaceThreshold;
|
||||
#endif
|
||||
|
@ -14,9 +14,9 @@
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <string>
|
||||
#include <tr1/memory>
|
||||
#include <tr1/unordered_map>
|
||||
#include <tr1/unordered_set>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <maxscale/hint.h>
|
||||
#include <maxscale/router.h>
|
||||
#include <maxscale/session.h>
|
||||
@ -107,7 +107,7 @@ public:
|
||||
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
|
||||
enum
|
||||
@ -371,7 +371,7 @@ private:
|
||||
class PSManager;
|
||||
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 delete_table(QueryClassifier& qc, const std::string& table);
|
||||
|
@ -28,13 +28,13 @@
|
||||
#include <maxscale/jansson.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <tr1/unordered_map>
|
||||
#include <tr1/unordered_set>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <string>
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
typedef std::deque<std::vector<uint8_t> > SessionStmtQueue;
|
||||
typedef std::tr1::unordered_set<DCB*> DCBSet;
|
||||
typedef std::unordered_set<DCB*> DCBSet;
|
||||
#else
|
||||
typedef void SessionStmtQueue;
|
||||
typedef void DCBSet;
|
||||
@ -184,7 +184,7 @@ typedef struct session_variable
|
||||
void* context;
|
||||
} SESSION_VARIABLE;
|
||||
|
||||
typedef std::tr1::unordered_map<std::string, SESSION_VARIABLE> SessionVarsByName;
|
||||
typedef std::unordered_map<std::string, SESSION_VARIABLE> SessionVarsByName;
|
||||
#else
|
||||
typedef void SessionVarsByName;
|
||||
#endif
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
@ -24,7 +24,7 @@ namespace maxscale
|
||||
{
|
||||
|
||||
class SessionCommand;
|
||||
typedef std::tr1::shared_ptr<SessionCommand> SSessionCommand;
|
||||
typedef std::shared_ptr<SessionCommand> SSessionCommand;
|
||||
typedef std::list<SSessionCommand> SessionCommandList;
|
||||
|
||||
class SessionCommand
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
#include <maxscale/thread.h>
|
||||
#include <maxscale/future.hh>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <maxscale/buffer.h>
|
||||
#include <maxscale/utils.h>
|
||||
@ -352,7 +352,7 @@ public:
|
||||
}
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <map>
|
||||
#include <tr1/unordered_set>
|
||||
#include <unordered_set>
|
||||
#include <memory>
|
||||
#include <maxscale/platform.h>
|
||||
#include <maxscale/session.h>
|
||||
@ -1147,7 +1147,7 @@ private:
|
||||
|
||||
typedef DelegatingTimer<Worker> PrivateTimer;
|
||||
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. */
|
||||
MessageQueue* m_pQueue; /*< The message queue of the worker. */
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
#include <cstdint>
|
||||
#include <microhttpd.h>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
#include <microhttpd.h>
|
||||
|
||||
#include <maxscale/jansson.hh>
|
||||
|
@ -362,9 +362,6 @@ private:
|
||||
namespace std
|
||||
{
|
||||
|
||||
namespace tr1
|
||||
{
|
||||
|
||||
template<>
|
||||
struct hash<MessageRegistryKey>
|
||||
{
|
||||
@ -377,8 +374,6 @@ struct hash<MessageRegistryKey>
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template<>
|
||||
struct equal_to<MessageRegistryKey>
|
||||
{
|
||||
@ -428,7 +423,7 @@ public:
|
||||
|
||||
private:
|
||||
mxs::SpinLock m_lock;
|
||||
std::tr1::unordered_map<Key, Stats> m_registry;
|
||||
std::unordered_map<Key, Stats> m_registry;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/queryclassifier.hh>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include <maxscale/alloc.h>
|
||||
#include <maxscale/modutil.h>
|
||||
#include <maxscale/query_classifier.h>
|
||||
@ -322,8 +322,8 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
typedef std::tr1::unordered_map<uint32_t, uint32_t> BinaryPSMap;
|
||||
typedef std::tr1::unordered_map<std::string, uint32_t> TextPSMap;
|
||||
typedef std::unordered_map<uint32_t, uint32_t> BinaryPSMap;
|
||||
typedef std::unordered_map<std::string, uint32_t> TextPSMap;
|
||||
|
||||
private:
|
||||
BinaryPSMap m_binary_ps;
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <maxscale/cppdefs.hh>
|
||||
|
||||
#include <new>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
@ -54,7 +54,7 @@ class Users
|
||||
Users& operator=(const Users&);
|
||||
|
||||
public:
|
||||
typedef std::tr1::unordered_map<std::string, UserInfo> UserMap;
|
||||
typedef std::unordered_map<std::string, UserInfo> UserMap;
|
||||
|
||||
Users()
|
||||
{
|
||||
|
8
server/modules/filter/cache/cache.hh
vendored
8
server/modules/filter/cache/cache.hh
vendored
@ -13,8 +13,8 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <tr1/functional>
|
||||
#include <tr1/memory>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <maxscale/buffer.h>
|
||||
#include <maxscale/session.h>
|
||||
@ -35,8 +35,8 @@ public:
|
||||
INFO_ALL = (INFO_RULES | INFO_PENDING | INFO_STORAGE)
|
||||
};
|
||||
|
||||
typedef std::tr1::shared_ptr<CacheRules> SCacheRules;
|
||||
typedef std::tr1::shared_ptr<StorageFactory> SStorageFactory;
|
||||
typedef std::shared_ptr<CacheRules> SCacheRules;
|
||||
typedef std::shared_ptr<StorageFactory> SStorageFactory;
|
||||
|
||||
virtual ~Cache();
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <tr1/functional>
|
||||
#include <functional>
|
||||
#include "cache_storage_api.h"
|
||||
|
||||
|
||||
@ -31,9 +31,6 @@ struct equal_to<CACHE_KEY>
|
||||
}
|
||||
};
|
||||
|
||||
namespace tr1
|
||||
{
|
||||
|
||||
template<>
|
||||
struct hash<CACHE_KEY>
|
||||
{
|
||||
@ -45,8 +42,6 @@ struct hash<CACHE_KEY>
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::string cache_key_to_string(const CACHE_KEY& key);
|
||||
|
||||
inline bool operator == (const CACHE_KEY& lhs, const CACHE_KEY& rhs)
|
||||
|
2
server/modules/filter/cache/cachemt.cc
vendored
2
server/modules/filter/cache/cachemt.cc
vendored
@ -17,7 +17,7 @@
|
||||
#include "storagefactory.hh"
|
||||
|
||||
using maxscale::SpinLockGuard;
|
||||
using std::tr1::shared_ptr;
|
||||
using std::shared_ptr;
|
||||
|
||||
CacheMT::CacheMT(const std::string& name,
|
||||
const CACHE_CONFIG* pConfig,
|
||||
|
2
server/modules/filter/cache/cachept.cc
vendored
2
server/modules/filter/cache/cachept.cc
vendored
@ -21,7 +21,7 @@
|
||||
#include "cachest.hh"
|
||||
#include "storagefactory.hh"
|
||||
|
||||
using std::tr1::shared_ptr;
|
||||
using std::shared_ptr;
|
||||
using std::string;
|
||||
|
||||
namespace
|
||||
|
4
server/modules/filter/cache/cachept.hh
vendored
4
server/modules/filter/cache/cachept.hh
vendored
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "cache.hh"
|
||||
|
||||
@ -41,7 +41,7 @@ public:
|
||||
cache_result_t del_value(const CACHE_KEY& key);
|
||||
|
||||
private:
|
||||
typedef std::tr1::shared_ptr<Cache> SCache;
|
||||
typedef std::shared_ptr<Cache> SCache;
|
||||
typedef std::vector<SCache> Caches;
|
||||
|
||||
CachePT(const std::string& name,
|
||||
|
4
server/modules/filter/cache/cachesimple.hh
vendored
4
server/modules/filter/cache/cachesimple.hh
vendored
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include "cache.hh"
|
||||
#include "cache_storage_api.hh"
|
||||
|
||||
@ -55,7 +55,7 @@ private:
|
||||
CacheSimple& operator = (const CacheSimple&);
|
||||
|
||||
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.
|
||||
Storage* m_pStorage; // The storage instance to use.
|
||||
|
2
server/modules/filter/cache/cachest.cc
vendored
2
server/modules/filter/cache/cachest.cc
vendored
@ -16,7 +16,7 @@
|
||||
#include "storage.hh"
|
||||
#include "storagefactory.hh"
|
||||
|
||||
using std::tr1::shared_ptr;
|
||||
using std::shared_ptr;
|
||||
|
||||
CacheST::CacheST(const std::string& name,
|
||||
const CACHE_CONFIG* pConfig,
|
||||
|
4
server/modules/filter/cache/lrustorage.hh
vendored
4
server/modules/filter/cache/lrustorage.hh
vendored
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include "cachefilter.h"
|
||||
#include "cache_storage_api.hh"
|
||||
#include "storage.hh"
|
||||
@ -208,7 +208,7 @@ private:
|
||||
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(size_t space);
|
||||
|
4
server/modules/filter/cache/rules.h
vendored
4
server/modules/filter/cache/rules.h
vendored
@ -17,7 +17,7 @@
|
||||
#include <maxscale/cdefs.h>
|
||||
#include <stdbool.h>
|
||||
#include <jansson.h>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
#include <maxscale/buffer.h>
|
||||
#include <maxscale/session.h>
|
||||
#include <maxscale/pcre2.h>
|
||||
@ -184,7 +184,7 @@ MXS_END_DECLS
|
||||
class CacheRules
|
||||
{
|
||||
public:
|
||||
typedef std::tr1::shared_ptr<CacheRules> SCacheRules;
|
||||
typedef std::shared_ptr<CacheRules> SCacheRules;
|
||||
|
||||
CacheRules(const CacheRules&) = delete;
|
||||
CacheRules& operator = (const CacheRules&) = delete;
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include "../../cache_storage_api.hh"
|
||||
|
||||
class InMemoryStorage
|
||||
@ -92,7 +92,7 @@ private:
|
||||
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;
|
||||
const CACHE_STORAGE_CONFIG m_config;
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include <maxscale/alloc.h>
|
||||
#include <maxscale/paths.h>
|
||||
#include <maxscale/query_classifier.h>
|
||||
@ -25,7 +25,6 @@
|
||||
#include "tester.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace std::tr1;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <tr1/memory>
|
||||
#include <tr1/unordered_map>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <maxscale/filter.hh>
|
||||
#include <maxscale/query_classifier.h>
|
||||
@ -154,7 +154,7 @@ struct QuerySpeed
|
||||
|
||||
class Dbfw;
|
||||
class User;
|
||||
typedef std::tr1::shared_ptr<User> SUser;
|
||||
typedef std::shared_ptr<User> SUser;
|
||||
|
||||
/**
|
||||
* The session structure for Firewall filter.
|
||||
@ -279,7 +279,7 @@ typedef std::list<std::string> ValueList;
|
||||
|
||||
/** Temporary typedef for SRule */
|
||||
class Rule;
|
||||
typedef std::tr1::shared_ptr<Rule> SRule;
|
||||
typedef std::shared_ptr<Rule> SRule;
|
||||
|
||||
/** Helper function for strdup'ing in printf style */
|
||||
char* create_error(const char* format, ...);
|
||||
|
@ -296,5 +296,5 @@ private:
|
||||
mxs::Closer<pcre2_code*> m_re;
|
||||
};
|
||||
|
||||
typedef std::tr1::shared_ptr<Rule> SRule;
|
||||
typedef std::shared_ptr<Rule> SRule;
|
||||
typedef std::list<SRule> RuleList;
|
||||
|
@ -34,7 +34,7 @@ struct UserTemplate
|
||||
ValueList rulenames; /** Names of the rules */
|
||||
};
|
||||
|
||||
typedef std::tr1::shared_ptr<UserTemplate> SUserTemplate;
|
||||
typedef std::shared_ptr<UserTemplate> SUserTemplate;
|
||||
typedef std::list<SUserTemplate> TemplateList;
|
||||
|
||||
/**
|
||||
@ -101,5 +101,5 @@ private:
|
||||
GWBUF *queue, match_mode mode, char** rulename);
|
||||
};
|
||||
|
||||
typedef std::tr1::shared_ptr<User> SUser;
|
||||
typedef std::tr1::unordered_map<std::string, SUser> UserMap;
|
||||
typedef std::shared_ptr<User> SUser;
|
||||
typedef std::unordered_map<std::string, SUser> UserMap;
|
||||
|
@ -122,7 +122,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE()
|
||||
|
||||
MaskingFilter::MaskingFilter(const Config& config, auto_ptr<MaskingRules> sRules)
|
||||
: m_config(config)
|
||||
, m_sRules(sRules)
|
||||
, m_sRules(sRules.release())
|
||||
{
|
||||
MXS_NOTICE("Masking filter [%s] created.", m_config.name().c_str());
|
||||
}
|
||||
@ -171,7 +171,7 @@ uint64_t MaskingFilter::getCapabilities()
|
||||
return RCAP_TYPE_NONE;
|
||||
}
|
||||
|
||||
std::tr1::shared_ptr<MaskingRules> MaskingFilter::rules() const
|
||||
std::shared_ptr<MaskingRules> MaskingFilter::rules() const
|
||||
{
|
||||
return m_sRules;
|
||||
}
|
||||
@ -186,7 +186,7 @@ bool MaskingFilter::reload()
|
||||
MXS_NOTICE("Rules for masking filter '%s' were reloaded from '%s'.",
|
||||
m_config.name().c_str(), m_config.rules().c_str());
|
||||
|
||||
m_sRules = sRules;
|
||||
m_sRules.reset(sRules.release());
|
||||
rval = true;
|
||||
}
|
||||
else
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <memory>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
#include <maxscale/filter.hh>
|
||||
#include "maskingfilterconfig.hh"
|
||||
#include "maskingfiltersession.hh"
|
||||
@ -25,7 +25,7 @@ class MaskingRules;
|
||||
class MaskingFilter : public maxscale::Filter<MaskingFilter, MaskingFilterSession>
|
||||
{
|
||||
public:
|
||||
typedef std::tr1::shared_ptr<MaskingRules> SMaskingRules;
|
||||
typedef std::shared_ptr<MaskingRules> SMaskingRules;
|
||||
typedef MaskingFilterConfig Config;
|
||||
|
||||
~MaskingFilter();
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <memory>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
#include <maxscale/buffer.hh>
|
||||
#include <maxscale/filter.hh>
|
||||
#include "maskingrules.hh"
|
||||
@ -64,7 +64,7 @@ private:
|
||||
bool reject_if_function_used(GWBUF* pPacket);
|
||||
|
||||
private:
|
||||
typedef std::tr1::shared_ptr<MaskingRules> SMaskingRules;
|
||||
typedef std::shared_ptr<MaskingRules> SMaskingRules;
|
||||
|
||||
class ResponseState
|
||||
{
|
||||
|
@ -27,7 +27,7 @@
|
||||
using std::auto_ptr;
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::tr1::shared_ptr;
|
||||
using std::shared_ptr;
|
||||
using maxscale::Closer;
|
||||
|
||||
namespace
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <maxscale/cppdefs.hh>
|
||||
|
||||
#include <string>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <maxscale/jansson.h>
|
||||
@ -67,7 +67,7 @@ public:
|
||||
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
|
||||
@ -394,7 +394,7 @@ public:
|
||||
const char* zUser,
|
||||
const char* zHost) const;
|
||||
|
||||
typedef std::tr1::shared_ptr<Rule> SRule;
|
||||
typedef std::shared_ptr<Rule> SRule;
|
||||
|
||||
private:
|
||||
MaskingRules(json_t* pRoot, const std::vector<SRule>& rules);
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <maxscale/debug.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace std::tr1;
|
||||
|
||||
const char valid_minimal[] =
|
||||
"{"
|
||||
@ -253,7 +252,7 @@ public:
|
||||
{
|
||||
int rc = EXIT_SUCCESS;
|
||||
|
||||
using std::tr1::shared_ptr;
|
||||
using std::shared_ptr;
|
||||
auto_ptr<MaskingRules> sRules = MaskingRules::parse(valid_users);
|
||||
ss_dassert(sRules.get());
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <maxscale/monitor.hh>
|
||||
|
||||
@ -34,7 +34,7 @@ struct GaleraNode
|
||||
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
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <condition_variable>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <maxscale/monitor.hh>
|
||||
@ -29,11 +29,11 @@ extern const char * const CN_PROMOTION_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.
|
||||
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.
|
||||
typedef std::tr1::unordered_map<int64_t, MariaDBServer*> IdToServerMap;
|
||||
typedef std::unordered_map<int64_t, MariaDBServer*> IdToServerMap;
|
||||
// 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
|
||||
class MariaDBMonitor : public maxscale::MonitorInstance
|
||||
|
@ -464,7 +464,7 @@ public:
|
||||
|
||||
private:
|
||||
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.
|
||||
MYSQL_ROW m_rowdata; // Data for current row
|
||||
int64_t m_current_row; // Index of current row
|
||||
|
@ -39,8 +39,8 @@ struct AvroTable
|
||||
avro_schema_t avro_schema; /*< Native Avro schema of the table */
|
||||
};
|
||||
|
||||
typedef std::tr1::shared_ptr<AvroTable> SAvroTable;
|
||||
typedef std::tr1::unordered_map<std::string, SAvroTable> AvroTables;
|
||||
typedef std::shared_ptr<AvroTable> SAvroTable;
|
||||
typedef std::unordered_map<std::string, SAvroTable> AvroTables;
|
||||
|
||||
// Converts replicated events into CDC events
|
||||
class AvroConverter : public RowEventHandler
|
||||
|
@ -16,8 +16,8 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <tr1/memory>
|
||||
#include <tr1/unordered_map>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <maxscale/pcre2.h>
|
||||
#include <maxscale/service.h>
|
||||
@ -72,7 +72,7 @@ struct Column
|
||||
};
|
||||
|
||||
struct TableCreateEvent;
|
||||
typedef std::tr1::shared_ptr<TableCreateEvent> STableCreateEvent;
|
||||
typedef std::shared_ptr<TableCreateEvent> STableCreateEvent;
|
||||
|
||||
/** A CREATE TABLE abstraction */
|
||||
struct TableCreateEvent
|
||||
@ -151,12 +151,12 @@ struct TableMapEvent
|
||||
Bytes column_metadata;
|
||||
};
|
||||
|
||||
typedef std::tr1::shared_ptr<TableMapEvent> STableMapEvent;
|
||||
typedef std::shared_ptr<TableMapEvent> STableMapEvent;
|
||||
|
||||
// Containers for the replication events
|
||||
typedef std::tr1::unordered_map<std::string, STableCreateEvent> CreatedTables;
|
||||
typedef std::tr1::unordered_map<std::string, STableMapEvent> MappedTables;
|
||||
typedef std::tr1::unordered_map<uint64_t, STableMapEvent> ActiveMaps;
|
||||
typedef std::unordered_map<std::string, STableCreateEvent> CreatedTables;
|
||||
typedef std::unordered_map<std::string, STableMapEvent> MappedTables;
|
||||
typedef std::unordered_map<uint64_t, STableMapEvent> ActiveMaps;
|
||||
|
||||
// Handler class for row based replication events
|
||||
class RowEventHandler
|
||||
|
@ -14,14 +14,14 @@
|
||||
|
||||
#include "hintrouterdefs.hh"
|
||||
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
|
||||
#include <maxscale/dcb.h>
|
||||
|
||||
class Dcb
|
||||
{
|
||||
public:
|
||||
typedef std::tr1::shared_ptr<DCB> SDCB;
|
||||
typedef std::shared_ptr<DCB> SDCB;
|
||||
|
||||
explicit Dcb(DCB* pDcb);
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "hintrouterdefs.hh"
|
||||
|
||||
#include <deque>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
@ -29,7 +29,7 @@ class HintRouter;
|
||||
class HintRouterSession : public maxscale::RouterSession
|
||||
{
|
||||
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<SERVER_REF*> RefArray;
|
||||
typedef BackendMap::value_type MapElement;
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
|
||||
#include <tr1/unordered_set>
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
@ -200,7 +200,7 @@ struct Config
|
||||
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
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <maxscale/cppdefs.hh>
|
||||
|
||||
#include <map>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
|
||||
#include <maxscale/backend.hh>
|
||||
#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 */
|
||||
|
||||
class RWBackend;
|
||||
typedef std::tr1::shared_ptr<RWBackend> SRWBackend;
|
||||
typedef std::shared_ptr<RWBackend> SRWBackend;
|
||||
typedef std::list<SRWBackend> SRWBackendList;
|
||||
|
||||
class RWBackend: public mxs::Backend
|
||||
|
@ -30,14 +30,14 @@
|
||||
|
||||
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;
|
||||
|
||||
/** List of slave responses that arrived before the master */
|
||||
typedef std::list< std::pair<mxs::SRWBackend, uint8_t> > SlaveResponseList;
|
||||
|
||||
/** 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
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <tr1/memory>
|
||||
#include <memory>
|
||||
|
||||
#include <maxscale/buffer.hh>
|
||||
#include <maxscale/pcre2.h>
|
||||
@ -128,7 +128,7 @@ private:
|
||||
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;
|
||||
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
|
||||
#include <tr1/unordered_map>
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
using namespace maxscale;
|
||||
|
||||
/** 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
|
||||
{
|
||||
@ -96,7 +96,7 @@ private:
|
||||
time_t m_last_updated;
|
||||
};
|
||||
|
||||
typedef std::tr1::unordered_map<std::string, Shard> ShardMap;
|
||||
typedef std::unordered_map<std::string, Shard> ShardMap;
|
||||
|
||||
class ShardManager
|
||||
{
|
||||
|
Reference in New Issue
Block a user