diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2013-04-16 19:31:57 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2013-04-16 19:31:57 +0000 |
| commit | b44cea23fc4b122f838c3a8248ceeb592a747699 (patch) | |
| tree | b13dd62ced663a725642d1762314c6d57fdd7d2b /qpid/cpp/src | |
| parent | 6d54493be7259eb7b56e6ea376fcb2959030d97d (diff) | |
| download | qpid-python-b44cea23fc4b122f838c3a8248ceeb592a747699.tar.gz | |
QPID-3921: Move code from Statement.h to Statement.cpp
So it won't slow down the build anymore.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1468574 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/log/Statement.cpp | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/log/Statement.cpp b/qpid/cpp/src/qpid/log/Statement.cpp index 09ef458547..e70069fe7b 100644 --- a/qpid/cpp/src/qpid/log/Statement.cpp +++ b/qpid/cpp/src/qpid/log/Statement.cpp @@ -21,6 +21,7 @@ #include <boost/bind.hpp> #include <stdexcept> #include <algorithm> +#include <list> #include <ctype.h> namespace qpid { @@ -53,8 +54,64 @@ std::string quote(const std::string& str) { // // Instance of name hints // -static CategoryFileNameHints filenameHints; +class CategoryFileNameHints { +public: + CategoryFileNameHints(){ + hintList.push_back(std::make_pair("AsynchIo", network)); + hintList.push_back(std::make_pair("TCP", network)); + hintList.push_back(std::make_pair("epoll", network)); + hintList.push_back(std::make_pair("Pollable", network)); + hintList.push_back(std::make_pair("Socket", network)); + + hintList.push_back(std::make_pair("Sasl", security)); + hintList.push_back(std::make_pair("Ssl", security)); + hintList.push_back(std::make_pair("Acl", security)); + hintList.push_back(std::make_pair("acl", security)); + hintList.push_back(std::make_pair("cyrus", security)); + + hintList.push_back(std::make_pair("amqp_", protocol)); + hintList.push_back(std::make_pair("framing", protocol)); + + hintList.push_back(std::make_pair("management", management)); + hintList.push_back(std::make_pair("qmf", management)); + hintList.push_back(std::make_pair("console", management)); + hintList.push_back(std::make_pair("Management", management)); + + hintList.push_back(std::make_pair("cluster", ha)); + hintList.push_back(std::make_pair("qpid/ha", ha)); + hintList.push_back(std::make_pair("qpid\\ha", ha)); + hintList.push_back(std::make_pair("replication", ha)); + hintList.push_back(std::make_pair("ClusterSafe", ha)); + + hintList.push_back(std::make_pair("broker", broker)); + hintList.push_back(std::make_pair("SessionState",broker)); + hintList.push_back(std::make_pair("DataDir", broker)); + hintList.push_back(std::make_pair("qpidd", broker)); + hintList.push_back(std::make_pair("xml", broker)); + hintList.push_back(std::make_pair("QpidBroker", broker)); + + hintList.push_back(std::make_pair("store", store)); + + hintList.push_back(std::make_pair("assert", system)); + hintList.push_back(std::make_pair("Exception", system)); + hintList.push_back(std::make_pair("sys", system)); + hintList.push_back(std::make_pair("SCM", system)); + + hintList.push_back(std::make_pair("tests", test)); + + hintList.push_back(std::make_pair("messaging", messaging)); + hintList.push_back(std::make_pair("types", messaging)); + + hintList.push_back(std::make_pair("client", client)); + } + + static Category categoryOf(const char*const fName); +private: + std::list<std::pair<const char* const, Category> > hintList; +}; + +static CategoryFileNameHints filenameHints; Category CategoryFileNameHints::categoryOf(const char* const fName) { for (std::list<std::pair<const char* const, Category> >::iterator |
