summaryrefslogtreecommitdiff
path: root/qpid/cpp/managementgen/qmfgen
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2013-09-20 18:59:30 +0000
committerKim van der Riet <kpvdr@apache.org>2013-09-20 18:59:30 +0000
commitc70bf3ea28cdf6bafd8571690d3e5c466a0658a2 (patch)
tree68b24940e433f3f9c278b054d9ea1622389bd332 /qpid/cpp/managementgen/qmfgen
parentfcdf1723c7b5cdf0772054a93edb6e7d97c4bb1e (diff)
downloadqpid-python-c70bf3ea28cdf6bafd8571690d3e5c466a0658a2.tar.gz
QPID-4984: WIP - Merge from trunk r.1525056
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/linearstore@1525101 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/managementgen/qmfgen')
-rw-r--r--qpid/cpp/managementgen/qmfgen/templates/Class.cpp19
-rw-r--r--qpid/cpp/managementgen/qmfgen/templates/Class.h2
-rw-r--r--qpid/cpp/managementgen/qmfgen/templates/Makefile.mk40
3 files changed, 14 insertions, 47 deletions
diff --git a/qpid/cpp/managementgen/qmfgen/templates/Class.cpp b/qpid/cpp/managementgen/qmfgen/templates/Class.cpp
index d3033db7e1..bb7bd66fc6 100644
--- a/qpid/cpp/managementgen/qmfgen/templates/Class.cpp
+++ b/qpid/cpp/managementgen/qmfgen/templates/Class.cpp
@@ -70,6 +70,16 @@ uint8_t /*MGEN:Class.NameCap*/::md5Sum[MD5_LEN] =
/*MGEN:Class.NameCap*/::~/*MGEN:Class.NameCap*/ ()
{
+/*MGEN:IF(Class.ExistPerThreadStats)*/
+ for (int idx = 0; idx < maxThreads; idx++)
+ if (perThreadStatsArray[idx] != 0)
+ delete perThreadStatsArray[idx];
+ delete[] perThreadStatsArray;
+/*MGEN:ENDIF*/
+}
+
+void /*MGEN:Class.NameCap*/::debugStats (const std::string& comment)
+{
/*MGEN:IF(Root.GenLogs)*/
bool logEnabled;
QPID_LOG_TEST_CAT(trace, model, logEnabled);
@@ -77,19 +87,14 @@ uint8_t /*MGEN:Class.NameCap*/::md5Sum[MD5_LEN] =
{
::qpid::types::Variant::Map map;
mapEncodeValues(map, false, true);
- QPID_LOG_CAT(trace, model, "Mgmt delete " << className
+ QPID_LOG_CAT(trace, model, "Mgmt " << comment << ((comment!="")?(" "):("")) << className
<< ". id:" << getKey()
<< " Statistics: " << map);
}
/*MGEN:ENDIF*/
-/*MGEN:IF(Class.ExistPerThreadStats)*/
- for (int idx = 0; idx < maxThreads; idx++)
- if (perThreadStatsArray[idx] != 0)
- delete perThreadStatsArray[idx];
- delete[] perThreadStatsArray;
-/*MGEN:ENDIF*/
}
+
namespace {
const string NAME("name");
const string TYPE("type");
diff --git a/qpid/cpp/managementgen/qmfgen/templates/Class.h b/qpid/cpp/managementgen/qmfgen/templates/Class.h
index cd43cef7f4..84fe3df5da 100644
--- a/qpid/cpp/managementgen/qmfgen/templates/Class.h
+++ b/qpid/cpp/managementgen/qmfgen/templates/Class.h
@@ -118,6 +118,8 @@ namespace qmf {
/*MGEN:Root.ExternMethod*/ ~/*MGEN:Class.NameCap*/();
+ void debugStats (const std::string& comment);
+
/*MGEN:Class.SetGeneralReferenceDeclaration*/
/*MGEN:Root.ExternMethod*/ static void registerSelf(
diff --git a/qpid/cpp/managementgen/qmfgen/templates/Makefile.mk b/qpid/cpp/managementgen/qmfgen/templates/Makefile.mk
deleted file mode 100644
index b9adb4a2d2..0000000000
--- a/qpid/cpp/managementgen/qmfgen/templates/Makefile.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-/*MGEN:commentPrefix=#*/
-/*MGEN:Root.Disclaimer*/
-/*MGEN:IF(Makefile.QpidBroker)*/
-/*MGEN:mgenDir=$(mgen_dir)*/
-/*MGEN:specDir=$(top_srcdir)/../specs*/
-
-mgen_generator=/*MGEN:Makefile.GenSources*/
-
-mgen_broker_cpp=/*MGEN:Makefile.GenCppFiles*/
-
-# Header file install rules.
-/*MGEN:Makefile.HeaderInstalls*/
-if GENERATE
-$(srcdir)/managementgen.mk: $(mgen_generator)
- $(mgen_cmd)
-
-$(mgen_generator):
-endif
-/*MGEN:ENDIF*/
-
-qmfgen_sources=/*MGEN:Makefile.GeneratedFiles*/
-