summaryrefslogtreecommitdiff
path: root/qpid/cpp/managementgen/templates/Class.cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-09-03 18:01:44 +0000
committerTed Ross <tross@apache.org>2008-09-03 18:01:44 +0000
commitbf45f1241b9f801b55ede16d77c3dbbe505f0f89 (patch)
tree419d953ae460ce8e3a7607c9e749baf3c2829e6c /qpid/cpp/managementgen/templates/Class.cpp
parent0da3229c29d5948c3a48631b83a2484dc349a974 (diff)
downloadqpid-python-bf45f1241b9f801b55ede16d77c3dbbe505f0f89.tar.gz
QPID-1174 Updates to the management framework
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@691700 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/managementgen/templates/Class.cpp')
-rw-r--r--qpid/cpp/managementgen/templates/Class.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/qpid/cpp/managementgen/templates/Class.cpp b/qpid/cpp/managementgen/templates/Class.cpp
index 289427d742..2a0e55b34d 100644
--- a/qpid/cpp/managementgen/templates/Class.cpp
+++ b/qpid/cpp/managementgen/templates/Class.cpp
@@ -42,6 +42,11 @@ uint8_t /*MGEN:Class.NameCap*/::md5Sum[16] =
{
/*MGEN:Class.ParentRefAssignment*/
/*MGEN:Class.InitializeElements*/
+/*MGEN:IF(Class.ExistOptionals)*/
+ // Optional properties start out not-present
+ for (uint8_t idx = 0; idx < /*MGEN:Class.PresenceMaskBytes*/; idx++)
+ presenceMask[idx] = 0;
+/*MGEN:ENDIF*/
/*MGEN:IF(Class.ExistPerThreadStats)*/
maxThreads = agent->getMaxThreads();
perThreadStatsArray = new struct PerThreadStats*[maxThreads];
@@ -65,6 +70,7 @@ namespace {
const string TYPE("type");
const string ACCESS("access");
const string INDEX("index");
+ const string OPTIONAL("optional");
const string UNIT("unit");
const string MIN("min");
const string MAX("max");
@@ -76,6 +82,11 @@ namespace {
const string DEFAULT("default");
}
+void /*MGEN:Class.NameCap*/::registerClass(ManagementAgent* agent)
+{
+ agent->RegisterClass(packageName, className, md5Sum, writeSchema);
+}
+
void /*MGEN:Class.NameCap*/::writeSchema (Buffer& buf)
{
FieldTable ft;
@@ -90,9 +101,9 @@ void /*MGEN:Class.NameCap*/::writeSchema (Buffer& buf)
buf.putShort (/*MGEN:Class.EventCount*/); // Event Count
// Properties
-/*MGEN:Class.ConfigElementSchema*/
+/*MGEN:Class.PropertySchema*/
// Statistics
-/*MGEN:Class.InstElementSchema*/
+/*MGEN:Class.StatisticSchema*/
// Methods
/*MGEN:Class.MethodSchema*/
// Events
@@ -118,7 +129,11 @@ void /*MGEN:Class.NameCap*/::writeProperties (Buffer& buf)
configChanged = false;
writeTimestamps (buf);
-/*MGEN:Class.WriteConfig*/
+/*MGEN:IF(Class.ExistOptionals)*/
+ for (uint8_t idx = 0; idx < /*MGEN:Class.PresenceMaskBytes*/; idx++)
+ buf.putOctet(presenceMask[idx]);
+/*MGEN:ENDIF*/
+/*MGEN:Class.WriteProperties*/
}
void /*MGEN:Class.NameCap*/::writeStatistics (Buffer& buf, bool skipHeaders)
@@ -140,7 +155,7 @@ void /*MGEN:Class.NameCap*/::writeStatistics (Buffer& buf, bool skipHeaders)
/*MGEN:Class.Assign*/
if (!skipHeaders)
writeTimestamps (buf);
-/*MGEN:Class.WriteInst*/
+/*MGEN:Class.WriteStatistics*/
// Maintenance of hi-lo statistics
/*MGEN:Class.HiLoStatResets*/
@@ -162,3 +177,4 @@ void /*MGEN:Class.NameCap*/::doMethod (/*MGEN:Class.DoMethodArgs*/)
outBuf.putShortString (Manageable::StatusText (status));
}
+/*MGEN:Class.EventMethodBodies*/