Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svtools / localisationoptions.hxx
blob6d06160a8ee17d86ff0783e28ca42dfc61a8f627
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: localisationoptions.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_LOCALISATIONOPTIONS_HXX
31 #define INCLUDED_SVTOOLS_LOCALISATIONOPTIONS_HXX
33 //_________________________________________________________________________________________________________________
34 // includes
35 //_________________________________________________________________________________________________________________
37 #ifndef _SAL_TYPES_H_
38 #include <sal/types.h>
39 #endif
41 #ifndef _OSL_MUTEX_HXX_
42 #include <osl/mutex.hxx>
43 #endif
45 #ifndef INCLUDED_SVTOOLS_OPTIONS_HXX
46 #include <bf_svtools/options.hxx>
47 #endif
49 namespace binfilter
52 //_________________________________________________________________________________________________________________
53 // forward declarations
54 //_________________________________________________________________________________________________________________
56 /*-************************************************************************************************************//**
57 @short forward declaration to our private date container implementation
58 @descr We use these class as internal member to support small memory requirements.
59 You can create the container if it is neccessary. The class which use these mechanism
60 is faster and smaller then a complete implementation!
61 *//*-*************************************************************************************************************/
63 class SvtLocalisationOptions_Impl;
65 //_________________________________________________________________________________________________________________
66 // declarations
67 //_________________________________________________________________________________________________________________
69 /*-************************************************************************************************************//**
70 @short collect informations about localisation features
71 @descr -
73 @implements -
74 @base -
76 @devstatus ready to use
77 *//*-*************************************************************************************************************/
79 class SvtLocalisationOptions: public Options
81 //-------------------------------------------------------------------------------------------------------------
82 // public methods
83 //-------------------------------------------------------------------------------------------------------------
85 public:
87 //---------------------------------------------------------------------------------------------------------
88 // constructor / destructor
89 //---------------------------------------------------------------------------------------------------------
91 /*-****************************************************************************************************//**
92 @short standard constructor and destructor
93 @descr This will initialize an instance with default values.
94 We implement these class with a refcount mechanism! Every instance of this class increase it
95 at create and decrease it at delete time - but all instances use the same data container!
96 He is implemented as a static member ...
98 @seealso member m_nRefCount
99 @seealso member m_pDataContainer
101 @param -
102 @return -
104 @onerror -
105 *//*-*****************************************************************************************************/
107 SvtLocalisationOptions();
108 virtual ~SvtLocalisationOptions();
110 //-------------------------------------------------------------------------------------------------------------
111 // private methods
112 //-------------------------------------------------------------------------------------------------------------
114 private:
116 /*-****************************************************************************************************//**
117 @short return a reference to a static mutex
118 @descr These class is partially threadsafe (for de-/initialization only).
119 All access methods are'nt safe!
120 We create a static mutex only for one ime and use at different times.
122 @seealso -
124 @param -
125 @return A reference to a static mutex member.
127 @onerror -
128 *//*-*****************************************************************************************************/
130 static ::osl::Mutex& GetOwnStaticMutex();
132 //-------------------------------------------------------------------------------------------------------------
133 // private member
134 //-------------------------------------------------------------------------------------------------------------
136 private:
138 /*Attention
140 Don't initialize these static member in these header!
141 a) Double dfined symbols will be detected ...
142 b) and unresolved externals exist at linking time.
143 Do it in your source only.
146 static SvtLocalisationOptions_Impl* m_pDataContainer ; /// impl. data container as dynamic pointer for smaller memory requirements!
147 static sal_Int32 m_nRefCount ; /// internal ref count mechanism
149 }; // class SvtLocalisationOptions
153 #endif // #ifndef INCLUDED_SVTOOLS_LOCALISATIONOPTIONS_HXX