idlehomescreen/xmluirendering/uiengine/src/xnviewsnodeimpl.cpp
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Implementation of views node
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDES
       
    19 
       
    20 // USER INCLUDES
       
    21 #include    "xnviewsnodeimpl.h"
       
    22 #include    "xncomponent.h"
       
    23 
       
    24 // ============================ MEMBER FUNCTIONS ===============================
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // CXnViewsNodeImpl::NewL()
       
    28 // Two-phased constructor.
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 EXPORT_C CXnViewsNodeImpl* CXnViewsNodeImpl::NewL( CXnType* aType )
       
    32     {
       
    33     CXnViewsNodeImpl* self = new( ELeave ) CXnViewsNodeImpl;
       
    34     CleanupStack::PushL( self );
       
    35     self->ConstructL( aType );
       
    36     CleanupStack::Pop();
       
    37 
       
    38     return self;
       
    39     }
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // CXnViewsNodeImpl::ConstructL()
       
    43 // Symbian 2nd phase constructor can leave.
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 EXPORT_C void CXnViewsNodeImpl::ConstructL( CXnType* aType )
       
    47     {
       
    48     CXnNodeImpl::ConstructL( aType );
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CXnViewsNodeImpl::CXnViewsNodeImpl()
       
    53 // C++ default constructor can NOT contain any code, that
       
    54 // might leave.
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 EXPORT_C CXnViewsNodeImpl::CXnViewsNodeImpl() 
       
    58     {
       
    59     }
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // CXnViewsNodeImpl::~CXnViewsNodeImpl()
       
    63 // C++ default destructor.
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 EXPORT_C CXnViewsNodeImpl::~CXnViewsNodeImpl()
       
    67     {
       
    68     delete iComponent;
       
    69     }
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 // CXnViewsNodeImpl::Component()
       
    73 // Returns the component associated with the views-node.
       
    74 // -----------------------------------------------------------------------------
       
    75 //
       
    76 EXPORT_C CXnComponent* CXnViewsNodeImpl::Component()
       
    77     {
       
    78     return iComponent;
       
    79     }
       
    80 
       
    81 // -----------------------------------------------------------------------------
       
    82 // CXnViewsNodeImpl::Component()
       
    83 // Associates given component with the views-node.
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 EXPORT_C void CXnViewsNodeImpl::SetComponent( CXnComponent* aComponent )
       
    87     {
       
    88     if ( iComponent != NULL )
       
    89         {
       
    90         return;
       
    91         }
       
    92     iComponent = aComponent;
       
    93     }