📄 csrecord.hxx
字号:
#ifndef CSCRRECORD_HXX
#define CSCRRECORD_HXX
#include "Record.hxx"
/** This class derives from 'Record' superclass to implement
* 'Call Blocking' Record.
*
* CSRecord.hxx version 1.0 -- 18 Mar 2003
* Suha Cubukcuoglu
*/
typedef map <string, string> Table;
typedef Table::value_type stype_map_pair;
typedef Table::iterator itr;
class CSRecord : public Record
{
public:
/** Constructor */
CSRecord();
/** Destructor */
~CSRecord();
/**
* populates this object from the database.
* key is the key used to retrieve information, dbcon is a connection
* to the database (provided by the DBManager)
*/
virtual bool populateRecord(KeyType key, DBConnection* dbcon);
/**
* amends this object in the database, returns true if nothing
* goes wrong
*/
virtual bool amendRecord(DBConnection* dbconn);
/**
* deletes this object from the database,
* returns true if nothing goes wrong
*/
virtual bool deleteRecord(DBConnection* dbconn);
/**
* inserts this object in the database,
* returns true if nothing goes wrong
*/
virtual bool insertRecord(DBConnection* dbconn);
/**
* This function queries the database and returns a
* list of all the relavent keys that could be used
* to retrieve records of this type
*/
virtual KeyList getAllKeys(DBConnection* dbconn);
virtual void displayRecord();
/** user ID that this record is for */
void setAccountID(int id) { accountID = id; };
/** accessor to AccountID */
int getAccountID() { return accountID; };
/** add a new entry into Call Screening table */
void addEntry(stype_map_pair s) { cScrTable.insert(s); };
/** delete an entry from Call Screening table */
bool deleteEntry(string key);
/** find an entry in the all Screening table */
bool findEntry(string key);
private:
Table cScrTable;
int accountID;
};
#endif /** CSCRRECORD_HXX */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -