xref: /aoo42x/main/sal/inc/rtl/tres.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _RTL_TRES_HXX_
29 #define _RTL_TRES_HXX_
30 
31 
32 #include <rtl/tres.h>
33 
34 //#include <stdarg.h>
35 
36 // <namespace_rtl>
37 namespace rtl
38 {
39 /*==========================================================================*/
40 
41 // <class_TestResult>
42 class TestResult
43 {
44     // pointer to testresult structure
45     rtl_TestResult* pData;
46 
47     // <private_ctors>
48     TestResult();
49     TestResult( const TestResult& oRes );
50     // </private_ctors>
51 
52 public:
53 
54 
55     // <public_ctors>
56     TestResult( const sal_Char* meth, sal_uInt32 flags = 0 )
57     {
58         pData = rtl_tres_create( meth, flags );
59     } // </public_ctors>
60 
61     // <dtor>
62     ~TestResult()
63     {
64         rtl_tres_destroy( pData );
65     }
66     // </dtor>
67 
68     // <public_methods>
69     rtl_TestResult* getData()
70     {
71         return pData;
72     }
73     // <method_state>
74     sal_Bool state(
75                     sal_Bool tst_state,
76                     const sal_Char* msg = 0,
77                     const sal_Char* sub = 0,
78                     sal_Bool verbose = sal_False
79                     )
80     {
81         return pData->pFuncs->state_( pData, tst_state, msg, sub, verbose );
82     } // </method_state>
83 
84     void end( sal_Char* msg = 0 )
85     {
86         pData->pFuncs->end_( pData, msg );
87     } // </method_state>
88 }; // </class_TestResult>
89 
90 } // </namespace_rtl>
91 #endif
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113