plugin/poi/landmarks/overlay/inc/Manager.h
changeset 0 c316ab048e9d
equal deleted inserted replaced
-1:000000000000 0:c316ab048e9d
       
     1 /*
       
     2  * Name        : Manager.h
       
     3  * Description : 
       
     4  * Project     : This file is part of OpenMAR, an Open Mobile Augmented Reality browser
       
     5  * Website     : http://OpenMAR.org
       
     6  *
       
     7  * Copyright (c) 2010 David Caabeiro
       
     8  *
       
     9  * All rights reserved. This program and the accompanying materials are made available 
       
    10  * under the terms of the Eclipse Public License v1.0 which accompanies this 
       
    11  * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
       
    12  *
       
    13  */
       
    14 
       
    15 #ifndef MANAGER_H_
       
    16 #define MANAGER_H_
       
    17 
       
    18 #include "POIProvider.h"
       
    19 #include "POIObject.h"
       
    20 
       
    21 #include "Vector3d.h"
       
    22 
       
    23 /**
       
    24  * @brief Manages points of interest
       
    25  * 
       
    26  * The manager connects to a group of POI providers and manages a list of POIs
       
    27  * A caching and filtering mechanism could be implemented
       
    28  */
       
    29 class CManager : public CBase, public OpenMAR::MPOIProviderObserver
       
    30 {
       
    31     friend class COverlay;
       
    32 
       
    33 public:
       
    34     static CManager* NewL();
       
    35     ~CManager();
       
    36 
       
    37 protected:
       
    38     CManager();
       
    39     void ConstructL();
       
    40 
       
    41 protected:
       
    42     // From OpenMAR::MPOIProviderObserver
       
    43     void POIProviderLoadedL(OpenMAR::CPOIProvider* aProvider, TInt aError);
       
    44     void POIObjectCreatedL(OpenMAR::CPOIObject* aPOIObject);
       
    45     void POIObjectUpdatedL(OpenMAR::CPOIObject* aPOIObject);
       
    46 
       
    47 protected:
       
    48     const Vector3d Transform(const TCoordinate& aCoordinate);
       
    49 
       
    50 public:
       
    51     void SetOrigin(const TCoordinate& aCoordinate);
       
    52 
       
    53     void RequestL(const TCoordinate& aCoordinate);
       
    54     void Render() const;
       
    55 
       
    56 private:
       
    57     RPointerArray<OpenMAR::CPOIProvider> iProviderList;
       
    58 
       
    59     TCoordinate iOrigin;
       
    60     RPointerArray<OpenMAR::CPOIObject> iObjectList;
       
    61 };
       
    62 
       
    63 #endif