os/persistentdata/persistentstorage/dbms/pcdbms/inc/D32TABLE.INL
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
// Class CDbTableIndexDef
sl@0
    17
inline const TDesC& CDbTableIndexDef::Name() const
sl@0
    18
	{return *iName;}
sl@0
    19
inline const CDbKey& CDbTableIndexDef::Key() const
sl@0
    20
	{return iKey;}
sl@0
    21
inline CDbKey& CDbTableIndexDef::Key()
sl@0
    22
	{return iKey;}
sl@0
    23
// Class RDbIndexes
sl@0
    24
inline void RDbIndexes::Add(CDbTableIndexDef* aDef)
sl@0
    25
	{iRep.AddLast(*aDef);}
sl@0
    26
inline void RDbIndexes::Remove(CDbTableIndexDef* aDef)
sl@0
    27
	{iRep.Remove(*aDef);}
sl@0
    28
inline const TSglQueBase& RDbIndexes::AsQue() const
sl@0
    29
	{return iRep;}
sl@0
    30
sl@0
    31
//Class TDbColumnDef
sl@0
    32
inline TDbColType TDbColumnDef::Type() const
sl@0
    33
	{return TDbColType(iType);}
sl@0
    34
sl@0
    35
// Class HDbColumnSet
sl@0
    36
inline HDbColumnSet::TIterator HDbColumnSet::Begin()
sl@0
    37
	{return &iColumns[0];}
sl@0
    38
inline HDbColumnSet::TIteratorC HDbColumnSet::Begin() const
sl@0
    39
	{return &iColumns[0];}
sl@0
    40
inline HDbColumnSet::TIteratorC HDbColumnSet::End() const
sl@0
    41
	{return iEnd;}
sl@0
    42
inline TBool HDbColumnSet::HasLongColumns() const
sl@0
    43
	{return iAttributes&ELongColumns;}
sl@0
    44
inline TBool HDbColumnSet::HasAutoIncrement() const
sl@0
    45
	{return iAttributes&EAutoIncrement;}
sl@0
    46
inline const TDbColumnDef& HDbColumnSet::operator[](TDbColNo aColNo) const
sl@0
    47
	{return iColumns[aColNo-1];}
sl@0
    48
sl@0
    49
// Class CDbTableDef
sl@0
    50
inline const HDbColumnSet& CDbTableDef::Columns() const
sl@0
    51
	{return *iColumns;}
sl@0
    52
inline HDbColumnSet& CDbTableDef::Columns()
sl@0
    53
	{return *iColumns;}
sl@0
    54
inline const TDesC& CDbTableDef::Name() const
sl@0
    55
	{return *iName;}
sl@0
    56
inline RDbIndexes&  CDbTableDef::Indexes()
sl@0
    57
	{return iIndexes;}
sl@0
    58
inline const RDbIndexes& CDbTableDef::Indexes() const
sl@0
    59
	{return iIndexes;}
sl@0
    60
inline const CDbTableIndexDef* CDbTableDef::Key(const TDesC& aColumn) const
sl@0
    61
	{return FindKey(aColumn,ETrue);}
sl@0
    62
inline TBool CDbTableDef::IsIndexed(const TDesC& aColumn) const
sl@0
    63
	{return FindKey(aColumn,EFalse)!=NULL;}
sl@0
    64
sl@0
    65
// Class RDbTableSchema
sl@0
    66
inline void RDbTableSchema::Add(CDbTableDef* aDef)
sl@0
    67
	{iRep.AddLast(*aDef);}
sl@0
    68
inline RDbTableSchema::operator TSglQueBase&()
sl@0
    69
	{return iRep;}
sl@0
    70
inline void RDbTableSchema::Loaded()
sl@0
    71
	{iLoaded=ETrue;}
sl@0
    72
inline TBool RDbTableSchema::IsEmpty() const
sl@0
    73
	{return iRep.IsEmpty();}
sl@0
    74
sl@0
    75
// Class TDbGenerationMark
sl@0
    76
inline void TDbGenerationMark::Construct(const TDbGeneration& aGeneration)
sl@0
    77
	{iGeneration=&aGeneration;iMark=aGeneration;}
sl@0
    78
inline void TDbGenerationMark::Mark()
sl@0
    79
	{iMark=*iGeneration;}
sl@0
    80
inline TBool TDbGenerationMark::Changed() const
sl@0
    81
	{return iMark!=*iGeneration;}
sl@0
    82
// Class CDbTable
sl@0
    83
inline TBool CDbTable::IsActive() const
sl@0
    84
	{return iDatabase!=0;}
sl@0
    85
inline const CDbTableDef& CDbTable::Def() const
sl@0
    86
	{__ASSERT_DEBUG(iDef,User::Invariant());return *iDef;}
sl@0
    87
inline CDbTableDatabase& CDbTable::Database()
sl@0
    88
	{__ASSERT_DEBUG(iDatabase,User::Invariant());return *iDatabase;}
sl@0
    89
inline const TDbGeneration& CDbTable::Generation() const
sl@0
    90
	{return iGeneration;}
sl@0
    91
// Class RDbTableRow
sl@0
    92
inline RDbTableRow::RDbTableRow()
sl@0
    93
	: iTable(0)
sl@0
    94
	{}
sl@0
    95
inline CDbTable& RDbTableRow::Table() const
sl@0
    96
	{return *iTable;}
sl@0
    97
sl@0
    98
// Class CDbTableDatabase
sl@0
    99
inline RDbTransaction& CDbTableDatabase::Transaction()
sl@0
   100
	{return iTransaction;}
sl@0
   101
inline RDbTableSchema& CDbTableDatabase::Schema()
sl@0
   102
	{return iSchema;}
sl@0
   103
// Class CDbTableDatabase::CBuildIndex
sl@0
   104
inline CDbRecordIndex& CDbTableDatabase::CBuildIndex::Index()
sl@0
   105
	{return *iIndex;}