texteventfactoryhelper.java

来自「直接放在eclipse环境下」· Java 代码 · 共 80 行

JAVA
80
字号
/*====================================================================Tnis file was produced by the OpenCCM ir3_java generator.OpenCCM: The Open CORBA Component Model PlatformCopyright (C) 2000-2002 USTL - LIFL - GOALContact: openccm-team@objectweb.orgThis library is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation; eitherversion 2.1 of the License, or any later version.This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNULesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307USAInitial developer(s): Philippe Merle, Mathieu Vadet.Contributor(s): ______________________________________.====================================================================*/package org.objectweb.ccm.demo3;/** **  Helper class for the ::demo3::TextEvent event. **/public class TextEventFactoryHelper{    // ==================================================================    //    // Public static methods.    //    // ==================================================================        /**     **  Register the event factory on the ORB.     **/    public static void    register(org.omg.CORBA.portable.ValueFactory factory)    {        org.objectweb.openccm.Components.Runtime.register_value_factory("IDL:ccm.objectweb.org/demo3/TextEvent:1.0", factory);    }        /**     **  Cast a base event to a ::demo3::TextEvent one.     **/    public static TextEvent    narrow(org.omg.Components.EventBase event)    {        try        {            return (TextEvent)event;        }        catch(java.lang.ClassCastException ex)        {        }        return null;    }        /**     **  Create a ::CORBA::Any from a event instance.     **/    public static org.omg.CORBA.Any    create_any(TextEvent event)    {        org.omg.CORBA.TypeCode type = TextEventHelper.type();        org.omg.DynamicAny.DynAny dyn_any = org.objectweb.openccm.corba.TheDynamicAnyFactory.create_dyn_any_from_type_code(type);        org.omg.CORBA.Any res = dyn_any.to_any();        TextEventHelper.insert(res, event);        return res;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?