xref: /AOO41X/main/connectivity/source/simpledbt/parsenode_s.cxx (revision 9b5730f6ddef7eb82608ca4d31dc0d7678e652cf)
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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_connectivity.hxx"
26 #include <connectivity/virtualdbtools.hxx>
27 #include "parsenode_s.hxx"
28 #include <connectivity/sqlnode.hxx>
29 
30 using namespace ::com::sun::star::uno;
31 using namespace ::com::sun::star::util;
32 using namespace ::com::sun::star::beans;
33 using namespace ::com::sun::star::lang;
34 using namespace ::com::sun::star::sdbc;
35 
36 //........................................................................
37 namespace connectivity
38 {
39 //........................................................................
40 
41     //================================================================
42     //= OSimpleParseNode
43     //================================================================
44     //----------------------------------------------------------------
OSimpleParseNode(const OSQLParseNode * _pNode,sal_Bool _bTakeOwnership)45     OSimpleParseNode::OSimpleParseNode(const OSQLParseNode* _pNode, sal_Bool _bTakeOwnership)
46         :m_pFullNode(_pNode)
47         ,m_bOwner(_bTakeOwnership)
48     {
49         OSL_ENSURE(m_pFullNode, "OSimpleParseNode::OSimpleParseNode: invalid node given!");
50     }
51 
52     //----------------------------------------------------------------
~OSimpleParseNode()53     OSimpleParseNode::~OSimpleParseNode()
54     {
55         if (m_bOwner)
56             delete m_pFullNode;
57     }
58 
59     //----------------------------------------------------------------
acquire()60     oslInterlockedCount SAL_CALL OSimpleParseNode::acquire()
61     {
62         return ORefBase::acquire();
63     }
64 
65     //----------------------------------------------------------------
release()66     oslInterlockedCount SAL_CALL OSimpleParseNode::release()
67     {
68         return ORefBase::release();
69     }
70 
71     //----------------------------------------------------------------
parseNodeToStr(::rtl::OUString & _rString,const Reference<XConnection> & _rxConnection,const IParseContext * _pContext) const72     void OSimpleParseNode::parseNodeToStr(::rtl::OUString& _rString, const Reference< XConnection >& _rxConnection,const IParseContext* _pContext) const
73     {
74         m_pFullNode->parseNodeToStr( _rString, _rxConnection, _pContext );
75     }
76 
77     //----------------------------------------------------------------
parseNodeToPredicateStr(::rtl::OUString & _rString,const Reference<XConnection> & _rxConnection,const Reference<XNumberFormatter> & _rxFormatter,const Reference<XPropertySet> & _rxField,const Locale & _rIntl,const sal_Char _cDecSeparator,const IParseContext * _pContext) const78     void OSimpleParseNode::parseNodeToPredicateStr(::rtl::OUString& _rString, const Reference< XConnection >& _rxConnection,
79         const Reference< XNumberFormatter >& _rxFormatter, const Reference< XPropertySet >& _rxField,
80         const Locale& _rIntl, const sal_Char _cDecSeparator,const IParseContext* _pContext) const
81     {
82         m_pFullNode->parseNodeToPredicateStr( _rString, _rxConnection, _rxFormatter, _rxField, _rIntl, _cDecSeparator, _pContext );
83     }
84 
85 //........................................................................
86 }   // namespace connectivity
87 //........................................................................
88 
89 
90