| ## |
| ## 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. |
| ## |
| |
| // This file automatically generated by: |
| // Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0) |
| // Fri Aug 28 15:58:20 CEST 2009 |
| // This file is automatically created and should not be edited! |
| |
| \#include "$helper.getImplFileNameH($intf, $suffix)" |
| \#include "etch_url.h" |
| \#include "etch_arrayval.h" |
| \#include "etch_binary_tdo.h" |
| \#include "etch_exception.h" |
| \#include "etch_general.h" |
| \#include "etch_log.h" |
| |
| \#include <stdio.h> |
| |
| unsigned short CLASSID_$helper.getImplName($intf, $suffix).toUpperCase(); |
| |
| #foreach($serviceName in $helper.getUsedServiceNames($intf)) |
| \#include "${serviceName.toLowerCase()}.h" |
| #end |
| |
| #if($helper.isServer($mc)) |
| char* $helper.getServiceName($intf).toUpperCase()_ETCHSIMP = "SIMP"; |
| #end |
| #if($helper.isClient($mc)) |
| char* $helper.getServiceName($intf).toUpperCase()_ETCHCIMP = "CIMP"; |
| #end |
| |
| /* generated signatures */ |
| int destroy_${helper.getImplName($intf, $suffix)}x(void*); |
| $helper.getImplName($intf, $suffix)* init_$helper.getImplName($intf, $suffix)(struct $helper.getRemoteName($intf, $helper.getRemoteDirectionName($mc))*, etch_object_destructor); |
| |
| ## check if any Message goes to $suffix direction |
| |
| /* - - - - - - - - |
| * instantiation |
| * - - - - - - - - |
| */ |
| |
| /** |
| * new_$helper.getImplName($intf, $suffix)() |
| * $helper.getImplName($intf, $suffix) constructor. |
| * add your custom initialization and virtual method overrides here. |
| */ |
| $helper.getImplName($intf, $suffix)* new_$helper.getImplName($intf, $suffix)(struct $helper.getRemoteName($intf, $helper.getRemoteDirectionName($mc))* $helper.getRemoteDirectionName($mc)) |
| { |
| $helper.getImplName($intf, $suffix)* p$suffix /* allocate object and assign default virtuals */ |
| = init_$helper.getImplName($intf, $suffix)($helper.getRemoteDirectionName($mc), destroy_${helper.getImplName($intf, $suffix)}x); |
| #if($helper.isServer($mc)) |
| i_$helper.getBaseName($intf, $suffix)* p${suffix}_base = p${suffix}->$helper.getBaseName($intf, $suffix)_base; |
| |
| ((etch_object*)p${suffix}_base)->class_id = get_dynamic_classid_unique(&CLASSID_$helper.getImplName($intf, $suffix).toUpperCase()); |
| #end |
| /* add virtual method overrides, if any, here */ |
| //p${suffix}->xxx = implementation |
| |
| return p$suffix; |
| } |
| |
| |
| /** |
| * destroy_${helper.getImplName($intf, $suffix)}x() |
| * destructor for any user allocated memory. |
| * this code is invoked by the private perf_client_impl destructor, |
| * via perf_client.destroyex(). add code here to destroy any memory you |
| * may have allocated for your custom perf_client implementation. |
| */ |
| int destroy_${helper.getImplName($intf, $suffix)}x(void* data) |
| { |
| /* |
| $helper.getImplName($intf, $suffix)* thisx = ($helper.getImplName($intf, $suffix)*)data; |
| */ |
| /* * * add custom destruction here * * */ |
| /* etch_free(thisx->exampleobj); */ |
| |
| return 0; |
| } |
| |
| /* - - - - - - - - - - - - - - - - - - - |
| * session interface method overrides |
| * - - - - - - - - - - - - - - - - - - - |
| */ |
| |
| /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| * implementations of $helper.getBaseName($intf, $suffix) messages from server, if any |
| * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| */ |
| |