1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_test_performance_XPerformanceTest_idl__ 24#define __com_sun_star_test_performance_XPerformanceTest_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30module com 31{ 32module sun 33{ 34module star 35{ 36module test 37{ 38module performance 39{ 40 41/** struct of simple types to be carried 42*/ 43published struct SimpleTypes 44{ 45 boolean Bool; 46 char Char; 47 byte Byte; 48 short Short; 49 unsigned short UShort; 50 long Long; 51 unsigned long ULong; 52 hyper Hyper; 53 unsigned hyper UHyper; 54 float Float; 55 double Double; 56}; 57/** struct ComplexTypes adding Sequence, String, Interface, Any to SimpleTypes 58*/ 59published struct ComplexTypes : SimpleTypes 60{ 61 sequence< long > Sequence; 62 string String; 63 com::sun::star::uno::XInterface Interface; 64 any Any; 65}; 66 67/** A performance test object has to be implemented in a special way, that: 68 <ul> 69 <li>queryInterface() execution times remain (nearly) static</li> 70 <li>functions kept simple, thus there is (nearly) no execution time of the function itself</li> 71 <li>no dynamic data is ever returned except of createObject(), so return 0, empty strings etc.</li> 72 </ul> 73 The interface is divided into three sections: 74 <ul> 75 <li>measuring asynchron/ synchron calls</li> 76 <li>complex data calls with/out return value; in/out parameters</li> 77 <li>single data types like long, float, string etc.</li> 78 <li>method calls versa attribute calls</li> 79 <li>raising RuntimeException</li> 80 </ul> 81*/ 82published interface XPerformanceTest : com::sun::star::uno::XInterface 83{ 84 [oneway] void async(); 85 void sync(); 86 87 ComplexTypes complex_in( [in] ComplexTypes aVal ); 88 ComplexTypes complex_inout( [inout] ComplexTypes aVal ); 89 90 [oneway] void complex_oneway( [in] ComplexTypes aVal ); 91 void complex_noreturn( [in] ComplexTypes aVal ); 92 93 XPerformanceTest createObject(); 94 95 [attribute] long Long_attr; 96 [attribute] hyper Hyper_attr; 97 [attribute] float Float_attr; 98 [attribute] double Double_attr; 99 [attribute] string String_attr; 100 [attribute] com::sun::star::uno::XInterface Interface_attr; 101 [attribute] any Any_attr; 102 [attribute] sequence< com::sun::star::uno::XInterface > Sequence_attr; 103 [attribute] ComplexTypes Struct_attr; 104 105 long getLong(); 106 void setLong( [in] long n ); 107 hyper getHyper(); 108 void setHyper( [in] hyper n ); 109 float getFloat(); 110 void setFloat( [in] float f ); 111 double getDouble(); 112 void setDouble( [in] double f ); 113 string getString(); 114 void setString( [in] string s ); 115 com::sun::star::uno::XInterface getInterface(); 116 void setInterface( [in] com::sun::star::uno::XInterface x ); 117 any getAny(); 118 void setAny( [in] any a ); 119 sequence< com::sun::star::uno::XInterface > getSequence(); 120 void setSequence( [in] sequence< com::sun::star::uno::XInterface > seq ); 121 ComplexTypes getStruct(); 122 void setStruct( [in] ComplexTypes c ); 123 124 void raiseRuntimeException(); 125}; 126 127//============================================================================= 128 129}; 130}; 131}; 132}; 133}; 134 135#endif 136