home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 Mobile
/
Chip_Mobile_2001.iso
/
palm
/
business
/
printcar
/
printcar.exe
/
src
/
ScriptTranslationTable.h
< prev
Wrap
C/C++ Source or Header
|
2000-06-10
|
1KB
|
48 lines
//
// $Id: ScriptTranslationTable.h,v 1.2 2000/06/10 00:19:54 sergey Exp $
//
#ifndef _ScriptTranslationTable_h_
#define _ScriptTranslationTable_h_
#include "Util/TemplateTranslator.h"
namespace DB
{
class AddressAppInfo;
class AdresseRecord;
}
class PrintCardPreferences;
//
// This translation table will be used to replace placeholders inside
// the script by the values from the concrete Address record.
//
class ScriptTranslationTable: public Util::TemplateTranslator::TranslationTable
{
public:
ScriptTranslationTable(const DB::AddressAppInfo& addressAppInfo, const DB::AdresseRecord& address, const PrintCardPreferences& preferences);
// operations
public:
// Keywords passed to this method must be within the Address entry names range.
virtual const char* get(const char* keyword) const;
// implermentation
private:
const char* getPhoneLabel(const char* keyword) const;
int getPhoneEntryIndex(const char* keyword) const;
const char* getPreference(const char* keyword) const;
// data members
private:
const DB::AddressAppInfo& _addressAppInfo;
const DB::AdresseRecord& _address;
const PrintCardPreferences& _preferences;
mutable char _numBuffer[sizeof(int)*8+1];
};
#endif // _ScriptTranslationTable_h_