Blender V2.61 - r43446

ConstExpr.h

Go to the documentation of this file.
00001 /*
00002  * ConstExpr.h: interface for the CConstExpr 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 #ifndef __CONSTEXPR_H__
00020 #define __CONSTEXPR_H__
00021 
00022 #include "Expression.h"
00023 #include "Value.h"  // Added by ClassView
00024 
00025 class CConstExpr : public CExpression  
00026 {
00027     //PLUGIN_DECLARE_SERIAL_EXPRESSION (CConstExpr,CExpression)
00028 public:
00029     virtual bool MergeExpression(CExpression* otherexpr);
00030     
00031     void BroadcastOperators(VALUE_OPERATOR op);
00032 
00033     virtual unsigned char GetExpressionID();
00034     CExpression*    CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks);
00035     //bool IsInside(float x,float y,float z,bool bBorderInclude=true);
00036     bool NeedsRecalculated();
00037     void ClearModified();
00038     virtual double GetNumber();
00039     virtual CValue* Calculate();
00040     CConstExpr(CValue* constval);
00041     CConstExpr();
00042     virtual ~CConstExpr();
00043             
00044 
00045 private:
00046     CValue* m_value;
00047 
00048 
00049 #ifdef WITH_CXX_GUARDEDALLOC
00050 public:
00051     void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CConstExpr"); }
00052     void operator delete( void *mem ) { MEM_freeN(mem); }
00053 #endif
00054 };
00055 
00056 #endif // !defined(AFX_CONSTEXPR_H__061ECFC3_BE87_11D1_A51C_00A02472FC58__INCLUDED_)
00057