Blender  V2.59
ConstExpr.h
Go to the documentation of this file.
00001 /*
00002  * ConstExpr.h: interface for the CConstExpr class.
00003  * $Id: ConstExpr.h 35063 2011-02-22 10:33:14Z jesterking $
00004  * Copyright (c) 1996-2000 Erwin Coumans <coockie@acm.org>
00005  *
00006  * Permission to use, copy, modify, distribute and sell this software
00007  * and its documentation for any purpose is hereby granted without fee,
00008  * provided that the above copyright notice appear in all copies and
00009  * that both that copyright notice and this permission notice appear
00010  * in supporting documentation.  Erwin Coumans makes no
00011  * representations about the suitability of this software for any
00012  * purpose.  It is provided "as is" without express or implied warranty.
00013  *
00014  */
00015 
00020 #ifndef __CONSTEXPR_H__
00021 #define __CONSTEXPR_H__
00022 
00023 #include "Expression.h"
00024 #include "Value.h"      // Added by ClassView
00025 
00026 class CConstExpr : public CExpression  
00027 {
00028         //PLUGIN_DECLARE_SERIAL_EXPRESSION (CConstExpr,CExpression)
00029 public:
00030         virtual bool MergeExpression(CExpression* otherexpr);
00031         
00032         void BroadcastOperators(VALUE_OPERATOR op);
00033 
00034         virtual unsigned char GetExpressionID();
00035         CExpression*    CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks);
00036         //bool IsInside(float x,float y,float z,bool bBorderInclude=true);
00037         bool NeedsRecalculated();
00038         void ClearModified();
00039         virtual double GetNumber();
00040         virtual CValue* Calculate();
00041         CConstExpr(CValue* constval);
00042         CConstExpr();
00043         virtual ~CConstExpr();
00044                         
00045 
00046 private:
00047         CValue* m_value;
00048 
00049 
00050 #ifdef WITH_CXX_GUARDEDALLOC
00051 public:
00052         void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CConstExpr"); }
00053         void operator delete( void *mem ) { MEM_freeN(mem); }
00054 #endif
00055 };
00056 
00057 #endif // !defined(AFX_CONSTEXPR_H__061ECFC3_BE87_11D1_A51C_00A02472FC58__INCLUDED_)
00058