| //:: # Copyright 2013, Big Switch Networks, Inc. |
| //:: # |
| //:: # LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with |
| //:: # the following special exception: |
| //:: # |
| //:: # LOXI Exception |
| //:: # |
| //:: # As a special exception to the terms of the EPL, you may distribute libraries |
| //:: # generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided |
| //:: # that copyright and licensing notices generated by LoxiGen are not altered or removed |
| //:: # from the LoxiGen Libraries and the notice provided below is (i) included in |
| //:: # the LoxiGen Libraries, if distributed in source code form and (ii) included in any |
| //:: # documentation for the LoxiGen Libraries, if distributed in binary form. |
| //:: # |
| //:: # Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler." |
| //:: # |
| //:: # You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain |
| //:: # a copy of the EPL at: |
| //:: # |
| //:: # http::: #www.eclipse.org/legal/epl-v10.html |
| //:: # |
| //:: # 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 |
| //:: # EPL for the specific language governing permissions and limitations |
| //:: # under the EPL. |
| //:: |
| //:: import itertools |
| //:: import of_g |
| //:: import re |
| //:: include('_copyright.java') |
| |
| //:: include('_autogen.java') |
| |
| package ${factory.package}; |
| |
| //:: include("_imports.java") |
| |
| public interface ${factory.name}${" extends XidGenerator" if factory.xid_generator else ""} { |
| // Subfactories |
| //:: for name, clazz in factory.sub_factories.items(): |
| ${clazz} ${name}(); |
| //:: #endfor |
| |
| //:: for i in factory.members: |
| //:: if i.is_virtual: |
| //:: continue |
| //:: #endif |
| //:: if len(i.writeable_members) > 0: |
| ${i.name}.Builder ${factory.method_name(i, builder=True)}()${ "" if i.is_universal else " throws UnsupportedOperationException"}; |
| //:: #endif |
| //:: if len(i.writeable_members) <= 2: |
| ${i.name} ${factory.method_name(i, builder=False )}(${", ".join("%s %s" % (p.java_type.public_type, p.name) for p in i.writeable_members if p.name != "xid" )}); |
| //:: #endif |
| //:: #endfor |
| //:: if factory.name == 'OFFactory': |
| Match.Builder buildMatch(); |
| Match matchWildcardAll(); |
| //:: #endif |
| |
| OFMessageReader<${factory.base_class}> getReader(); |
| OFVersion getVersion(); |
| //:: if factory.name == 'OFOxms': |
| |
| public <F extends OFValueType<F>> OFOxm<F> fromValue(F value, MatchField<F> field); |
| public <F extends OFValueType<F>> OFOxm<F> fromValueAndMask(F value, F mask, MatchField<F> field); |
| public <F extends OFValueType<F>> OFOxm<F> fromMasked(Masked<F> masked, MatchField<F> field); |
| //:: #endif |
| } |