// file: $isip/class/algo/CoefficientLabel/clab_00.cc // version: $Id: clab_00.cc 8251 2002-06-29 18:02:58Z picone $ // // isip include files // #include "CoefficientLabel.h" #include //--------------------------------------------------------------------------- // // class-specific public methods: // AlgorithmBase interface contract methods // //--------------------------------------------------------------------------- // method: assign // // arguments: // const CoefficientLabel& arg: (input) object to assign // // return: a bool8 value indicating status // // this method assigns input object to the current object // bool8 CoefficientLabel::assign(const CoefficientLabel& arg_a) { // set all the data // algorithm_d = arg_a.algorithm_d; implementation_d = arg_a.implementation_d; type_d = arg_a.type_d; coef_type_d = arg_a.coef_type_d; variable_d.assign(arg_a.variable_d); // call the base assign method // return AlgorithmBase::assign(arg_a); } // method: clear // // arguments: // Integral::CMODE ctype: (input) clear mode // // return: a bool8 value indicating status // // this method resets the data members to the default values // bool8 CoefficientLabel::clear(Integral::CMODE ctype_a) { // for retain mode, we do nothing // if (ctype_a != Integral::RETAIN) { type_d = DEF_TYPE; algorithm_d = DEF_ALGORITHM; implementation_d = DEF_IMPLEMENTATION; coef_type_d = DEF_COEF_TYPE; // clear the variable name // variable_d.clear(ctype_a); } // call the base clear method // return AlgorithmBase::clear(ctype_a); } // method: assign // // arguments: // const AlgorithmBase& arg: (input) object to assign // // return: a bool8 value indicating status // // this method assigns input object to the current object // bool8 CoefficientLabel::assign(const AlgorithmBase& arg_a) { if (typeid(arg_a) == typeid(CoefficientLabel)) { return assign((CoefficientLabel&)arg_a); } else { return Error::handle(name(), L"assign", Error::ARG, __FILE__, __LINE__); } // exit gracefully // return true; } // method: eq // // arguments: // const AlgorithmBase& arg: (input) object to assign // // return: a bool8 value indicating status // // this method checks whether two cepstrum objects are equal or not // bool8 CoefficientLabel::eq(const AlgorithmBase& arg_a) const { if (typeid(arg_a) == typeid(CoefficientLabel)) { return eq((CoefficientLabel&)arg_a); } else { return Error::handle(name(), L"eq", Error::ARG, __FILE__, __LINE__); } // exit gracefully // return true; } //--------------------------------------------------------------------------- // // we define non-integral constants in the default constructor // //--------------------------------------------------------------------------- // constants: class name // const String CoefficientLabel::CLASS_NAME(L"CoefficientLabel"); // constants: i/o related constants // const String CoefficientLabel::DEF_PARAM(L""); const String CoefficientLabel::PARAM_ALGORITHM(L"algorithm"); const String CoefficientLabel::PARAM_IMPLEMENTATION(L"implementation"); const String CoefficientLabel::PARAM_VARIABLE(L"variable"); const String CoefficientLabel::PARAM_TYPE(L"type"); const String CoefficientLabel::PARAM_COEF_TYPE(L"coef_type"); // constants: NameMap(s) for the enumerated values // const NameMap CoefficientLabel::ALGO_MAP(L"DATA"); const NameMap CoefficientLabel::IMPL_MAP(L"COPY"); const NameMap CoefficientLabel::TYPE_MAP(L"INPUT, OUTPUT, INTERNAL"); // static instantiations: memory manager // MemoryManager CoefficientLabel::mgr_d(sizeof(CoefficientLabel), CoefficientLabel::name());