1*cf279e26SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*cf279e26SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*cf279e26SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*cf279e26SAndrew Rist  * distributed with this work for additional information
6*cf279e26SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*cf279e26SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*cf279e26SAndrew Rist  * "License"); you may not use this file except in compliance
9*cf279e26SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*cf279e26SAndrew Rist  *
11*cf279e26SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*cf279e26SAndrew Rist  *
13*cf279e26SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*cf279e26SAndrew Rist  * software distributed under the License is distributed on an
15*cf279e26SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*cf279e26SAndrew Rist  * KIND, either express or implied.  See the License for the
17*cf279e26SAndrew Rist  * specific language governing permissions and limitations
18*cf279e26SAndrew Rist  * under the License.
19*cf279e26SAndrew Rist  *
20*cf279e26SAndrew Rist  *************************************************************/
21*cf279e26SAndrew Rist 
22*cf279e26SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir using System;
25cdf0e10cSrcweir using System.Diagnostics;
26cdf0e10cSrcweir using uno;
27cdf0e10cSrcweir using uno.util;
28cdf0e10cSrcweir using unoidl.com.sun.star.uno;
29cdf0e10cSrcweir using unoidl.com.sun.star.lang;
30cdf0e10cSrcweir using unoidl.com.sun.star.test.performance;
31cdf0e10cSrcweir 
32cdf0e10cSrcweir namespace testobj
33cdf0e10cSrcweir {
34cdf0e10cSrcweir 
35cdf0e10cSrcweir [ServiceImplementation( "com.sun.star.test.performance.cli_uno.TestObject" )]
36cdf0e10cSrcweir public class PerformanceTestObject : ServiceBase, XPerformanceTest
37cdf0e10cSrcweir {
38cdf0e10cSrcweir     private XComponentContext m_xContext;
39cdf0e10cSrcweir 
PerformanceTestObject( XComponentContext xContext )40cdf0e10cSrcweir     public PerformanceTestObject( XComponentContext xContext )
41cdf0e10cSrcweir     {
42cdf0e10cSrcweir         m_xContext = xContext;
43cdf0e10cSrcweir     }
PerformanceTestObject()44cdf0e10cSrcweir     public PerformanceTestObject()
45cdf0e10cSrcweir     {
46cdf0e10cSrcweir     }
47cdf0e10cSrcweir 
48cdf0e10cSrcweir     private int      _long;
49cdf0e10cSrcweir     private long     _hyper;
50cdf0e10cSrcweir     private float    _float;
51cdf0e10cSrcweir     private double   _double;
52cdf0e10cSrcweir     private String   _string = "";
53cdf0e10cSrcweir     private Object   _xInterface;
54cdf0e10cSrcweir     private Any   _any;
55cdf0e10cSrcweir     private Object[]   _interface_sequence = new Object[0];
56cdf0e10cSrcweir     private ComplexTypes _complexTypes = new ComplexTypes();
57cdf0e10cSrcweir 
58cdf0e10cSrcweir     // Attributes
getLong_attr()59cdf0e10cSrcweir     public int getLong_attr() { return _long; }
setLong_attr( int _long_attr )60cdf0e10cSrcweir     public void setLong_attr( int _long_attr ) { _long = _long_attr; }
getHyper_attr()61cdf0e10cSrcweir     public long getHyper_attr() { return _hyper; }
setHyper_attr( long _hyper_attr )62cdf0e10cSrcweir     public void setHyper_attr( long _hyper_attr ) { _hyper = _hyper_attr; }
getFloat_attr()63cdf0e10cSrcweir     public float getFloat_attr() { return _float; }
setFloat_attr( float _float_attr )64cdf0e10cSrcweir     public void setFloat_attr( float _float_attr ) { _float = _float; }
getDouble_attr()65cdf0e10cSrcweir     public double getDouble_attr() { return _double; }
setDouble_attr( double _double_attr )66cdf0e10cSrcweir     public void setDouble_attr( double _double_attr ) { _double = _double_attr; }
getString_attr()67cdf0e10cSrcweir     public String getString_attr() { return _string; }
setString_attr( String _string_attr )68cdf0e10cSrcweir     public void setString_attr( String _string_attr ) { _string = _string_attr; }
getInterface_attr()69cdf0e10cSrcweir     public Object getInterface_attr() { return _xInterface; }
setInterface_attr( Object _interface_attr )70cdf0e10cSrcweir     public void setInterface_attr( Object _interface_attr ) { _xInterface = _interface_attr; }
getAny_attr()71cdf0e10cSrcweir     public Any getAny_attr() { return _any; }
setAny_attr( ref Any _any_attr )72cdf0e10cSrcweir     public void setAny_attr( ref Any _any_attr ) { _any = _any_attr; }
getSequence_attr()73cdf0e10cSrcweir     public Object[] getSequence_attr() { return _interface_sequence; }
setSequence_attr(Object[] _sequence_attr )74cdf0e10cSrcweir     public void setSequence_attr(Object[] _sequence_attr ) { _interface_sequence = _sequence_attr; }
getStruct_attr()75cdf0e10cSrcweir     public ComplexTypes getStruct_attr() { return _complexTypes; }
setStruct_attr( ComplexTypes _struct_attr )76cdf0e10cSrcweir     public void setStruct_attr( ComplexTypes _struct_attr ) { _complexTypes = _struct_attr; }
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     // Methods
async()79cdf0e10cSrcweir     public void async() {}
sync( )80cdf0e10cSrcweir     public void sync(  ) {}
complex_in( ComplexTypes aVal )81cdf0e10cSrcweir     public ComplexTypes complex_in( /*IN*/ComplexTypes aVal ) { return aVal; }
complex_inout( ref ComplexTypes aVal )82cdf0e10cSrcweir     public ComplexTypes complex_inout( /*INOUT*/ref ComplexTypes aVal ) { return aVal; }
complex_oneway( ComplexTypes aVal )83cdf0e10cSrcweir     public void complex_oneway( /*IN*/ComplexTypes aVal ) {}
complex_noreturn( ComplexTypes aVal )84cdf0e10cSrcweir     public void complex_noreturn( /*IN*/ComplexTypes aVal ) {}
createObject( )85cdf0e10cSrcweir     public XPerformanceTest createObject(  ) { return new PerformanceTestObject(); }
getLong()86cdf0e10cSrcweir     public int getLong() { return _long; }
setLong( int n)87cdf0e10cSrcweir     public void setLong(/*IN*/int n) { _long = n; }
getHyper()88cdf0e10cSrcweir     public long getHyper() { return _hyper; }
setHyper( long n)89cdf0e10cSrcweir     public void setHyper(/*IN*/long n) { _hyper = n; }
getFloat()90cdf0e10cSrcweir     public float getFloat() { return _float; }
setFloat( float f )91cdf0e10cSrcweir     public void setFloat( /*IN*/float f ) { _float = f; }
getDouble( )92cdf0e10cSrcweir     public double getDouble(  ) { return _double; }
setDouble( double f )93cdf0e10cSrcweir     public void setDouble( /*IN*/double f ) { _double = f; }
getString( )94cdf0e10cSrcweir     public String getString(  ) { return _string; }
setString( String s )95cdf0e10cSrcweir     public void setString( /*IN*/String s ) { _string = s; }
getInterface( )96cdf0e10cSrcweir     public Object getInterface(  ) { return _xInterface; }
setInterface( Object x )97cdf0e10cSrcweir     public void setInterface( /*IN*/Object x ) { _xInterface = x; }
getAny( )98cdf0e10cSrcweir     public Any getAny(  ) { return _any; }
setAny( ref Any a )99cdf0e10cSrcweir     public void setAny( /*IN*/ref Any a ) { _any = a; }
getSequence( )100cdf0e10cSrcweir     public Object[] getSequence(  ) { return _interface_sequence; }
setSequence( Object[] seq )101cdf0e10cSrcweir     public void setSequence( /*IN*/Object[] seq )
102cdf0e10cSrcweir     {
103cdf0e10cSrcweir #if DEBUG
104cdf0e10cSrcweir //         Debug.WriteLine( "#### " + GetType().FullName + ".setSequence:" + seq );
105cdf0e10cSrcweir         Console.WriteLine( "#### " + GetType().FullName + ".setSequence:" + seq );
106cdf0e10cSrcweir #endif
107cdf0e10cSrcweir         _interface_sequence = seq;
108cdf0e10cSrcweir     }
getStruct( )109cdf0e10cSrcweir     public ComplexTypes getStruct(  ) { return _complexTypes; }
setStruct( ComplexTypes c )110cdf0e10cSrcweir     public void setStruct( /*IN*/ComplexTypes c ) { _complexTypes = c; }
raiseRuntimeException( )111cdf0e10cSrcweir     public void raiseRuntimeException(  ) { throw new RuntimeException(); }
112cdf0e10cSrcweir }
113cdf0e10cSrcweir 
114cdf0e10cSrcweir }
115