Example Application Guide

- Main Page
- Classes
- Files

# geoprofileslbmodel.h

    00001 /*
    00002 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
    00003 * All rights reserved.
    00004 * This component and the accompanying materials are made available
    00005 * under the terms of the License "Eclipse Public License v1.0"
    00006 * which accompanies this distribution, and is available
    00007 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    00008 *
    00009 * Initial Contributors:
    00010 * Nokia Corporation - initial contribution.
    00011 *
    00012 * Contributors:
    00013 *
    00014 * Description:  List box model for Geo Profiles Application UI.
    00015 *
    00016 */
    00017
    00018
    00019 #ifndef C_GEOPROFILESLBMODEL_H
    00020 #define C_GEOPROFILESLBMODEL_H
    00021
    00022 // SYSTEM INCLUDES
    00023 #include <e32base.h>
    00024 #include <bamdesca.h>  // MDesCArray
    00025
    00026 // FORWARD DECLARATIONS
    00027 class CGeoProfile;
    00028
    00029 /**
    00030  * List box model for Geo Profiles Application
    00031  *
    00032  * This class provides the implementation of the list-box model for
    00033  * Geo Profiles lists.
    00034  */
    00035 class CGeoProfilesLBModel : public CBase,
    00036                                                     public MDesCArray
    00037     {
    00038 public:
    00039     /**
    00040      * Constructs a new instance of Geo Profiles list box model.
    00041      */
    00042     static CGeoProfilesLBModel* NewL( RPointerArray<CGeoProfile>*        aGeoProfiles );
    00043
    00044     /**
    00045      * C++ Destructor.
    00046      * Frees all the resources
    00047      */
    00048     virtual ~CGeoProfilesLBModel();
    00049
    00050     /**
    00051      * Updates the Geo Profiles model
    00052      */
    00053     void UpdateModel( RPointerArray<CGeoProfile>*                   aGeoProfiles );
    00054
    00055 public: // Inherited from Base classes
    00056     /**
    00057      * Inherited from MDesCArray
    00058      */
    00059     virtual TInt MdcaCount() const;
    00060
    00061     /**
    00062      * Inherited from MDesCArray
    00063      */
    00064     virtual TPtrC16 MdcaPoint( TInt aIndex ) const;
    00065
    00066 private:
    00067     /**
    00068      * Overloaded constructor
    00069      */
    00070     CGeoProfilesLBModel( RPointerArray<CGeoProfile>*            aGeoProfiles );
    00071
    00072     /**
    00073      * Second phase of the two phase constructor
    00074      */
    00075     void ConstructL();
    00076
    00077 private: // data
    00078
    00079     /**
    00080      * Buffer for packing the MdcaPoint
    00081      *
    00082      * Owns
    00083      */
    00084     HBufC16*                                            iBuffer;
    00085
    00086     /**
    00087      * Profile Array
    00088      */
    00089     RPointerArray<CGeoProfile>*         iGeoProfiles;
    00090     };
    00091
    00092 #endif // C_GEOPROFILESLBMODEL_H

© Nokia 2009 |