home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 Mobile
/
Chip_Mobile_2001.iso
/
palm
/
business
/
printcar
/
printcar.exe
/
src
/
CardList.h
< prev
next >
Wrap
C/C++ Source or Header
|
2000-06-05
|
1KB
|
49 lines
//
// $Id: CardList.h,v 1.2 2000/06/04 23:23:24 sergey Exp $
//
#ifndef _CardList_h_
#define _CardList_h_
#include "DB/ResourceDatabase.h"
#include "CardRecord.h"
//
// This class represents a list of Card items.
// The data will be read from the PrintCardDB.
//
class CardList
{
public:
CardList();
private:
CardList(const CardList&);
CardList& operator =(const CardList&);
// operations
public:
int recordCount() const;
const CardRecord& record(int index) const;
// attributes
bool isRecord(int index) const { return 0 <= index && index < _recordCount; }
// implementation
private:
bool ensureDatabaseOpened() const;
bool ensureRecordLoaded(int index) const;
// data members
private:
mutable int _recordCount;
mutable int _lastIndex;
mutable DB::ResourceDatabase _database;
mutable CardRecord _currentRecord;
};
#endif // _CardList_h_