|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 inline TBool TCommDbConnPref::operator==(const TCommDbConnPref& aPref) const |
|
17 /** |
|
18 Overloaded function for operator "==" |
|
19 |
|
20 @param aPref Reference to the class TCommDbConnPref |
|
21 @return ETrue if Successful if both the objects are equal else EFalse |
|
22 */ |
|
23 { |
|
24 return (Compare(aPref) == 0); |
|
25 } |
|
26 |
|
27 inline TBool TCommDbConnPref::operator!=(const TCommDbConnPref& aPref) const |
|
28 /** |
|
29 Overloaded function for operator "!=" |
|
30 |
|
31 @param aPref Reference to the class TCommDbConnPref |
|
32 @return Etrue if Successful if the objects are not equal else EFalse |
|
33 */ |
|
34 { |
|
35 return (Compare(aPref) != 0); |
|
36 } |
|
37 |
|
38 inline TCommDbConnPref::SCommDbConnPref* TCommDbConnPref::PrefPtr() const |
|
39 { |
|
40 return reinterpret_cast<SCommDbConnPref*>(UserPtr()); |
|
41 } |
|
42 |
|
43 inline TCommDbConnPref& TCommDbConnPref::Cast(const TConnPref& aPref) |
|
44 /** |
|
45 Casts the TConnPref object to TCommDbConnPref |
|
46 |
|
47 @param aPref Connection preferences. |
|
48 @return Reference to TCommDbConnPref |
|
49 */ |
|
50 { |
|
51 // converting const TConnPref* to const TCommDbConnPref* and then casting away the constness |
|
52 return *const_cast<TCommDbConnPref*>((reinterpret_cast<const TCommDbConnPref*>(&aPref))); |
|
53 } |
|
54 |
|
55 inline TCommDbMultiConnPref::SCommDbMultiConnPref* TCommDbMultiConnPref::PrefPtr() const |
|
56 { |
|
57 return reinterpret_cast<SCommDbMultiConnPref*>(UserPtr()); |
|
58 } |
|
59 |
|
60 inline TCommDbMultiConnPref& TCommDbMultiConnPref::Cast(const TConnPref& aPref) |
|
61 /** |
|
62 Casts the TConnPref object to TCommDbMultiConnPref |
|
63 |
|
64 @param aPref Connection preferences. |
|
65 @return Reference to TCommDbMultiConnPref |
|
66 */ |
|
67 { |
|
68 // converting const TConnPref* to const TCommDbMultiConnPref* and then casting away the constness |
|
69 return *const_cast<TCommDbMultiConnPref*>((reinterpret_cast<const TCommDbMultiConnPref*>(&aPref))); |
|
70 } |