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: XPerformanceTest.idl,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 ************************************************************************/
30 #ifndef __com_sun_star_test_performance_XPerformanceTest_idl__
31 #define __com_sun_star_test_performance_XPerformanceTest_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
48 /** struct of simple types to be carried
50 published
struct SimpleTypes
56 unsigned short UShort
;
60 unsigned hyper UHyper
;
64 /** struct ComplexTypes adding Sequence, String, Interface, Any to SimpleTypes
66 published
struct ComplexTypes
: SimpleTypes
68 sequence
< long > Sequence
;
70 com
::sun
::star
::uno
::XInterface
Interface;
74 /** A performance test object has to be implemented in a special way, that:
76 <li>queryInterface() execution times remain (nearly) static</li>
77 <li>functions kept simple, thus there is (nearly) no execution time of the function itself</li>
78 <li>no dynamic data is ever returned except of createObject(), so return 0, empty strings etc.</li>
80 The interface is divided into three sections:
82 <li>measuring asynchron/ synchron calls</li>
83 <li>complex data calls with/out return value; in/out parameters</li>
84 <li>single data types like long, float, string etc.</li>
85 <li>method calls versa attribute calls</li>
86 <li>raising RuntimeException</li>
89 published
interface XPerformanceTest
: com
::sun
::star
::uno
::XInterface
91 [oneway
] void async
();
94 ComplexTypes complex_in
( [in] ComplexTypes aVal
);
95 ComplexTypes complex_inout
( [inout
] ComplexTypes aVal
);
97 [oneway
] void complex_oneway
( [in] ComplexTypes aVal
);
98 void complex_noreturn
( [in] ComplexTypes aVal
);
100 XPerformanceTest createObject
();
102 [attribute
] long Long_attr
;
103 [attribute
] hyper Hyper_attr
;
104 [attribute
] float Float_attr
;
105 [attribute
] double Double_attr
;
106 [attribute
] string String_attr
;
107 [attribute
] com
::sun
::star
::uno
::XInterface Interface_attr
;
108 [attribute
] any Any_attr
;
109 [attribute
] sequence
< com
::sun
::star
::uno
::XInterface
> Sequence_attr
;
110 [attribute
] ComplexTypes Struct_attr
;
113 void setLong
( [in] long n
);
115 void setHyper
( [in] hyper n
);
117 void setFloat
( [in] float f
);
119 void setDouble
( [in] double f
);
121 void setString
( [in] string s
);
122 com
::sun
::star
::uno
::XInterface getInterface
();
123 void setInterface
( [in] com
::sun
::star
::uno
::XInterface x
);
125 void setAny
( [in] any a
);
126 sequence
< com
::sun
::star
::uno
::XInterface
> getSequence
();
127 void setSequence
( [in] sequence
< com
::sun
::star
::uno
::XInterface
> seq
);
128 ComplexTypes getStruct
();
129 void setStruct
( [in] ComplexTypes c
);
131 void raiseRuntimeException
();
134 //=============================================================================