blob: eb8e22e9fd4e4ebf9a415dc30344ffd7412f3be3 [file] [log] [blame]
## Copyright 2007-2008 Cisco Systems Inc.
##
## Licensed 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:
// $version
// $now
// This file is automatically created and should not be edited!
// Re-implement these methods by overriding them in Impl$intf.name()$suffix
// or by making appropriate assignments to the delegates.
#set($i = $intf.name())
#set($vfname = "ValueFactory$i")
#set($intfname = "$i$suffix")
#set($clname = "Base$intfname")
#if ($helper.isServer($mc))
#set($peer = "client")
#set($peerclass = "Remote${i}Client")
#else
#set($peer = "server")
#set($peerclass = "Remote${i}Server")
#end
using System;
#foreach( $n in $intf.iterator() )
#if ($n.isExtern())
#if ($n.hasImport( $helper ))
using $n.getImport( $helper );
#end
#end
#end
using Org.Apache.Etch.Bindings.Csharp.Support;
/// <summary>
/// Base Implementation of $intfname, with default method implementations
/// which throw NotSupportedException. Either implement the delegates or extend
/// this class to provide implementations of messages from the $peer
/// </summary>
namespace $intf.parent().name()
{
///<summary>Call to message translator for $intfname.</summary>
public class $clname : $intfname, ObjSession
{
#set( $delegateTypeHeader = "_delegate_type_" )
#set( $delegateVarHeader = "_delegate_" )
#set( $sep = "" )
#foreach ($mthd in $intf.iterator())
#if ($mthd.isMsgDir($mc) || $mthd.isMsgDirBoth())
#if (!$mthd.isHidden())
#if(!$methodList.contains("$delegateVarHeader$mthd.name().name()"))
#set ( $addMethodListStatus = $methodList.add("$delegateVarHeader$mthd.name().name()") )
/// <summary>
/// Delegate Definition; Please do not modify
/// </summary>
public delegate $helper.getTypeName( $mthd.type() ) $delegateTypeHeader$mthd.name() (
#set( $sep = "" )
#foreach( $param in $mthd.iterator() )
$sep$helper.getTypeName( $param.type() ) $param.name()
#set( $sep = ", " )
#end
);
/// <summary>
/// Add your implementation method to this variable
/// </summary>
public $delegateTypeHeader$mthd.name() $delegateVarHeader$mthd.name();
#end
#end
#end
#end
#foreach( $x in $intf.iterator() )
#if( $x.isMixin() )
#set( $m = $x.getModule() )
#set( $z = $m.iterator().next() )
#foreach( $n in $z.messages( true ) )
#if($n.isMsgDir($mc) || $n.isMsgDirBoth() )
#if(!$n.isHidden())
#if(!$methodList.contains("$delegateVarHeader$n.name().name()"))
#set ( $addMethodListStatus = $methodList.add("$delegateVarHeader$n.name().name()") )
#if($n.isOneway())
/// <summary>
/// Delegate Definition; Please do not modify
/// </summary>
public delegate $helper.getTypeName( $n.type() ) $delegateTypeHeader$n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$helper.getTypeName( $p.type() ) $p.name()
#set( $sep = ", " )
#end
);
/// <summary>
/// Add your implementation method to this variable
/// </summary>
public $delegateTypeHeader$n.name() $delegateVarHeader$n.name();
#else
/// <summary>
/// Delegate Definition; Please do not modify
/// </summary>
public delegate $helper.getTypeName( $n.type() ) $delegateTypeHeader$n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$helper.getTypeName( $p.type() ) $p.name()
#set( $sep = ", " )
#end
);
/// <summary>
/// Add your implementation method to this variable
/// </summary>
public $delegateTypeHeader$n.name() $delegateVarHeader$n.name();
#end
#end
#end
#end
#end
#end
#end
///<summary>Constructs the $clname.</summary>
public $clname()
{
}
public virtual object _SessionQuery(Object query)
{
throw new NotSupportedException( "unknown query: " + query);
}
public virtual void _SessionControl(Object control, Object value)
{
throw new NotSupportedException( "unknown control: " + control);
}
public virtual void _SessionNotify( Object eventObj)
{
if (eventObj is Exception)
Console.WriteLine((Exception) eventObj);
}
#foreach ($mthd in $intf.iterator())
#if ($mthd.isMsgDir($mc) || $mthd.isMsgDirBoth())
#if (!$mthd.isHidden())
#if(!$methodList.contains($mthd.name().name()))
#set ( $addMethodListStatus = $methodList.add($mthd.name().name()) )
public virtual $helper.getTypeName( $mthd.type() ) $mthd.name() (
#set( $sep = "" )
#foreach( $param in $mthd.iterator() )
$sep$helper.getTypeName( $param.type() ) $param.name()
#set( $sep = ", " )
#end
)
{
if ($delegateVarHeader$mthd.name() != null)
#if($helper.getTypeName( $mthd.type() ).equals("void"))
$delegateVarHeader$mthd.name()(
#set( $sep = "" )
#foreach( $param in $mthd.iterator() )
$sep$param.name()
#set( $sep = "," )
#end
);
#else
return $delegateVarHeader$mthd.name()(
#set( $sep = "" )
#foreach( $param in $mthd.iterator() )
$sep$param.name()
#set( $sep = "," )
#end
);
#end
else
throw new NotSupportedException( "$mthd.name()" );
}
#end
#end
#end
#end
#foreach( $x in $intf.iterator() )
#if( $x.isMixin() )
#set( $m = $x.getModule() )
#set( $z = $m.iterator().next() )
#foreach( $n in $z.messages( true ) )
#if($n.isMsgDir($mc) || $n.isMsgDirBoth() )
#if(!$n.isHidden())
#if(!$methodList.contains($n.name().name()))
#set ( $addMethodListStatus = $methodList.add($n.name().name()) )
#if($n.isOneway())
public virtual $helper.getTypeName( $n.type() ) $n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$helper.getTypeName( $p.type() ) $p.name()
#set( $sep = ", " )
#end
)
{
if ($delegateVarHeader$n.name() != null)
#if($helper.getTypeName( $n.type() ).equals("void"))
$delegateVarHeader$n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$p.name()
#set( $sep = "," )
#end
);
#else
return $delegateVarHeader$n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$p.name()
#set( $sep = "," )
#end
);
#end
else
throw new NotSupportedException( "$n.name()" );
}
#else
public virtual $helper.getTypeName( $n.type() ) $n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$helper.getTypeName( $p.type() ) $p.name()
#set( $sep = ", " )
#end
)
{
if ($delegateVarHeader$n.name() != null)
#if($helper.getTypeName( $n.type() ).equals("void"))
$delegateVarHeader$n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$p.name()
#set( $sep = "," )
#end
);
#else
return $delegateVarHeader$n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$p.name()
#set( $sep = "," )
#end
);
#end
else
throw new NotSupportedException( "$n.name()" );
}
#end
#end
#end
#end
#end
#end
#end
}
}