|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class to hold description about one object and it's properties |
|
15 * |
|
16 */ |
|
17 |
|
18 /** |
|
19 * How many properties have object |
|
20 * return properties.Count() |
|
21 */ |
|
22 inline TInt CMdsObjectDef::GetPropertiesCount() const |
|
23 { |
|
24 return iPropertyDefs.Count(); |
|
25 } |
|
26 |
|
27 inline void CMdsObjectDef::SetC2PStoredInDB() |
|
28 { |
|
29 SetFlag( EStoredFlagsC2P ); |
|
30 } |
|
31 |
|
32 inline TBool CMdsObjectDef::GetC2PStoredInDB() const |
|
33 { |
|
34 return GetFlag( EStoredFlagsC2P ); |
|
35 } |
|
36 |
|
37 /* |
|
38 * Gets parent of the object |
|
39 */ |
|
40 inline const CMdsObjectDef* CMdsObjectDef::GetParent() const |
|
41 { |
|
42 return iParent; |
|
43 } |
|
44 |
|
45 /** |
|
46 * Get property column Id |
|
47 * |
|
48 * @param aPropertyNo number of property in property array |
|
49 * @return ColumnId |
|
50 */ |
|
51 inline const CMdsObjectDef::TMdsColumnOrder& CMdsObjectDef::GetPropertyColumnL( TInt aIndex ) const |
|
52 { |
|
53 if (aIndex < 0 || aIndex >= iCol2Prop.Count()) |
|
54 { |
|
55 User::Leave( KErrNotFound ); |
|
56 } |
|
57 return iCol2Prop[aIndex]; |
|
58 } |
|
59 |
|
60 inline void CMdsObjectDef::ResetFlags() |
|
61 { |
|
62 iFlags = EObjectDefFlagsNone; |
|
63 } |
|
64 |
|
65 inline CMdsObjectDef::TObjectDefFlags CMdsObjectDef::GetFlags() const |
|
66 { |
|
67 return iFlags; |
|
68 } |
|
69 |
|
70 inline void CMdsObjectDef::SetFlags(TObjectDefFlags aFlags) |
|
71 { |
|
72 iFlags = aFlags; |
|
73 } |
|
74 |