landmarks/locationlandmarks/converter/src/EPos_CPosLmCollectionData.cpp
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2005 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 for holding collection data information while parsing
       
    15 * a Landmark XML file to a landmark(s).
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "EPos_CPosLmCollectionData.h"
       
    23 
       
    24 // ================= MEMBER FUNCTIONS =======================
       
    25 
       
    26 // C++ default constructor can NOT contain any code, that
       
    27 // might leave.
       
    28 //
       
    29 CPosLmCollectionData::CPosLmCollectionData(
       
    30     TPosLmCollectionDataId aId) :
       
    31     iCollectionDataId(aId)
       
    32     {
       
    33     }
       
    34 
       
    35 // EPOC default constructor can leave.
       
    36 void CPosLmCollectionData::ConstructL(
       
    37     const TDesC& aDesC)
       
    38     {
       
    39     iCollectionDataName = aDesC.AllocL();
       
    40     }
       
    41 
       
    42 // Two-phased constructor.
       
    43 CPosLmCollectionData* CPosLmCollectionData::NewLC(
       
    44     const TDesC& aDesC,
       
    45     TPosLmCollectionDataId aId)
       
    46     {
       
    47     CPosLmCollectionData* self = new (ELeave) CPosLmCollectionData(aId);
       
    48     CleanupStack::PushL(self);
       
    49     self->ConstructL(aDesC);
       
    50     return self;
       
    51     }
       
    52 
       
    53 // Destructor
       
    54 CPosLmCollectionData::~CPosLmCollectionData()
       
    55     {
       
    56     delete iCollectionDataName;
       
    57     }
       
    58 
       
    59 // -----------------------------------------------------------------------------
       
    60 // CPosLmCollectionData::GetCollectionData
       
    61 //
       
    62 // (other items were commented in a header).
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 void CPosLmCollectionData::GetCollectionData(TPtrC& aName) const
       
    66     {
       
    67     aName.Set(*iCollectionDataName);
       
    68     }
       
    69 
       
    70 // -----------------------------------------------------------------------------
       
    71 // CPosLmCollectionData::CollectionDataId
       
    72 //
       
    73 // (other items were commented in a header).
       
    74 // -----------------------------------------------------------------------------
       
    75 //
       
    76 TPosLmCollectionDataId CPosLmCollectionData::CollectionDataId() const
       
    77     {
       
    78     return iCollectionDataId;
       
    79     }
       
    80 
       
    81 //  End of File