<'
# Copyright (c) 2012-2013, 2018, 2025-2026 LAAS/CNRS
# All rights reserved.
#
# Redistribution and use  in source  and binary  forms,  with or without
# modification, are permitted provided that the following conditions are
# met:
#
#   1. Redistributions of  source  code must retain the  above copyright
#      notice and this list of conditions.
#   2. Redistributions in binary form must reproduce the above copyright
#      notice and  this list of  conditions in the  documentation and/or
#      other materials provided with the distribution.
#
#                                      Anthony Mallet on Wed Apr 18 2012
#

if {[llength $argv] != 1} { error "expected arguments: component" }
lassign $argv component

# compute handy shortcuts
set comp [$component name]
set COMP [string toupper [$component name]]

lang c
'>
#include "autoconf/acheader.h"

#include "<"$comp">/c/client.h"
#include "typeops-c.h"
#include "private.h"
<'foreach p [$component ports] {'>


genom_public void
genom_<"$comp">_client_<"[$p name]">_init_data(
  <"[[$p datatype] argument reference data]">)
{
  genom_tinit_<"[[$p datatype] mangle]">(data);
}

genom_public void
genom_<"$comp">_client_<"[$p name]">_fini_data(
  <"[[$p datatype] argument reference data]">)
{
  genom_tfini_<"[[$p datatype] mangle]">(data);
}
<'}'>
