merge the formfield patch from ooo-build
[ooovba.git] / odk / examples / DevelopersGuide / Database / DriverSkeleton / propertyids.hxx
blob674a0277b393006588b7d39cf9ee7016e5503ab9
1 /*************************************************************************
3 * $RCSfile: propertyids.hxx,v $
5 * $Revision: 1.6 $
7 * last change: $Author: rt $ $Date: 2008-04-10 16:38:35 $
9 * The Contents of this file are made available subject to the terms of
10 * the BSD license.
12 * Copyright (c) 2003 by Sun Microsystems, Inc.
13 * All rights reserved.
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
24 * contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
30 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
31 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
34 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
35 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
36 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
37 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *************************************************************************/
41 #ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
42 #define _CONNECTIVITY_PROPERTYIDS_HXX_
44 // this define has to be set to split the names into different dll's or so's
45 // every dll has his own set of property names
46 #include <rtl/ustring.hxx>
47 #ifndef _MAP_
48 #include <map>
49 #endif
51 namespace connectivity
53 namespace skeleton
55 class OPropertyMap
57 ::std::map<sal_Int32 , rtl_uString*> m_aPropertyMap;
59 ::rtl::OUString fillValue(sal_Int32 _nIndex);
60 public:
61 OPropertyMap()
64 ~OPropertyMap();
65 ::rtl::OUString getNameByIndex(sal_Int32 _nIndex) const;
67 static OPropertyMap& getPropMap()
69 static OPropertyMap s_aPropMap;
70 return s_aPropMap;
76 typedef const sal_Char* (*PVFN)();
78 struct UStringDescription
80 const sal_Char* pZeroTerminatedName;
81 sal_Int32 nLength;
83 UStringDescription(PVFN _fCharFkt);
84 operator ::rtl::OUString() const { return ::rtl::OUString(pZeroTerminatedName,nLength,RTL_TEXTENCODING_ASCII_US); }
85 ~UStringDescription();
86 private:
87 UStringDescription();
93 //------------------------------------------------------------------------------
94 #define DECL_PROP1IMPL(varname, type) \
95 pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::cppu::UnoType< type >::get(),
96 //------------------------------------------------------------------------------
97 #define DECL_PROP0(varname, type) \
98 DECL_PROP1IMPL(varname, type) 0)
99 //------------------------------------------------------------------------------
100 #define DECL_BOOL_PROP1IMPL(varname) \
101 pProperties[nPos++] = ::com::sun::star::beans::Property(OPropertyMap::getPropMap().getNameByIndex(PROPERTY_ID_##varname), PROPERTY_ID_##varname, ::getBooleanCppuType(),
102 //------------------------------------------------------------------------------
103 #define DECL_BOOL_PROP0(varname) \
104 DECL_BOOL_PROP1IMPL(varname) 0)
107 #define PROPERTY_ID_QUERYTIMEOUT 1
108 #define PROPERTY_ID_MAXFIELDSIZE 2
109 #define PROPERTY_ID_MAXROWS 3
110 #define PROPERTY_ID_CURSORNAME 4
111 #define PROPERTY_ID_RESULTSETCONCURRENCY 5
112 #define PROPERTY_ID_RESULTSETTYPE 6
113 #define PROPERTY_ID_FETCHDIRECTION 7
114 #define PROPERTY_ID_FETCHSIZE 8
115 #define PROPERTY_ID_ESCAPEPROCESSING 9
116 #define PROPERTY_ID_USEBOOKMARKS 10
117 // Column
118 #define PROPERTY_ID_NAME 11
119 #define PROPERTY_ID_TYPE 12
120 #define PROPERTY_ID_TYPENAME 13
121 #define PROPERTY_ID_PRECISION 14
122 #define PROPERTY_ID_SCALE 15
123 #define PROPERTY_ID_ISNULLABLE 16
124 #define PROPERTY_ID_ISAUTOINCREMENT 17
125 #define PROPERTY_ID_ISROWVERSION 18
126 #define PROPERTY_ID_DESCRIPTION 19
127 #define PROPERTY_ID_DEFAULTVALUE 20
129 #define PROPERTY_ID_REFERENCEDTABLE 21
130 #define PROPERTY_ID_UPDATERULE 22
131 #define PROPERTY_ID_DELETERULE 23
132 #define PROPERTY_ID_CATALOG 24
133 #define PROPERTY_ID_ISUNIQUE 25
134 #define PROPERTY_ID_ISPRIMARYKEYINDEX 26
135 #define PROPERTY_ID_ISCLUSTERED 27
136 #define PROPERTY_ID_ISASCENDING 28
137 #define PROPERTY_ID_SCHEMANAME 29
138 #define PROPERTY_ID_CATALOGNAME 30
140 #define PROPERTY_ID_COMMAND 31
141 #define PROPERTY_ID_CHECKOPTION 32
142 #define PROPERTY_ID_PASSWORD 33
143 #define PROPERTY_ID_RELATEDCOLUMN 34
145 #define PROPERTY_ID_FUNCTION 35
146 #define PROPERTY_ID_TABLENAME 36
147 #define PROPERTY_ID_REALNAME 37
148 #define PROPERTY_ID_DBASEPRECISIONCHANGED 38
149 #define PROPERTY_ID_ISCURRENCY 39
150 #define PROPERTY_ID_ISBOOKMARKABLE 40
152 #define PROPERTY_ID_INVALID_INDEX 41
153 #define PROPERTY_ID_ERRORMSG_SEQUENCE 42
154 #define PROPERTY_ID_HY010 43
155 #define PROPERTY_ID_HY0000 44
156 #define PROPERTY_ID_DELIMITER 45
157 #define PROPERTY_ID_FORMATKEY 46
158 #define PROPERTY_ID_LOCALE 47
159 #define PROPERTY_ID_IM001 48
161 #define PROPERTY_ID_AUTOINCREMENTCREATION 49
163 #define PROPERTY_ID_PRIVILEGES 50
165 #endif // _CONNECTIVITY_PROPERTYIDS_HXX_