00001 // IfExpr.h: interface for the CIfExpr class. 00002 /* 00003 * Copyright (c) 1996-2000 Erwin Coumans <[email protected]> 00004 * 00005 * Permission to use, copy, modify, distribute and sell this software 00006 * and its documentation for any purpose is hereby granted without fee, 00007 * provided that the above copyright notice appear in all copies and 00008 * that both that copyright notice and this permission notice appear 00009 * in supporting documentation. Erwin Coumans makes no 00010 * representations about the suitability of this software for any 00011 * purpose. It is provided "as is" without express or implied warranty. 00012 * 00013 */ 00014 #if !defined(AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_) 00015 #define AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_ 00016 00017 #if _MSC_VER >= 1000 00018 #pragma once 00019 #endif // _MSC_VER >= 1000 00020 00021 #include "Expression.h" 00022 00023 class CIfExpr : public CExpression 00024 { 00025 //PLUGIN_DECLARE_SERIAL_EXPRESSION (CIfExpr,CExpression) 00026 00027 private: 00028 CExpression *m_guard, *m_e1, *m_e2; 00029 public: 00030 virtual bool MergeExpression(CExpression* otherexpr); 00031 CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2); 00032 CIfExpr() {}; 00033 00034 virtual unsigned char GetExpressionID() { return CIFEXPRESSIONID;}; 00035 virtual ~CIfExpr(); // virtual 00036 virtual CValue* Calculate(); // virtual 00037 00038 virtual bool IsInside(float x,float y,float z,bool bBorderInclude=true) 00039 { 00040 assertd(false); // not implemented yet 00041 return false; 00042 }; 00043 virtual bool NeedsRecalculated() 00044 { 00045 // assertd(false); // not implemented yet 00046 return (m_guard->NeedsRecalculated() || 00047 m_e1->NeedsRecalculated() || 00048 m_e2->NeedsRecalculated()); 00049 }; // another pure one 00050 virtual CExpression * CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks) 00051 { 00052 assertd(false); // not implemented yet 00053 return NULL; 00054 }; // another pure one 00055 virtual void ClearModified() 00056 { 00057 assertd(false); // not implemented yet 00058 00059 }; // another pure one 00060 virtual void BroadcastOperators(VALUE_OPERATOR op) { 00061 assertd(false); // not implemented yet 00062 }; 00063 }; 00064 00065 #endif // !defined(AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_)