📄 refl_00.cc
字号:
// file: $isip/class/algo/Reflection/refl_00.cc// version: $Id: refl_00.cc,v 1.7 2002/01/12 05:51:08 gao Exp $//// isip include files//#include "Reflection.h"//------------------------------------------------------------------------//// required public methods////-----------------------------------------------------------------------// method: assign//// arguments:// const Reflection& arg: (input) object to be assigned//// return: a boolean value indicating status//// this method assign the input object to the current object//boolean Reflection::assign(const Reflection& arg_a) { // assign the values // order_d = arg_a.order_d; algorithm_d = arg_a.algorithm_d; implementation_d = arg_a.implementation_d; dyn_range_d = arg_a.dyn_range_d; // copy the base class // return AlgorithmBase::assign(arg_a); }// method: eq//// arguments:// const Reflection& arg: (input) object to be assigned//// return: a boolean value indicating status//// this method checks whether the current object is identical to the// input object//boolean Reflection::eq(const Reflection& arg_a) const { // check the class data // if (order_d != arg_a.order_d) { return false; } if (algorithm_d != arg_a.algorithm_d) { return false; } if (implementation_d != arg_a.implementation_d) { return false; } if (dyn_range_d != arg_a.dyn_range_d) { return false; } // exit gracefully by checking the base class // return AlgorithmBase::eq(arg_a);}// method: clear//// arguments:// Integral::CMODE ctype: (input) clear mode//// return: a boolean value indicating status//// this method resets the data members to the default values//boolean Reflection::clear(Integral::CMODE ctype_a) { // clean up memory and reset // order_d = DEF_ORDER; algorithm_d = DEF_ALGORITHM; implementation_d = DEF_IMPLEMENTATION; dyn_range_d = DEF_DYN_RANGE; // call the base clear method // return AlgorithmBase::clear(ctype_a);}//---------------------------------------------------------------------------//// class-specific public methods:// public methods required by the AlgorithmBase interface contract////---------------------------------------------------------------------------// method: assign//// arguments:// const AlgorithmBase& arg: (input) object to be assigned//// return: a boolean value indicating status//// this method assigns the input algorithm object to the current// Reflection object//boolean Reflection::assign(const AlgorithmBase& arg_a) { // case: input is an Reflection object // if (typeid(arg_a) == typeid(Reflection)) { return assign((Reflection&)arg_a); } // case: other // if the input algorithm object is not a Reflection object, return // an error // else { return Error::handle(name(), L"assign", Error::ARG, __FILE__, __LINE__); }}// method: eq//// arguments:// const AlgorithmBase& arg: (input) object to be compared//// return: a boolean value indicating status//// this method checks whether the current Reflection object is identical// to the input algorithm object//boolean Reflection::eq(const AlgorithmBase& arg_a) const { // case: input is an Reflection object // if (typeid(arg_a) == typeid(Reflection)) { return eq((Reflection&)arg_a); } // case: other // if the input algorithm object is not a Reflection object, return // an error // else { return Error::handle(name(), L"eq", Error::ARG, __FILE__, __LINE__); }}//-----------------------------------------------------------------------------//// we define non-integral constants in the default constructor// //-----------------------------------------------------------------------------// constants: class name//const String Reflection::CLASS_NAME(L"Reflection");// constants: i/o related constants//const String Reflection::DEF_PARAM(L"");const String Reflection::PARAM_ALGORITHM(L"algorithm");const String Reflection::PARAM_IMPLEMENTATION(L"implementation");const String Reflection::PARAM_ORDER(L"order");const String Reflection::PARAM_DYN_RANGE(L"dynamic_range");// constants: NameMap(s) for the enumerated values//const NameMap Reflection::ALGO_MAP(L"AUTOCORRELATION, COVARIANCE, LATTICE, PREDICTION, LOG_AREA_RATIO");const NameMap Reflection::IMPL_MAP(L"DURBIN, LEROUX_GUEGUEN, CHOLESKY, BURG, STEP_UP, KELLY_LOCHBAUM");// static instantiations: memory manager//MemoryManager Reflection::mgr_d(sizeof(Reflection), Reflection::name());
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -