blob: 8868d872512f88aabf2abdadca5909957ee9016b [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!
using System;
#foreach( $n in $intf.iterator() )
#if ($n.isExtern())
#if ($n.hasImport( $helper ))
using $n.getImport( $helper );
#end
#end
#end
namespace $intf.parent().name()
{
#if( $intf.hasDescr() )
///<summary>
#foreach( $s in $intf.descr() )
///$s
#end
///</summary>
#end
#set($sep = ":")
#if ($hasBaseClass)
public interface $intf.name()$suffix $sep $intf.name()
#set ($sep = ",")
#else
public interface $intf.name()$suffix
#end
#foreach( $n in $intf.iterator() )
#if ($n.isMixin())
$sep $n.fqname()$suffix
#set($sep = ",")
#end
#end
{
#foreach( $n in $intf.iterator() )
#if ($n.isMessage())
#if ($n.isMsgDir($mc))
#if (!$n.isHidden())
#if ($n.hasDescr())
///<summary>
#foreach($s in $n.descr())
///$s
#end
///</summary>
#end
#foreach( $p in $n.iterator() )
#set($first = true)
#set ($count = 0)
#foreach( $s in $p.descr() )
#if ($first)
#set($count = $count + 1)
#set($first = false)
///<param name="$p.name()">$s
#else
///$s
#end
#end
#if ($count > 0)
///</param>
#end
#end
#if ($n.hasReturn())
#set($first = true)
#foreach( $s in $n.returnDescr() )
#if ($first)
#set($first = false)
///<returns>$s
#else
///$s
#end
#end
///</returns>
#end
#if ($n.hasThrown())
#if ($n.hasDescr())
#foreach($t in $n.thrown().iterator())
///<Exception cref="$t.name().name()"> throws $t.name().name()</Exception>
#end
#end
#end
$helper.getTypeName( $n.type() ) $n.name()(
#set( $sep = "" )
#foreach( $p in $n.iterator() )
$sep$helper.getTypeName( $p.type() ) $p.name()
#set( $sep = ", " )
#end
);
#end
#end
#elseif ($n.isConstant())
#elseif ($n.isEnumx())
#elseif ($n.isStruct() || $n.isExcept())
#elseif ($n.isExtern())
## ignore extern
#elseif ($n.isMixin())
## ignore mixin
#else
#end
#end
}
#if (!$hasBaseClass)
namespace types
{
namespace $intf.name()$suffix
{
public static class Consts$intf.name()$suffix
{
#foreach( $n in $intf.iterator() )
#if ($n.isConstant())
#if ($n.hasDescr())
///<summary>
#foreach( $s in $n.descr() )
///$s
#end
///</summary>
#end
public static $helper.getNativeTypeName( $n.type() ) $n.name() = $helper.getTypeValue( $n.type(), $n.value() );
#end
#end
}
#foreach( $n in $intf.iterator() )
#if ($n.isEnumx())
#if (!$hasBaseClass)
#if ($n.hasDescr())
///<summary>
#foreach( $s in $n.descr() )
///$s
#end
///</summary>
#end
public enum $n.name()
{
#set( $sep = "" )
#foreach( $i in $n.iterator() )
#if ($i.hasDescr())
///<summary>
#foreach( $s in $i.descr() )
///$s
#end
///</summary>
#end
$sep$i.name()
#set( $sep = ", " )
#end
}
#end
#elseif ($n.isStruct() || $n.isExcept())
#if (!$hasBaseClass)
#if ($n.hasDescr())
///<summary>
#foreach( $s in $n.descr() )
///$s
#end
///</summary>
#end
#if( $n.hasExtends() )
public class $n.name() : $n.getExtends().name()
#else
#if( $n.isExcept() )
#if( $n.isUnchecked() )
public class $n.name() : Exception
#else
public class $n.name() : Exception
#end
#else
[Serializable]
public class $n.name()
#end
#end
{
/// <summary>Constructs the $n.name(). Don't init anything.</summary>
public $n.name()()
{
// don't init anything.
}
#if ($n.hasAnyParameters())
///<summary>Constructs the $n.name().</summary>
#foreach( $i in $n.getAllParameters() )
#if ($i.hasDescr())
///<param name="$i.name()">
#foreach( $s in $i.descr() )
///$s
#end
///</param>
#end
#end
public $n.name()
(
#set( $sep = "" )
#foreach( $i in $n.getAllParameters() )
$sep$helper.getTypeName( $i.type() ) $i.name()
#set( $sep = ", " )
#end
)
#if( $n.hasExtends() )
: base(
#set( $sep = "" )
#foreach( $i in $n.getExtends().getAllParameters() )
$sep$i.name()
#set( $sep = ", " )
#end
)
{
#else
{
#end
#foreach( $i in $n.getParameters() )
this.$i.name() = $i.name();
#end
}
#end
#if( $n.isExcept() )
#if ($n.hasExtends())
public new String GetMessage()
#else
public String GetMessage()
#end
{
return $helper.formatString( $n, true );
}
#else
public override String ToString()
{
return $helper.formatString( $n, false );
}
#end
#foreach( $i in $n.iterator() )
#if ($i.hasDescr())
///<summary>
#foreach( $s in $i.descr() )
///$s
#end
///</summary>
#end
public $helper.getTypeName( $i.type() ) $i.name();
#if ($i.hasDescr())
///<summary>Gets
#foreach( $s in $i.descr() )
///$s
#end
///</summary>
#else
///<summary>Gets Value</summary>
#end
/// <returns>return the value.</returns>
public $helper.getTypeName( $i.type() ) $helper.getGetterName( $i.name() )()
{
return $i.name();
}
#if ($i.hasDescr())
///<summary>Sets
#foreach( $s in $i.descr() )
///$s
#end
///</summary>
#else
///<summary>Sets Value</summary>
#end
///<param name="value">the value</param>
public void $helper.getSetterName( $i.name() )( $helper.getTypeName( $i.type() ) value )
{
this.$i.name() = value;
}
#end
}
#end
#elseif ($n.isBuiltin())
## nothing to do.
#else
#end
#end
}
}
#end
}