summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2013-04-16 19:31:57 +0000
committerAndrew Stitcher <astitcher@apache.org>2013-04-16 19:31:57 +0000
commit3f07cf2294c94d459120ffd3830968c70926003d (patch)
treebae6bfffdb76a3adb5743dfd99a892a9816f9c52 /cpp/src
parentc127afe99b3f6b164f9efeb9f746cf2ce2f421b0 (diff)
downloadqpid-python-3f07cf2294c94d459120ffd3830968c70926003d.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/qpid@1468574 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/log/Statement.cpp59
1 files changed, 58 insertions, 1 deletions
diff --git a/cpp/src/qpid/log/Statement.cpp b/cpp/src/qpid/log/Statement.cpp
index 09ef458547..e70069fe7b 100644
--- a/cpp/src/qpid/log/Statement.cpp
+++ b/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