xref: /trunk/main/connectivity/source/inc/ado/WrapColumn.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 #ifndef CONNECTIVITY_ADO_WRAP_COLUMN_HXX
24 #define CONNECTIVITY_ADO_WRAP_COLUMN_HXX
25 
26 #include "ado/Aolewrap.hxx"
27 
28 #include "ado_pre_sys_include.h"
29 // A modern Windows SDK ships the ADO interfaces twice: adoint.h, which has
30 // dropped the <Enum>_Param typedefs, and adoint_Backcompat.h, which keeps
31 // them.  This driver uses PositionEnum_Param, so it needs the latter:
32 //
33 //     AResultSet.cxx(277): error C2065: 'PositionEnum_Param': undeclared
34 //
35 // INSTEAD OF and not in addition to.  Both files open with
36 //
37 //     #ifndef _ADOINT_H_
38 //
39 // so whichever is included second is skipped entirely -- adding the
40 // back-compat header after adoint.h looks right and does exactly nothing.
41 // The two declare the same interfaces (ADOConnection, ADORecordset, ...);
42 // only the typedefs differ.
43 //
44 // Gated on the compiler generation rather than __has_include, which is C++17
45 // and this build is /std:c++14.  On this branch a UCRT-era compiler always
46 // pairs with the Windows 10 SDK, and VC9 always with an SDK whose adoint.h
47 // still carries the typedefs itself.
48 #if defined(_MSC_VER) && _MSC_VER >= 1900
49 #include <adoint_Backcompat.h>
50 #else
51 #include <adoint.h>
52 #endif
53 #include "ado_post_sys_include.h"
54 
55 namespace connectivity
56 {
57     namespace ado
58     {
59         class WpADOColumn : public WpOLEBase<_ADOColumn>
60         {
61         public:
WpADOColumn(_ADOColumn * pInt=NULL)62             WpADOColumn(_ADOColumn* pInt=NULL)  :   WpOLEBase<_ADOColumn>(pInt){}
WpADOColumn(const WpADOColumn & rhs)63             WpADOColumn(const WpADOColumn& rhs){operator=(rhs);}
64 
65             void Create();
66 
operator =(const WpADOColumn & rhs)67             inline WpADOColumn& operator=(const WpADOColumn& rhs)
68                 {WpOLEBase<_ADOColumn>::operator=(rhs); return *this;}
69 
70             ::rtl::OUString get_Name() const;
71             ::rtl::OUString get_RelatedColumn() const;
72             void put_Name(const ::rtl::OUString& _rName);
73             void put_RelatedColumn(const ::rtl::OUString& _rName);
74             DataTypeEnum get_Type() const;
75             void put_Type(const DataTypeEnum& _eNum) ;
76             sal_Int32 get_Precision() const;
77             void put_Precision(sal_Int32 _nPre) ;
78             sal_uInt8 get_NumericScale() const;
79             void put_NumericScale(sal_Int8 _nScale);
80             SortOrderEnum get_SortOrder() const;
81             void put_SortOrder(SortOrderEnum _nScale);
82             sal_Int32 get_DefinedSize() const;
83             ColumnAttributesEnum get_Attributes() const;
84             sal_Bool put_Attributes(const ColumnAttributesEnum& _eNum);
85             WpADOProperties get_Properties() const;
86             void put_ParentCatalog(/* [in] */ _ADOCatalog __RPC_FAR *ppvObject);
87         };
88     }
89 }
90 
91 #endif //CONNECTIVITY_ADO_WRAP_COLUMN_HXX
92