summaryrefslogtreecommitdiff
path: root/local/mib2c-conf.d/mfd-data-get.m2c
diff options
context:
space:
mode:
Diffstat (limited to 'local/mib2c-conf.d/mfd-data-get.m2c')
-rw-r--r--local/mib2c-conf.d/mfd-data-get.m2c168
1 files changed, 168 insertions, 0 deletions
diff --git a/local/mib2c-conf.d/mfd-data-get.m2c b/local/mib2c-conf.d/mfd-data-get.m2c
new file mode 100644
index 0000000..cf1c848
--- /dev/null
+++ b/local/mib2c-conf.d/mfd-data-get.m2c
@@ -0,0 +1,168 @@
+############################################################# -*- c -*-
+## generic include for XXX. Do not use directly.
+##
+## $Id$
+########################################################################
+########################################################################
+## lower conf files get confused with multiple processing types, so
+## set single options
+@eval $mfd_data_get_processing_type_save = "$m2c_processing_type"@
+@if "$mfd_processing_types" =~ /h/@
+@eval $m2c_processing_type = 'h'@
+@if $m2c_create_fewer_files != 1@
+@ open ${name}_data_get.h@
+@ eval $hack = "Id"@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version $Revision$ of $RCSfile$
+ *
+ * $$hack:$
+ *
+ * @file ${name}_data_get.h
+ *
+ * @addtogroup get
+ *
+ * Prototypes for get functions
+ *
+ * @{
+ */
+@ eval $m2c_tmp = "$name"@
+@ eval $name = "${name}_DATA_GET"@
+@ include generic-header-top.m2i@
+@ eval $name = "$m2c_tmp"@
+@end@ // m2c_create_fewer_files
+@if $m2c_mark_boundary == 1@
+/** START header generated by $RCSfile$ $Revision$ */
+@end@
+########################################################################
+##
+/* *********************************************************************
+ * GET function declarations
+ */
+
+/* *********************************************************************
+ * GET Table declarations
+ */
+@foreach $table table@
+@ include m2c_setup_table.m2i@
+@ include details-table.m2i@
+ /*
+ * indexes
+ */
+@ foreach $node index@
+@ include m2c_setup_node.m2i@
+@ if $m2c_node_skip_mapping != 1@
+ int ${node}_map($m2c_node_map_param);
+@ end@ # // skip mapping
+@ end@ # index
+
+@ foreach $node nonindex@
+@ include m2c_setup_node.m2i@
+@ if $m2c_node_skip_mapping != 1@
+ int ${node}_map($m2c_node_map_param);
+@ end@ # // skip mapping
+ int ${node}_get( ${context}_rowreq_ctx *rowreq_ctx, $m2c_node_param_ref );
+@ end@ // nonindex
+
+@ include generic-table-indexes-set.m2i@
+
+@end@ // table
+
+@if $m2c_mark_boundary == 1@
+/** END header generated by $RCSfile$ $Revision$ */
+@end@
+@if $m2c_create_fewer_files != 1@
+@ eval $m2c_tmp = "$name"@
+@ eval $name = "${name}_DATA_GET"@
+@ include generic-header-bottom.m2i@
+@ eval $name = "$m2c_tmp"@
+/** @} */
+@end@ // m2c_create_fewer_files
+######################################################################
+@end@ // $mfd_processing_types =~ /h/
+######################################################################
+######################################################################
+######################################################################
+@if "$mfd_processing_types" =~ /c/@
+@eval $m2c_processing_type = 'c'@
+@if $m2c_create_fewer_files != 1@
+@open ${name}_data_get.c@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version $Revision$ of $RCSfile$
+ *
+ * $$hack:$
+ */
+@include generic-source-includes.m2i@
+
+/** @defgroup data_get data_get: Routines to get data
+ *
+ * TODO:230:M: Implement $context get routines.
+ * TODO:240:M: Implement $context mapping routines (if any).
+ *
+ * These routine are used to get the value for individual objects. The
+ * row context is passed, along with a pointer to the memory where the
+ * value should be copied.
+ *
+ * @{
+ */
+@end@ // m2c_create_fewer_files
+@if $m2c_mark_boundary == 1@
+/** START code generated by $RCSfile$ $Revision$ */
+@end@
+@foreach $table table@
+@ include m2c_setup_table.m2i@
+@ include details-table.m2i@
+
+/* ---------------------------------------------------------------------
+ * TODO:200:r: Implement $context data context functions.
+ */
+@ if (($m2c_data_allocate == 1) || ($m2c_undo_embed == 0)) && ("$m2c_data_context" ne "generated")@
+@ include generic-data-allocate.m2i@
+@ end@
+
+##
+## do nodes
+##
+##// internal only? how to know how to map external?
+@ foreach $node index@
+@ include m2c_setup_node.m2i@
+@ if $m2c_node_skip_mapping != 0@
+@ next@
+@ end@
+@ include details-node.m2i@
+@ if $m2c_report_progress == 1@
+@ print | | +-> Processing index $node@
+@ end@
+@ include generic-value-map-func.m2i@
+@ end@ # foreach column
+
+@ include generic-table-indexes-set.m2i@
+
+@ foreach $node nonindex@
+@ include m2c_setup_node.m2i@
+@ include details-node.m2i@
+@ if $node.noaccess == 1@
+@ next@ # skip to next column
+@ end@
+@ if $m2c_report_progress == 1@
+@ print | | +-> Processing nonindex $node@
+@ end@
+@ if $m2c_node_skip_mapping == 0@
+@ include generic-value-map-func.m2i@
+@ end@
+@ include node-get.m2i@
+@ end@ # foreach column
+
+@end@ # foreach table
+
+##
+/** @} */
+########################################################################
+@if $m2c_mark_boundary == 1@
+/** END code generated by $RCSfile$ $Revision$ */
+@end@
+########################################################################
+@end@ // $mfd_processing_types =~ /c/
+## restore original processing types
+@eval $m2c_processing_type = "$mfd_data_get_processing_type_save"@