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

📄 dprecord.cxx

📁 vovida的软交换
💻 CXX
字号:
#include "DPRecord.hxx"
#include <iostream>

/*  This implements 'Dial Plan' subclass of the
 *  'Record' superclass.
 *
 *  DPRecord.cxx                 version 1.0 -- 19 Mar 2003
 *                               Suha Cubukcuoglu         
 */
 
DPRecord::DPRecord()
{
	setRecordType(DP_RECORD);
}

DPRecord::~DPRecord() {}

void DPRecord::displayRecord()
{
	cout << "Displaying Dial Plan Record:\n";
    cout << "--------------------------"      <<"\n";
    cout << "Dial Plan : " << getName()       <<"\n";
    
    cout << "PRIORITY    " << "KEY        " << "CONTACT    ";
    cout << "********    " << "***        " << "*******    ";
    cout << "\n\n"; 
    
    dpitr i;
    i = dialPlan.begin();
    
    for (; i != dialPlan.end(); i++){
    	cout << i->first           <<"          ";      
        cout << i->second.key      <<"          ";          
    	cout << i->second.contact  <<"\n";
   	}
   	
}

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

    // Would do a database AMEND here

    return false;
}

bool DPRecord::deleteRecord(DBConnection* dbconn)
{
    cout << "Called Delete Record in Dial Plan Record\n";

    // Would do a database DELETE here

    return false;
}

bool DPRecord::insertRecord(DBConnection* dbconn)
{
    cout << "Called Insert Record in Dial Plan Record\n";

    // Would do a database INSERT here

    return false;
}

KeyList DPRecord::getAllKeys(DBConnection* dbconn)
{ 
  KeyList l; 
  cout << "Called getAllKeys in Dial Plan 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 + -