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

📄 dprecord.hxx

📁 vovida的软交换
💻 HXX
字号:
#ifndef DPRECORD_HXX
#define DPRECORD_HXX

#include "Record.hxx"
#include "DPEntryRecord.hxx"

/** This class derives from 'Record' superclass to implement
 *  'Dial Plan' Record.
 * 
 *  DPRecord.hxx              version 1.0 -- 19 Mar 2003
 *                            Suha Cubukcuoglu
 */
 

/** This is the hash map type that contains Dial Plan
 *  entries. Each entry is a pair of 'priority'
 *  and dpEntry structure. 
 */  
typedef map <int, DPEntryRecord::dpEntry> DPTable;

/** Iterator type for the hash map */
typedef DPTable::iterator  dpitr;

/** Defines the type a value stored in the
 *  hash map.
 */
typedef DPTable::value_type  dtype_map_pair; 
 
class DPRecord : public Record
{
	public:
		/** Constructor */
		DPRecord();
		/** Destructor */
		~DPRecord();
		
		/**
          * 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();
         
         /** accessor to the 'name' of this Dial Plan */
         string getName() { return name; };                           
                                                                                          
     private:
         
         /** declare a hash map */ 
     	 DPTable dialPlan;
       
         /** unique name for this Dial Plan, e.g. nPlusOne */
         string name;      
};

#endif /** DPRECORD_HXX */

⌨️ 快捷键说明

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