- #property strict
- #include <Arrays\List.mqh>
- #include "MembershipFunction.mqh"
- #include "Helper.mqh"
-
- class FuzzyTerm : public NamedValueImpl
- {
- private:
- IMembershipFunction *m_mf; // The membership function of the term
- public:
- FuzzyTerm(const string name,IMembershipFunction *mf)
- {
- NamedValueImpl::Name(name);
- m_mf=mf;
- }
- ~FuzzyTerm()
- {
- if(CheckPointer(m_mf)==POINTER_DYNAMIC)
- {
- delete m_mf;
- }
- }
- virtual bool IsTypeOf(EnType type)
- {
- return(type==TYPE_CLASS_FuzzyTerm);
- }
- IMembershipFunction *MembershipFunction()
- {
- return (m_mf);
- }
- };
复制代码
|