sl@0: // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: // Class CDbTableIndexDef sl@0: inline const TDesC& CDbTableIndexDef::Name() const sl@0: {return *iName;} sl@0: inline const CDbKey& CDbTableIndexDef::Key() const sl@0: {return iKey;} sl@0: inline CDbKey& CDbTableIndexDef::Key() sl@0: {return iKey;} sl@0: // Class RDbIndexes sl@0: inline void RDbIndexes::Add(CDbTableIndexDef* aDef) sl@0: {iRep.AddLast(*aDef);} sl@0: inline void RDbIndexes::Remove(CDbTableIndexDef* aDef) sl@0: {iRep.Remove(*aDef);} sl@0: inline const TSglQueBase& RDbIndexes::AsQue() const sl@0: {return iRep;} sl@0: sl@0: //Class TDbColumnDef sl@0: inline TDbColType TDbColumnDef::Type() const sl@0: {return TDbColType(iType);} sl@0: sl@0: // Class HDbColumnSet sl@0: inline HDbColumnSet::TIterator HDbColumnSet::Begin() sl@0: {return &iColumns[0];} sl@0: inline HDbColumnSet::TIteratorC HDbColumnSet::Begin() const sl@0: {return &iColumns[0];} sl@0: inline HDbColumnSet::TIteratorC HDbColumnSet::End() const sl@0: {return iEnd;} sl@0: inline TBool HDbColumnSet::HasLongColumns() const sl@0: {return iAttributes&ELongColumns;} sl@0: inline TBool HDbColumnSet::HasAutoIncrement() const sl@0: {return iAttributes&EAutoIncrement;} sl@0: inline const TDbColumnDef& HDbColumnSet::operator[](TDbColNo aColNo) const sl@0: {return iColumns[aColNo-1];} sl@0: sl@0: // Class CDbTableDef sl@0: inline const HDbColumnSet& CDbTableDef::Columns() const sl@0: {return *iColumns;} sl@0: inline HDbColumnSet& CDbTableDef::Columns() sl@0: {return *iColumns;} sl@0: inline const TDesC& CDbTableDef::Name() const sl@0: {return *iName;} sl@0: inline RDbIndexes& CDbTableDef::Indexes() sl@0: {return iIndexes;} sl@0: inline const RDbIndexes& CDbTableDef::Indexes() const sl@0: {return iIndexes;} sl@0: inline const CDbTableIndexDef* CDbTableDef::Key(const TDesC& aColumn) const sl@0: {return FindKey(aColumn,ETrue);} sl@0: inline TBool CDbTableDef::IsIndexed(const TDesC& aColumn) const sl@0: {return FindKey(aColumn,EFalse)!=NULL;} sl@0: sl@0: // Class RDbTableSchema sl@0: inline void RDbTableSchema::Add(CDbTableDef* aDef) sl@0: {iRep.AddLast(*aDef);} sl@0: inline RDbTableSchema::operator TSglQueBase&() sl@0: {return iRep;} sl@0: inline void RDbTableSchema::Loaded() sl@0: {iLoaded=ETrue;} sl@0: inline TBool RDbTableSchema::IsEmpty() const sl@0: {return iRep.IsEmpty();} sl@0: sl@0: // Class TDbGenerationMark sl@0: inline void TDbGenerationMark::Construct(const TDbGeneration& aGeneration) sl@0: {iGeneration=&aGeneration;iMark=aGeneration;} sl@0: inline void TDbGenerationMark::Mark() sl@0: {iMark=*iGeneration;} sl@0: inline TBool TDbGenerationMark::Changed() const sl@0: {return iMark!=*iGeneration;} sl@0: // Class CDbTable sl@0: inline TBool CDbTable::IsActive() const sl@0: {return iDatabase!=0;} sl@0: inline const CDbTableDef& CDbTable::Def() const sl@0: {__ASSERT_DEBUG(iDef,User::Invariant());return *iDef;} sl@0: inline CDbTableDatabase& CDbTable::Database() sl@0: {__ASSERT_DEBUG(iDatabase,User::Invariant());return *iDatabase;} sl@0: inline const TDbGeneration& CDbTable::Generation() const sl@0: {return iGeneration;} sl@0: // Class RDbTableRow sl@0: inline RDbTableRow::RDbTableRow() sl@0: : iTable(0) sl@0: {} sl@0: inline CDbTable& RDbTableRow::Table() const sl@0: {return *iTable;} sl@0: sl@0: // Class CDbTableDatabase sl@0: inline RDbTransaction& CDbTableDatabase::Transaction() sl@0: {return iTransaction;} sl@0: inline RDbTableSchema& CDbTableDatabase::Schema() sl@0: {return iSchema;} sl@0: // Class CDbTableDatabase::CBuildIndex sl@0: inline CDbRecordIndex& CDbTableDatabase::CBuildIndex::Index() sl@0: {return *iIndex;}