Bug 1411-4: MDSAL Binding2 Generator Impl
[mdsal.git] / binding2 / mdsal-binding2-generator-impl / src / main / twirl / org / opendaylight / mdsal / binding2 / yangTemplateForNodes.scala.txt
1 @*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  *@
8
9 @**********************************************************
10 * Twirl YangTemplate for generating yang snippets.        *
11 * Twirl is transformed to Scala and compiled. Then,       *
12 * it can be called from Java with particular input        *
13 * parameters to render desired output code.               *
14 *                                                         *
15 * Note: we should introduce our own format instead of txt *
16 ***********************************************************@
17
18 @import org.opendaylight.yangtools.yang.model.api.NotificationDefinition
19 @import org.opendaylight.yangtools.yang.model.api.RpcDefinition
20 @import org.opendaylight.yangtools.yang.model.api.SchemaNode
21
22 @(nodes: Set[_ <: SchemaNode])
23 @if(nodes != null) {
24     @for(node <- nodes) {
25         @if(node.isInstanceOf[NotificationDefinition]) {
26                 @yangTemplateWriteNotification(node.asInstanceOf[NotificationDefinition])
27         }
28         @if(node.isInstanceOf[RpcDefinition]) {
29                 @yangTemplateWriteRPC(node.asInstanceOf[RpcDefinition])
30         }
31     }
32 }