MME2 changes - Propped commits from openmme/paging branch. Added scripts
for code gen
Change-Id: Ie55032217232214ac8544ca76ea34335205329e4
diff --git a/scripts/GtpV2StackCodeGen/tts/grpietemplate.cpp.tt b/scripts/GtpV2StackCodeGen/tts/grpietemplate.cpp.tt
new file mode 100644
index 0000000..9a68e5a
--- /dev/null
+++ b/scripts/GtpV2StackCodeGen/tts/grpietemplate.cpp.tt
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2019-present Infosys Limited
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+/******************************************************************************
+ *
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/GtpV2StackCodeGen/tts/grpietemplate.cpp.tt>
+ ******************************************************************************/
+#include "[% tempdata.fileName %].h"
+#include "gtpV2GrpIeDataTypes.h"
+#include "manual/gtpV2GroupedIe.h"
+[%fileList =tempdata.fileName -%]
+
+[% FOREACH inst IN tempdata.$fileList -%]
+#include "[% inst.fileName %].h"
+[% END -%]
+
+[% tempdata.className %]::[% tempdata.className %]()
+{
+ ieType = [% tempdata.className %]Type;
+
+[% FOREACH inst IN tempdata.$fileList -%]
+ [% inst.className %]* [% inst.fileName %]_p = new ([% inst.className %]);
+ insertGroupedIeObject([% inst.msgType %], [% inst.instance %], [% inst.fileName %]_p);
+[% END -%]
+}
+
+[% tempdata.className %]::~[% tempdata.className %]() {
+// TODO Auto-generated destructor stub
+}
+
+GtpV2GroupedIe& [% tempdata.className %]::getGroupedIe(Uint8 msgType, Uint8 instance)
+{
+ std::map<Uint16, GtpV2GroupedIe*>::iterator it;
+ Uint16 key = msgType;
+ key = (key << 8) + instance;
+ it = groupedIeObjectContainer.find(key);
+ return *(it->second);
+}
+
+void [% tempdata.className %]::insertGroupedIeObject(Uint8 msgType, Uint8 instance, GtpV2GroupedIe* grpIe_p)
+{
+
+ Uint16 key = msgType;
+ key = (key << 8) + instance;
+
+ groupedIeObjectContainer.insert(std::pair<Uint16, GtpV2GroupedIe*>(key, grpIe_p));
+
+}
\ No newline at end of file