dpentryrecord.cxx

来自「vovida的软交换」· CXX 代码 · 共 75 行

CXX
75
字号
#include "DPEntryRecord.hxx"
#include <iostream>

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

DPEntryRecord::~DPEntryRecord() {}

void DPEntryRecord::displayRecord()
{
	cout << "Displaying DPEntry Record:\n";
    cout << "--------------------------"      <<"\n";
    cout << "Dial Plan : " << getDP()         <<"\n";
    cout << "Key       : " << getKey()		  <<"\n";
    cout << "Contact   : " << getContact()    <<"\n";
}

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

    // Would do a database AMEND here

    return false;
}

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

    // Would do a database DELETE here

    return false;
}

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

    // Would do a database INSERT here

    return false;
}

KeyList DPEntryRecord::getAllKeys(DBConnection* dbconn)
{ 
  KeyList l; 
  cout << "Called getAllKeys in Dial Plan Entry 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 + =
减小字号Ctrl + -
显示快捷键?