Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Operator2Expr.h

Go to the documentation of this file.
00001 // Operator2Expr.h: interface for the COperator2Expr class.
00002 /*
00003  * Copyright (c) 1996-2000 Erwin Coumans <coockie@acm.org>

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 
00015 #if !defined _OPERATOR2EXPR_H
00016 #define _OPERATOR2EXPR_H
00017 
00018 
00019 #include "Expression.h"
00020 #include "Value.h"      // Added by ClassView
00021 
00022 
00023 class COperator2Expr : public CExpression  
00024 {
00025         //PLUGIN_DECLARE_SERIAL_EXPRESSION (COperator2Expr,CExpression)
00026 
00027 public:
00028         virtual bool MergeExpression(CExpression* otherexpr);
00029         virtual unsigned char GetExpressionID() { return COPERATOR2EXPRESSIONID;};
00030         virtual void BroadcastOperators(VALUE_OPERATOR op);
00031         CExpression* CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks);
00032         //virtual bool IsInside(float x,float y,float z,bool bBorderInclude=true);
00033         //virtual bool IsLeftInside(float x,float y,float z,bool bBorderInclude);
00034         //virtual bool IsRightInside(float x,float y,float z,bool bBorderInclude);
00035         bool NeedsRecalculated();
00036         void    ClearModified() { 
00037                 if (m_lhs)
00038                         m_lhs->ClearModified();
00039                 if (m_rhs)
00040                         m_rhs->ClearModified();
00041         }
00042         virtual CValue* Calculate();
00043         COperator2Expr(VALUE_OPERATOR op, CExpression *lhs, CExpression *rhs);
00044         COperator2Expr();
00045         virtual ~COperator2Expr();
00046 
00047         
00048 protected:
00049         CExpression * m_rhs;
00050         CExpression * m_lhs;
00051         CValue* m_cached_calculate; // cached result
00052         
00053 private:
00054         VALUE_OPERATOR m_op;
00055         
00056 };
00057 
00058 #endif // !defined _OPERATOR2EXPR_H

Generated at Thu Feb 1 13:03:08 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000