Blender V2.61 - r43446

IfExpr.h

Go to the documentation of this file.
00001 /*
00002  * IfExpr.h: interface for the CIfExpr class.
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 
00019 #if !defined(AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_)
00020 #define AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_
00021 
00022 #if defined(_MSC_VER) && _MSC_VER >= 1000
00023 #pragma once
00024 #endif // _MSC_VER >= 1000
00025 
00026 #include "Expression.h"
00027 
00028 class CIfExpr : public CExpression  
00029 {
00030     //PLUGIN_DECLARE_SERIAL_EXPRESSION (CIfExpr,CExpression)
00031 
00032 private:
00033     CExpression *m_guard, *m_e1, *m_e2;
00034 
00035 public:
00036     virtual bool MergeExpression(CExpression* otherexpr);
00037     CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2);
00038     CIfExpr();
00039     
00040     virtual unsigned char GetExpressionID();
00041     virtual ~CIfExpr();
00042     virtual CValue* Calculate();
00043     
00044     virtual bool        IsInside(float x,float y,float z,bool bBorderInclude=true);
00045     virtual bool        NeedsRecalculated();
00046 
00047 
00048     virtual CExpression*    CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks);
00049     virtual void            ClearModified();
00050     virtual void            BroadcastOperators(VALUE_OPERATOR op);
00051 
00052 
00053 #ifdef WITH_CXX_GUARDEDALLOC
00054 public:
00055     void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CIfExpr"); }
00056     void operator delete( void *mem ) { MEM_freeN(mem); }
00057 #endif
00058 };
00059 
00060 #endif // !defined(AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_)
00061