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 XInterfaceRef OPipeTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
24 Sequence<UString> OPipeTest_getSupportedServiceNames(void) THROWS( () );
25 UString     OPipeTest_getServiceName() THROWS( () );
26 UString 	OPipeTest_getImplementationName() THROWS( () );
27 
28 XInterfaceRef ODataStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
29 Sequence<UString> ODataStreamTest_getSupportedServiceNames( int i) THROWS( () );
30 UString     ODataStreamTest_getServiceName( int i) THROWS( ( ) );
31 UString 	ODataStreamTest_getImplementationName( int i) THROWS( () );
32 
33 XInterfaceRef OMarkableOutputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
34 Sequence<UString> OMarkableOutputStreamTest_getSupportedServiceNames(void) THROWS( () );
35 UString     OMarkableOutputStreamTest_getServiceName() THROWS( () );
36 UString 	OMarkableOutputStreamTest_getImplementationName() THROWS( () );
37 
38 XInterfaceRef OMarkableInputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
39 Sequence<UString> OMarkableInputStreamTest_getSupportedServiceNames(void) THROWS( () );
40 UString     OMarkableInputStreamTest_getServiceName() THROWS( () );
41 UString 	OMarkableInputStreamTest_getImplementationName() THROWS( () );
42 
43 XInterfaceRef OObjectStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
44 Sequence<UString> OObjectStreamTest_getSupportedServiceNames( int i) THROWS( () );
45 UString     OObjectStreamTest_getServiceName( int i) THROWS( () );
46 UString 	OObjectStreamTest_getImplementationName( int i) THROWS( () );
47 
48 XInterfaceRef 		OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
49 Sequence<UString> 	OMyPersistObject_getSupportedServiceNames( ) THROWS( () );
50 UString     		OMyPersistObject_getServiceName( ) THROWS( () );
51 UString 			OMyPersistObject_getImplementationName( ) THROWS( () );
52 
53 Sequence<BYTE> createSeq( char * p );
54 Sequence<BYTE> createIntSeq( INT32 i );
55 
56 #define BUILD_ERROR(expr, Message)\
57 		{\
58 			m_seqErrors.realloc( m_seqErrors.getLen() + 1 ); \
59 		m_seqExceptions.realloc(  m_seqExceptions.getLen() + 1 ); \
60 		String str; \
61 		str += __FILE__;\
62 		str += " "; \
63 		str += "(" ; \
64 		str += __LINE__ ;\
65 		str += ")\n";\
66 		str += "[ " ; \
67 		str += #expr; \
68 		str += " ] : " ; \
69 		str += Message; \
70 		m_seqErrors.getArray()[ m_seqErrors.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \
71 		}\
72 		((void)0)
73 
74 
75 #define WARNING_ASSERT(expr, Message) \
76 		if( ! (expr) ) { \
77 			m_seqWarnings.realloc( m_seqErrors.getLen() +1 ); \
78 			String str;\
79 			str += __FILE__;\
80 			str += " "; \
81 			str += "(" ; \
82 			str += __LINE__ ;\
83 			str += ")\n";\
84 			str += "[ " ; \
85 			str += #expr; \
86 			str += " ] : " ; \
87 			str += Message; \
88 			m_seqWarnings.getArray()[ m_seqWarnings.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \
89 			return; \
90 		}\
91 		((void)0)
92 
93 #define ERROR_ASSERT(expr, Message) \
94 		if( ! (expr) ) { \
95 			BUILD_ERROR(expr, Message );\
96 			return; \
97 		}\
98 		((void)0)
99 
100 #define ERROR_EXCEPTION_ASSERT(expr, Message, Exception) \
101 	if( !(expr)) { \
102 		BUILD_ERROR(expr,Message);\
103 		m_seqExceptions.getArray()[ m_seqExceptions.getLen()-1] = UsrAny( Exception );\
104 		return; \
105 	} \
106 	((void)0)
107