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 
24 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_ENUMREPRESENTATION_HXX
25 #define EXTENSIONS_SOURCE_PROPCTRLR_ENUMREPRESENTATION_HXX
26 
27 /** === begin UNO includes === **/
28 #include <com/sun/star/uno/Any.hxx>
29 /** === end UNO includes === **/
30 #include <rtl/ref.hxx>
31 #include <rtl/ustring.hxx>
32 
33 #include <vector>
34 
35 //........................................................................
36 namespace pcr
37 {
38 //........................................................................
39 
40 	//====================================================================
41 	//= IPropertyEnumRepresentation
42 	//====================================================================
43     class SAL_NO_VTABLE IPropertyEnumRepresentation : public ::rtl::IReference
44 	{
45     public:
46         /** retrieves all descriptions of all possible values of the enumeration property
47         */
48         virtual ::std::vector< ::rtl::OUString > SAL_CALL getDescriptions(
49             ) const = 0;
50 
51         /** converts a given description into a property value
52         */
53         virtual void SAL_CALL getValueFromDescription(
54                 const ::rtl::OUString& _rDescription,
55                 ::com::sun::star::uno::Any& _out_rValue
56             ) const = 0;
57 
58         /** converts a given property value into a description
59         */
60         virtual ::rtl::OUString SAL_CALL getDescriptionForValue(
61                 const ::com::sun::star::uno::Any& _rEnumValue
62             ) const = 0;
63 
~IPropertyEnumRepresentation()64         virtual ~IPropertyEnumRepresentation() { };
65 	};
66 
67 //........................................................................
68 } // namespace pcr
69 //........................................................................
70 
71 #endif // EXTENSIONS_SOURCE_PROPCTRLR_ENUMREPRESENTATION_HXX
72 
73