sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / cacheoptions.hxx
blob33ee7c7de459e60e9d2e5ada9a6973030d584976
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: cacheoptions.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 ************************************************************************/
31 #ifndef INCLUDED_SVTOOLS_CACHEOPTIONS_HXX
32 #define INCLUDED_SVTOOLS_CACHEOPTIONS_HXX
34 #ifndef _SAL_TYPES_H_
35 #include <sal/types.h>
36 #endif
37 #ifndef _OSL_MUTEX_HXX_
38 #include <osl/mutex.hxx>
39 #endif
40 #ifndef _RTL_USTRING_HXX_
41 #include <rtl/ustring.hxx>
42 #endif
44 namespace binfilter {
46 //_________________________________________________________________________________________________________________
47 // forward declarations
48 //_________________________________________________________________________________________________________________
50 /*-************************************************************************************************************//**
51 @short forward declaration to our private date container implementation
52 @descr We use these class as internal member to support small memory requirements.
53 You can create the container if it is neccessary. The class which use these mechanism
54 is faster and smaller then a complete implementation!
55 *//*-*************************************************************************************************************/
57 class SvtCacheOptions_Impl;
59 //_________________________________________________________________________________________________________________
60 // declarations
61 //_________________________________________________________________________________________________________________
63 /*-************************************************************************************************************//**
64 @short collect informations about startup features
65 @descr -
67 @implements -
68 @base -
70 @devstatus ready to use
71 *//*-*************************************************************************************************************/
73 class SvtCacheOptions
75 //-------------------------------------------------------------------------------------------------------------
76 // public methods
77 //-------------------------------------------------------------------------------------------------------------
79 public:
81 //---------------------------------------------------------------------------------------------------------
82 // constructor / destructor
83 //---------------------------------------------------------------------------------------------------------
85 /*-****************************************************************************************************//**
86 @short standard constructor and destructor
87 @descr This will initialize an instance with default values.
88 We implement these class with a refcount mechanism! Every instance of this class increase it
89 at create and decrease it at delete time - but all instances use the same data container!
90 He is implemented as a static member ...
92 @seealso member m_nRefCount
93 @seealso member m_pDataContainer
95 @param -
96 @return -
98 @onerror -
99 *//*-*****************************************************************************************************/
101 SvtCacheOptions();
102 ~SvtCacheOptions();
104 //---------------------------------------------------------------------------------------------------------
105 // interface
106 //---------------------------------------------------------------------------------------------------------
108 /*-****************************************************************************************************//**
109 @short interface methods to get and set value of config key "org.openoffice.Office.Common/_3D-Engine/..."
110 @descr These options describe internal states to enable/disable features of installed office.
112 GetDrawingEngineOLE_Objects()
114 @seealso configuration package "org.openoffice.Office.Common/_3D-Engine"
115 *//*-*****************************************************************************************************/
117 sal_Int32 GetDrawingEngineOLE_Objects() const;
119 //-------------------------------------------------------------------------------------------------------------
120 // private methods
121 //-------------------------------------------------------------------------------------------------------------
123 private:
125 /*-****************************************************************************************************//**
126 @short return a reference to a static mutex
127 @descr These class use his own static mutex to be threadsafe.
128 We create a static mutex only for one ime and use at different times.
130 @seealso -
132 @param -
133 @return A reference to a static mutex member.
135 @onerror -
136 *//*-*****************************************************************************************************/
138 static ::osl::Mutex& GetOwnStaticMutex();
140 //-------------------------------------------------------------------------------------------------------------
141 // private member
142 //-------------------------------------------------------------------------------------------------------------
144 private:
146 /*Attention
148 Don't initialize these static member in these header!
149 a) Double dfined symbols will be detected ...
150 b) and unresolved externals exist at linking time.
151 Do it in your source only.
154 static SvtCacheOptions_Impl* m_pDataContainer ; /// impl. data container as dynamic pointer for smaller memory requirements!
155 static sal_Int32 m_nRefCount ; /// internal ref count mechanism
157 }; // class SvtOptions3D
161 #endif // #ifndef INCLUDED_SVTOOLS_CACHEOPTIONS_HXX