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_dbaccess.hxx"
26 #ifndef DBAUI_CONNECTIONLINEDATA_HXX
27 #include "ConnectionLineData.hxx"
28 #endif
29 #ifndef _TOOLS_DEBUG_HXX
30 #include <tools/debug.hxx>
31 #endif
32 
33 
34 using namespace dbaui;
DBG_NAME(OConnectionLineData)35 DBG_NAME(OConnectionLineData)
36 //==================================================================
37 //class OConnectionLineData
38 //==================================================================
39 //------------------------------------------------------------------------
40 OConnectionLineData::OConnectionLineData()
41 {
42 	DBG_CTOR(OConnectionLineData,NULL);
43 }
44 
45 //------------------------------------------------------------------------
OConnectionLineData(const::rtl::OUString & rSourceFieldName,const::rtl::OUString & rDestFieldName)46 OConnectionLineData::OConnectionLineData( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName )
47 	:m_aSourceFieldName( rSourceFieldName )
48 	,m_aDestFieldName( rDestFieldName )
49 {
50 	DBG_CTOR(OConnectionLineData,NULL);
51 }
52 
53 //------------------------------------------------------------------------
OConnectionLineData(const OConnectionLineData & rConnLineData)54 OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData )
55     : ::vos::OReference()
56 {
57 	DBG_CTOR(OConnectionLineData,NULL);
58 	*this = rConnLineData;
59 }
60 
61 //------------------------------------------------------------------------
~OConnectionLineData()62 OConnectionLineData::~OConnectionLineData()
63 {
64 	DBG_DTOR(OConnectionLineData,NULL);
65 }
66 
67 //------------------------------------------------------------------------
CopyFrom(const OConnectionLineData & rSource)68 void OConnectionLineData::CopyFrom(const OConnectionLineData& rSource)
69 {
70 	*this = rSource;
71 	// hier ziehe ich mich auf das (nicht-virtuelle) operator= zurueck, das nur meine Members kopiert
72 }
73 
74 //------------------------------------------------------------------------
operator =(const OConnectionLineData & rConnLineData)75 OConnectionLineData& OConnectionLineData::operator=( const OConnectionLineData& rConnLineData )
76 {
77 	if (&rConnLineData == this)
78 		return *this;
79 
80 	m_aSourceFieldName = rConnLineData.GetSourceFieldName();
81 	m_aDestFieldName = rConnLineData.GetDestFieldName();
82 
83 	return *this;
84 }
85 
86 //------------------------------------------------------------------------
Reset()87 bool OConnectionLineData::Reset()
88 {
89 	m_aDestFieldName = m_aSourceFieldName = ::rtl::OUString();
90 	return true;
91 }
92 // -----------------------------------------------------------------------------
93 namespace dbaui
94 {
95 //-------------------------------------------------------------------------
operator ==(const OConnectionLineData & lhs,const OConnectionLineData & rhs)96 bool operator==(const OConnectionLineData& lhs, const OConnectionLineData& rhs)
97 {
98 	return (lhs.m_aSourceFieldName == rhs.m_aSourceFieldName)
99         && (lhs.m_aDestFieldName == rhs.m_aDestFieldName);
100 }
101 }
102 
103