1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cli_testobj_performance.cs,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 using System
.Diagnostics
;
35 using unoidl
.com
.sun
.star
.uno
;
36 using unoidl
.com
.sun
.star
.lang
;
37 using unoidl
.com
.sun
.star
.test
.performance
;
42 [ServiceImplementation( "com.sun.star.test.performance.cli_uno.TestObject" )]
43 public class PerformanceTestObject
: ServiceBase
, XPerformanceTest
45 private XComponentContext m_xContext
;
47 public PerformanceTestObject( XComponentContext xContext
)
49 m_xContext
= xContext
;
51 public PerformanceTestObject()
58 private double _double
;
59 private String _string
= "";
60 private Object _xInterface
;
62 private Object
[] _interface_sequence
= new Object
[0];
63 private ComplexTypes _complexTypes
= new ComplexTypes();
66 public int getLong_attr() { return _long; }
67 public void setLong_attr( int _long_attr
) { _long = _long_attr; }
68 public long getHyper_attr() { return _hyper; }
69 public void setHyper_attr( long _hyper_attr
) { _hyper = _hyper_attr; }
70 public float getFloat_attr() { return _float; }
71 public void setFloat_attr( float _float_attr
) { _float = _float; }
72 public double getDouble_attr() { return _double; }
73 public void setDouble_attr( double _double_attr
) { _double = _double_attr; }
74 public String
getString_attr() { return _string; }
75 public void setString_attr( String _string_attr
) { _string = _string_attr; }
76 public Object
getInterface_attr() { return _xInterface; }
77 public void setInterface_attr( Object _interface_attr
) { _xInterface = _interface_attr; }
78 public Any
getAny_attr() { return _any; }
79 public void setAny_attr( ref Any _any_attr
) { _any = _any_attr; }
80 public Object
[] getSequence_attr() { return _interface_sequence; }
81 public void setSequence_attr(Object
[] _sequence_attr
) { _interface_sequence = _sequence_attr; }
82 public ComplexTypes
getStruct_attr() { return _complexTypes; }
83 public void setStruct_attr( ComplexTypes _struct_attr
) { _complexTypes = _struct_attr; }
86 public void async() {}
87 public void sync( ) {}
88 public ComplexTypes
complex_in( /*IN*/ComplexTypes aVal
) { return aVal; }
89 public ComplexTypes
complex_inout( /*INOUT*/ref ComplexTypes aVal
) { return aVal; }
90 public void complex_oneway( /*IN*/ComplexTypes aVal
) {}
91 public void complex_noreturn( /*IN*/ComplexTypes aVal
) {}
92 public XPerformanceTest
createObject( ) { return new PerformanceTestObject(); }
93 public int getLong() { return _long; }
94 public void setLong(/*IN*/int n
) { _long = n; }
95 public long getHyper() { return _hyper; }
96 public void setHyper(/*IN*/long n
) { _hyper = n; }
97 public float getFloat() { return _float; }
98 public void setFloat( /*IN*/float f
) { _float = f; }
99 public double getDouble( ) { return _double; }
100 public void setDouble( /*IN*/double f
) { _double = f; }
101 public String
getString( ) { return _string; }
102 public void setString( /*IN*/String s
) { _string = s; }
103 public Object
getInterface( ) { return _xInterface; }
104 public void setInterface( /*IN*/Object x
) { _xInterface = x; }
105 public Any
getAny( ) { return _any; }
106 public void setAny( /*IN*/ref Any a
) { _any = a; }
107 public Object
[] getSequence( ) { return _interface_sequence; }
108 public void setSequence( /*IN*/Object
[] seq
)
111 // Debug.WriteLine( "#### " + GetType().FullName + ".setSequence:" + seq );
112 Console
.WriteLine( "#### " + GetType().FullName
+ ".setSequence:" + seq
);
114 _interface_sequence
= seq
;
116 public ComplexTypes
getStruct( ) { return _complexTypes; }
117 public void setStruct( /*IN*/ComplexTypes c
) { _complexTypes = c; }
118 public void raiseRuntimeException( ) { throw new RuntimeException(); }