calendarui/regionalplugins/calenregionalutil/src/calenlunarinfo.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 14:14:56 +0300
changeset 50 579cc610882e
parent 18 c198609911f9
child 55 2c54b51f39c4
permissions -rw-r--r--
Revision: 201025 Kit: 2010127

/*
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   Calendar Lunar Plugin 
*
*/



#include "calendarui_debug.h"
#include "CalenLunarInfo.h"

// -----------------------------------------------------------------------------
// TCalenLunarInfo::HasFestival
// -----------------------------------------------------------------------------
//
EXPORT_C TBool TCalenLunarInfo::HasFestival()
    {
    TRACE_ENTRY_POINT;
    
    TRACE_EXIT_POINT;
    return iFestival >= 0;
    }

// -----------------------------------------------------------------------------
// TCalenLunarInfo::HasSolarTerm
// -----------------------------------------------------------------------------
//
EXPORT_C TBool TCalenLunarInfo::HasSolarTerm()
    {
    TRACE_ENTRY_POINT;
    
    TRACE_EXIT_POINT;
    return iSolarTerm >= 0;
    }

// -----------------------------------------------------------------------------
// TCalenLunarInfo::AnimalYear
// -----------------------------------------------------------------------------
//

EXPORT_C TCalenLunarInfo::TAnimalYear TCalenLunarInfo::AnimalYear()
    {
    TRACE_ENTRY_POINT;
    
    ASSERT( EYearOfRat < EYearOfPig );
    ASSERT( EYearOfRat <= iTerrestialBranch );
    ASSERT( iTerrestialBranch <= EYearOfPig );
    
    // Ordering is same for animal years and terrestial branches
    TRACE_EXIT_POINT;
    return static_cast<TCalenLunarInfo::TAnimalYear>( iTerrestialBranch );
    }