📄 phone.h
字号:
// file: phone.h//// this is the header for the phone class//// make sure definitions are only made once//#ifndef __ISIP_PHONE#define __ISIP_PHONE// isip include files//#ifndef __ISIP_INTEGRAL#include <integral.h>#endif// forward class definitions//#ifndef __ISIP_MODEL#include <model.h>#endif// Phone: a class that contains a phone name and its model data//class Phone { //--------------------------------------------------------------------------- // // protected data // //---------------------------------------------------------------------------protected: // the name of the phone // char_1* name_d; // the indices of the constituent phones // int_4 num_phones_d; int_4* phones_d; // parameters related to the phone model // Model* model_d; // flag to indicate if this is active // logical_1 active_d; //--------------------------------------------------------------------------- // // public methods // //---------------------------------------------------------------------------public: // required methods // char_1* name_cc(); volatile void error_handler_cc(char_1* method_name, char_1* message); logical_1 debug_cc(FILE* fp, char_1* message); int_4 size_cc(); // destructors/constructors // ~Phone(); Phone(); Phone(char_1* name, int_4 nph, int_4* phones, Model* model); Phone(const Phone &phone); // set methods // logical_1 set_name_cc(char_1* name); logical_1 set_model_cc(Model* model) { model_d = model; return ISIP_TRUE; } logical_1 set_active_cc(logical_1 val) { active_d = val; return ISIP_TRUE; } // get methods // char_1* get_name_cc() { return name_d; } Model* get_model_cc() { return model_d; } logical_1 get_active_cc() { return active_d; } // phone methods // int_4 get_num_phones_cc() { return num_phones_d; } int_4 get_phone_cc(int_4 ind) { return phones_d[ind]; } logical_1 set_phones_cc(int_4 nph, int_4* phones); //--------------------------------------------------------------------------- // // private methods // //---------------------------------------------------------------------------private:};// end of file// #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -