os/persistentdata/persistentstorage/dbms/pcdbms/inc/D32TABLE.INL
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/dbms/pcdbms/inc/D32TABLE.INL	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,105 @@
     1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +// Class CDbTableIndexDef
    1.20 +inline const TDesC& CDbTableIndexDef::Name() const
    1.21 +	{return *iName;}
    1.22 +inline const CDbKey& CDbTableIndexDef::Key() const
    1.23 +	{return iKey;}
    1.24 +inline CDbKey& CDbTableIndexDef::Key()
    1.25 +	{return iKey;}
    1.26 +// Class RDbIndexes
    1.27 +inline void RDbIndexes::Add(CDbTableIndexDef* aDef)
    1.28 +	{iRep.AddLast(*aDef);}
    1.29 +inline void RDbIndexes::Remove(CDbTableIndexDef* aDef)
    1.30 +	{iRep.Remove(*aDef);}
    1.31 +inline const TSglQueBase& RDbIndexes::AsQue() const
    1.32 +	{return iRep;}
    1.33 +
    1.34 +//Class TDbColumnDef
    1.35 +inline TDbColType TDbColumnDef::Type() const
    1.36 +	{return TDbColType(iType);}
    1.37 +
    1.38 +// Class HDbColumnSet
    1.39 +inline HDbColumnSet::TIterator HDbColumnSet::Begin()
    1.40 +	{return &iColumns[0];}
    1.41 +inline HDbColumnSet::TIteratorC HDbColumnSet::Begin() const
    1.42 +	{return &iColumns[0];}
    1.43 +inline HDbColumnSet::TIteratorC HDbColumnSet::End() const
    1.44 +	{return iEnd;}
    1.45 +inline TBool HDbColumnSet::HasLongColumns() const
    1.46 +	{return iAttributes&ELongColumns;}
    1.47 +inline TBool HDbColumnSet::HasAutoIncrement() const
    1.48 +	{return iAttributes&EAutoIncrement;}
    1.49 +inline const TDbColumnDef& HDbColumnSet::operator[](TDbColNo aColNo) const
    1.50 +	{return iColumns[aColNo-1];}
    1.51 +
    1.52 +// Class CDbTableDef
    1.53 +inline const HDbColumnSet& CDbTableDef::Columns() const
    1.54 +	{return *iColumns;}
    1.55 +inline HDbColumnSet& CDbTableDef::Columns()
    1.56 +	{return *iColumns;}
    1.57 +inline const TDesC& CDbTableDef::Name() const
    1.58 +	{return *iName;}
    1.59 +inline RDbIndexes&  CDbTableDef::Indexes()
    1.60 +	{return iIndexes;}
    1.61 +inline const RDbIndexes& CDbTableDef::Indexes() const
    1.62 +	{return iIndexes;}
    1.63 +inline const CDbTableIndexDef* CDbTableDef::Key(const TDesC& aColumn) const
    1.64 +	{return FindKey(aColumn,ETrue);}
    1.65 +inline TBool CDbTableDef::IsIndexed(const TDesC& aColumn) const
    1.66 +	{return FindKey(aColumn,EFalse)!=NULL;}
    1.67 +
    1.68 +// Class RDbTableSchema
    1.69 +inline void RDbTableSchema::Add(CDbTableDef* aDef)
    1.70 +	{iRep.AddLast(*aDef);}
    1.71 +inline RDbTableSchema::operator TSglQueBase&()
    1.72 +	{return iRep;}
    1.73 +inline void RDbTableSchema::Loaded()
    1.74 +	{iLoaded=ETrue;}
    1.75 +inline TBool RDbTableSchema::IsEmpty() const
    1.76 +	{return iRep.IsEmpty();}
    1.77 +
    1.78 +// Class TDbGenerationMark
    1.79 +inline void TDbGenerationMark::Construct(const TDbGeneration& aGeneration)
    1.80 +	{iGeneration=&aGeneration;iMark=aGeneration;}
    1.81 +inline void TDbGenerationMark::Mark()
    1.82 +	{iMark=*iGeneration;}
    1.83 +inline TBool TDbGenerationMark::Changed() const
    1.84 +	{return iMark!=*iGeneration;}
    1.85 +// Class CDbTable
    1.86 +inline TBool CDbTable::IsActive() const
    1.87 +	{return iDatabase!=0;}
    1.88 +inline const CDbTableDef& CDbTable::Def() const
    1.89 +	{__ASSERT_DEBUG(iDef,User::Invariant());return *iDef;}
    1.90 +inline CDbTableDatabase& CDbTable::Database()
    1.91 +	{__ASSERT_DEBUG(iDatabase,User::Invariant());return *iDatabase;}
    1.92 +inline const TDbGeneration& CDbTable::Generation() const
    1.93 +	{return iGeneration;}
    1.94 +// Class RDbTableRow
    1.95 +inline RDbTableRow::RDbTableRow()
    1.96 +	: iTable(0)
    1.97 +	{}
    1.98 +inline CDbTable& RDbTableRow::Table() const
    1.99 +	{return *iTable;}
   1.100 +
   1.101 +// Class CDbTableDatabase
   1.102 +inline RDbTransaction& CDbTableDatabase::Transaction()
   1.103 +	{return iTransaction;}
   1.104 +inline RDbTableSchema& CDbTableDatabase::Schema()
   1.105 +	{return iSchema;}
   1.106 +// Class CDbTableDatabase::CBuildIndex
   1.107 +inline CDbRecordIndex& CDbTableDatabase::CBuildIndex::Index()
   1.108 +	{return *iIndex;}