merge the formfield patch from ooo-build
[ooovba.git] / binfilter / inc / bf_svtools / startoptions.hxx
blob91b2389565a762d8f6ba40414ea70ce5f1c2f7cd
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: startoptions.hxx,v $
10 * $Revision: 1.4 $
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 INCLUDED_SVTOOLS_STARTOPTIONS_HXX
31 #define INCLUDED_SVTOOLS_STARTOPTIONS_HXX
33 //_________________________________________________________________________________________________________________
34 // includes
35 //_________________________________________________________________________________________________________________
38 #ifndef _SAL_TYPES_H_
39 #include <sal/types.h>
40 #endif
42 #ifndef _OSL_MUTEX_HXX_
43 #include <osl/mutex.hxx>
44 #endif
46 #ifndef _RTL_USTRING_HXX_
47 #include <rtl/ustring.hxx>
48 #endif
50 #ifndef INCLUDED_SVTOOLS_OPTIONS_HXX
51 #include <bf_svtools/options.hxx>
52 #endif
54 namespace binfilter
57 //_________________________________________________________________________________________________________________
58 // forward declarations
59 //_________________________________________________________________________________________________________________
61 /*-************************************************************************************************************//**
62 @short forward declaration to our private date container implementation
63 @descr We use these class as internal member to support small memory requirements.
64 You can create the container if it is neccessary. The class which use these mechanism
65 is faster and smaller then a complete implementation!
66 *//*-*************************************************************************************************************/
68 class SvtStartOptions_Impl;
70 //_________________________________________________________________________________________________________________
71 // declarations
72 //_________________________________________________________________________________________________________________
74 /*-************************************************************************************************************//**
75 @short collect informations about startup features
76 @descr -
78 @implements -
79 @base -
81 @devstatus ready to use
82 *//*-*************************************************************************************************************/
84 class SvtStartOptions: public Options
86 //-------------------------------------------------------------------------------------------------------------
87 // public methods
88 //-------------------------------------------------------------------------------------------------------------
90 public:
92 //---------------------------------------------------------------------------------------------------------
93 // constructor / destructor
94 //---------------------------------------------------------------------------------------------------------
96 /*-****************************************************************************************************//**
97 @short standard constructor and destructor
98 @descr This will initialize an instance with default values.
99 We implement these class with a refcount mechanism! Every instance of this class increase it
100 at create and decrease it at delete time - but all instances use the same data container!
101 He is implemented as a static member ...
103 @seealso member m_nRefCount
104 @seealso member m_pDataContainer
106 @param -
107 @return -
109 @onerror -
110 *//*-*****************************************************************************************************/
112 SvtStartOptions();
113 virtual ~SvtStartOptions();
115 //-------------------------------------------------------------------------------------------------------------
116 // private methods
117 //-------------------------------------------------------------------------------------------------------------
119 private:
121 /*-****************************************************************************************************//**
122 @short return a reference to a static mutex
123 @descr These class use his own static mutex to be threadsafe.
124 We create a static mutex only for one ime and use at different times.
126 @seealso -
128 @param -
129 @return A reference to a static mutex member.
131 @onerror -
132 *//*-*****************************************************************************************************/
134 static ::osl::Mutex& GetOwnStaticMutex();
136 //-------------------------------------------------------------------------------------------------------------
137 // private member
138 //-------------------------------------------------------------------------------------------------------------
140 private:
142 /*Attention
144 Don't initialize these static member in these header!
145 a) Double dfined symbols will be detected ...
146 b) and unresolved externals exist at linking time.
147 Do it in your source only.
150 static SvtStartOptions_Impl* m_pDataContainer ; /// impl. data container as dynamic pointer for smaller memory requirements!
151 static sal_Int32 m_nRefCount ; /// internal ref count mechanism
153 }; // class SvtStartOptions
157 #endif // #ifndef INCLUDED_SVTOOLS_STARTOPTIONS_HXX