⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csrecord.cxx

📁 vovida的软交换
💻 CXX
字号:
/*  This implements 'Call Screening' subclass of
 *  the 'Record' superclass.
 *
 *  CSRecord.cxx          version 1.0 -- 18 Mar 2003
 *                        Suha Cubukcuoglu         
 */
 
#include "CSRecord.hxx"

CSRecord::CSRecord()
{
	setRecordType(CS_RECORD);
}

CSRecord::~CSRecord() {}

void CSRecord::displayRecord()
{
	cout << "Displaying Call Screening Record:\n";
    cout << "-------------------------------"   <<"\n";
    cout << "Account ID  :" << getAccountID()   <<"\n";
    cout << "Call Screening List: " << "***********" <<"\n\n";
    
    itr i; 
    i = cScrTable.begin();
    
    for(; i != cScrTable.end(); i++){
    	cout << "Name: " << i->first << " Number: " << i->second << "\n";
	}
}

/** Deletes an entry from Call Screening table. 
 *  The actual argument is the 'name' of the
 *  screened party. If no such entry is found,
 *  it returns true.
 */
       
bool CSRecord::deleteEntry(string s)
{
	// create an iterator and find the entry
	itr i; 
    i = cScrTable.begin();	
    
    // if the entry is found, delete it and
    // return false
    if(i != cScrTable.end()){
    	cScrTable.erase(i);
    	return false;
   	}
   	
    // the entry is not in the map	
    return true;	          	
}

/** Finds an entry in the Call Screening Table
 *  The actual argument is the 'name' of the
 *  screened party. If no such entry is found,
 *  it returns true.
 */

bool CSRecord::findEntry(string key)
{
	// create an iterator and find the entry
	itr i; 
    i = cScrTable.begin();
	
	// if the entry is found, return false
	if(i != cScrTable.end()){
    	return false;
   	}
   
    // the entry is not in the map  	
    return true;	          	
}


bool CSRecord::populateRecord(KeyType key, DBConnection* dbcon) 
{ 
    setKey(key);
   
    cout << "Called Populate Record: key=" << key << " in CS Record\n\n";
                      
    return false;
}
 
bool CSRecord::amendRecord(DBConnection* dbconn)
{
    cout << "Called Amend Record in CS Record\n\n";

    // Would do a database AMEND here

    return false;
}

bool CSRecord::deleteRecord(DBConnection* dbconn)
{
    cout << "Called Delete Record in CS Record\n";

    // Would do a database DELETE here

    return false;
}

bool CSRecord::insertRecord(DBConnection* dbconn)
{
    cout << "Called Insert Record in CS Record\n";

    // Would do a database INSERT here

    return false;
}

KeyList CSRecord::getAllKeys(DBConnection* dbconn)
{ 
  KeyList l; 
  cout << "Called getAllKeys in CS Record\n";

  // Would do a database SELECT to get all relavent keys and 
  // return them in key list

  l.push_back("1");

  return l;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -