Version 7.5.1.1, tag libreoffice-7.5.1.1
[LibreOffice.git] / testtools / source / performance / cli_testobj_performance.cs
blobc5e338fcd15a354876c1939c5f9e2eb14705a0b3
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 using System;
20 using System.Diagnostics;
21 using uno;
22 using uno.util;
23 using unoidl.com.sun.star.uno;
24 using unoidl.com.sun.star.lang;
25 using unoidl.com.sun.star.test.performance;
27 namespace testobj
30 [ServiceImplementation( "com.sun.star.test.performance.cli_uno.TestObject" )]
31 public class PerformanceTestObject : ServiceBase, XPerformanceTest
33 private XComponentContext m_xContext;
35 public PerformanceTestObject( XComponentContext xContext )
37 m_xContext = xContext;
39 public PerformanceTestObject()
43 private int _long;
44 private long _hyper;
45 private float _float;
46 private double _double;
47 private String _string = "";
48 private Object _xInterface;
49 private Any _any;
50 private Object[] _interface_sequence = new Object[0];
51 private ComplexTypes _complexTypes = new ComplexTypes();
53 // Attributes
54 public int getLong_attr() { return _long; }
55 public void setLong_attr( int _long_attr ) { _long = _long_attr; }
56 public long getHyper_attr() { return _hyper; }
57 public void setHyper_attr( long _hyper_attr ) { _hyper = _hyper_attr; }
58 public float getFloat_attr() { return _float; }
59 public void setFloat_attr( float _float_attr ) { _float = _float; }
60 public double getDouble_attr() { return _double; }
61 public void setDouble_attr( double _double_attr ) { _double = _double_attr; }
62 public String getString_attr() { return _string; }
63 public void setString_attr( String _string_attr ) { _string = _string_attr; }
64 public Object getInterface_attr() { return _xInterface; }
65 public void setInterface_attr( Object _interface_attr ) { _xInterface = _interface_attr; }
66 public Any getAny_attr() { return _any; }
67 public void setAny_attr( ref Any _any_attr ) { _any = _any_attr; }
68 public Object[] getSequence_attr() { return _interface_sequence; }
69 public void setSequence_attr(Object[] _sequence_attr ) { _interface_sequence = _sequence_attr; }
70 public ComplexTypes getStruct_attr() { return _complexTypes; }
71 public void setStruct_attr( ComplexTypes _struct_attr ) { _complexTypes = _struct_attr; }
73 // Methods
74 public void async() {}
75 public void sync( ) {}
76 public ComplexTypes complexIn( /*IN*/ComplexTypes aVal ) { return aVal; }
77 public ComplexTypes complexInout( /*INOUT*/ref ComplexTypes aVal ) { return aVal; }
78 public void complexOneway( /*IN*/ComplexTypes aVal ) {}
79 public void complexNoreturn( /*IN*/ComplexTypes aVal ) {}
80 public XPerformanceTest createObject( ) { return new PerformanceTestObject(); }
81 public int getLong() { return _long; }
82 public void setLong(/*IN*/int n) { _long = n; }
83 public long getHyper() { return _hyper; }
84 public void setHyper(/*IN*/long n) { _hyper = n; }
85 public float getFloat() { return _float; }
86 public void setFloat( /*IN*/float f ) { _float = f; }
87 public double getDouble( ) { return _double; }
88 public void setDouble( /*IN*/double f ) { _double = f; }
89 public String getString( ) { return _string; }
90 public void setString( /*IN*/String s ) { _string = s; }
91 public Object getInterface( ) { return _xInterface; }
92 public void setInterface( /*IN*/Object x ) { _xInterface = x; }
93 public Any getAny( ) { return _any; }
94 public void setAny( /*IN*/ref Any a ) { _any = a; }
95 public Object[] getSequence( ) { return _interface_sequence; }
96 public void setSequence( /*IN*/Object[] seq )
98 #if DEBUG
99 // Debug.WriteLine( "#### " + GetType().FullName + ".setSequence:" + seq );
100 Console.WriteLine( "#### " + GetType().FullName + ".setSequence:" + seq );
101 #endif
102 _interface_sequence = seq;
104 public ComplexTypes getStruct( ) { return _complexTypes; }
105 public void setStruct( /*IN*/ComplexTypes c ) { _complexTypes = c; }
106 public void raiseRuntimeException( ) { throw new RuntimeException(); }