2 * Operator2Expr.h: interface for the COperator2Expr class.
3 * Copyright (c) 1996-2000 Erwin Coumans <coockie@acm.org>
5 * Permission to use, copy, modify, distribute and sell this software
6 * and its documentation for any purpose is hereby granted without fee,
7 * provided that the above copyright notice appear in all copies and
8 * that both that copyright notice and this permission notice appear
9 * in supporting documentation. Erwin Coumans makes no
10 * representations about the suitability of this software for any
11 * purpose. It is provided "as is" without express or implied warranty.
15 /** \file Operator2Expr.h
16 * \ingroup expressions
19 #if !defined _OPERATOR2EXPR_H
20 #define _OPERATOR2EXPR_H
23 #include "Expression.h"
24 #include "Value.h" // Added by ClassView
26 class COperator2Expr : public CExpression
28 //PLUGIN_DECLARE_SERIAL_EXPRESSION (COperator2Expr,CExpression)
31 virtual bool MergeExpression(CExpression* otherexpr);
32 virtual unsigned char GetExpressionID() { return COPERATOR2EXPRESSIONID;};
33 virtual void BroadcastOperators(VALUE_OPERATOR op);
34 CExpression* CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks);
35 //virtual bool IsInside(float x,float y,float z,bool bBorderInclude=true);
36 //virtual bool IsLeftInside(float x,float y,float z,bool bBorderInclude);
37 //virtual bool IsRightInside(float x,float y,float z,bool bBorderInclude);
38 bool NeedsRecalculated();
39 void ClearModified() {
41 m_lhs->ClearModified();
43 m_rhs->ClearModified();
45 virtual CValue* Calculate();
46 COperator2Expr(VALUE_OPERATOR op, CExpression *lhs, CExpression *rhs);
48 virtual ~COperator2Expr();
54 CValue* m_cached_calculate; // cached result
60 #ifdef WITH_CXX_GUARDEDALLOC
62 void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:COperator2Expr"); }
63 void operator delete( void *mem ) { MEM_freeN(mem); }
67 #endif // !defined _OPERATOR2EXPR_H