Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-06-17 18:01:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-17 18:03:10 +0300
commit4be752a93cf37700668c604296f37ea08248f13b (patch)
tree0f838c87eaa6bf289b76f232e6b1571a28a55cba /source/gameengine/Expressions
parent5513da65b24a3ce77b1709acea841475115f3a7a (diff)
Cleanup: trailing space in source/gameengine/
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r--source/gameengine/Expressions/EXP_BoolValue.h6
-rw-r--r--source/gameengine/Expressions/EXP_ConstExpr.h6
-rw-r--r--source/gameengine/Expressions/EXP_EmptyValue.h2
-rw-r--r--source/gameengine/Expressions/EXP_ErrorValue.h2
-rw-r--r--source/gameengine/Expressions/EXP_Expression.h22
-rw-r--r--source/gameengine/Expressions/EXP_FloatValue.h2
-rw-r--r--source/gameengine/Expressions/EXP_HashedPtr.h4
-rw-r--r--source/gameengine/Expressions/EXP_IfExpr.h6
-rw-r--r--source/gameengine/Expressions/EXP_InputParser.h14
-rw-r--r--source/gameengine/Expressions/EXP_IntValue.h8
-rw-r--r--source/gameengine/Expressions/EXP_ListValue.h6
-rw-r--r--source/gameengine/Expressions/EXP_ListWrapper.h2
-rw-r--r--source/gameengine/Expressions/EXP_Operator1Expr.h8
-rw-r--r--source/gameengine/Expressions/EXP_Operator2Expr.h8
-rw-r--r--source/gameengine/Expressions/EXP_PyObjectPlus.h24
-rw-r--r--source/gameengine/Expressions/EXP_StringValue.h6
-rw-r--r--source/gameengine/Expressions/EXP_Value.h58
-rw-r--r--source/gameengine/Expressions/EXP_VectorValue.h16
-rw-r--r--source/gameengine/Expressions/EXP_VoidValue.h8
-rw-r--r--source/gameengine/Expressions/intern/BoolValue.cpp4
-rw-r--r--source/gameengine/Expressions/intern/ConstExpr.cpp4
-rw-r--r--source/gameengine/Expressions/intern/EmptyValue.cpp6
-rw-r--r--source/gameengine/Expressions/intern/ErrorValue.cpp4
-rw-r--r--source/gameengine/Expressions/intern/Expression.cpp6
-rw-r--r--source/gameengine/Expressions/intern/FloatValue.cpp10
-rw-r--r--source/gameengine/Expressions/intern/IdentifierExpr.cpp2
-rw-r--r--source/gameengine/Expressions/intern/IfExpr.cpp4
-rw-r--r--source/gameengine/Expressions/intern/InputParser.cpp38
-rw-r--r--source/gameengine/Expressions/intern/IntValue.cpp16
-rw-r--r--source/gameengine/Expressions/intern/ListValue.cpp56
-rw-r--r--source/gameengine/Expressions/intern/Operator1Expr.cpp12
-rw-r--r--source/gameengine/Expressions/intern/Operator2Expr.cpp40
-rw-r--r--source/gameengine/Expressions/intern/PyObjectPlus.cpp84
-rw-r--r--source/gameengine/Expressions/intern/StringValue.cpp12
-rw-r--r--source/gameengine/Expressions/intern/Value.cpp28
-rw-r--r--source/gameengine/Expressions/intern/VectorValue.cpp42
36 files changed, 288 insertions, 288 deletions
diff --git a/source/gameengine/Expressions/EXP_BoolValue.h b/source/gameengine/Expressions/EXP_BoolValue.h
index 98ba1d75e52..89c724e87ee 100644
--- a/source/gameengine/Expressions/EXP_BoolValue.h
+++ b/source/gameengine/Expressions/EXP_BoolValue.h
@@ -26,7 +26,7 @@
* Is used by parser when an expression tree is build containing booleans.
*/
-class CBoolValue : public CPropValue
+class CBoolValue : public CPropValue
{
//PLUGIN_DECLARE_SERIAL(CBoolValue,CValue)
@@ -44,10 +44,10 @@ public:
virtual int GetValueType();
bool GetBool();
virtual void SetValue(CValue* newval);
-
+
virtual CValue* Calc(VALUE_OPERATOR op, CValue *val);
virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
-
+
void Configure(CValue* menuvalue);
virtual CValue* GetReplica();
#ifdef WITH_PYTHON
diff --git a/source/gameengine/Expressions/EXP_ConstExpr.h b/source/gameengine/Expressions/EXP_ConstExpr.h
index b4456dacdf3..ddc7df14ff1 100644
--- a/source/gameengine/Expressions/EXP_ConstExpr.h
+++ b/source/gameengine/Expressions/EXP_ConstExpr.h
@@ -22,12 +22,12 @@
#include "EXP_Expression.h"
#include "EXP_Value.h" // Added by ClassView
-class CConstExpr : public CExpression
+class CConstExpr : public CExpression
{
//PLUGIN_DECLARE_SERIAL_EXPRESSION (CConstExpr,CExpression)
public:
virtual bool MergeExpression(CExpression* otherexpr);
-
+
void BroadcastOperators(VALUE_OPERATOR op);
virtual unsigned char GetExpressionID();
@@ -40,7 +40,7 @@ public:
CConstExpr(CValue* constval);
CConstExpr();
virtual ~CConstExpr();
-
+
private:
CValue* m_value;
diff --git a/source/gameengine/Expressions/EXP_EmptyValue.h b/source/gameengine/Expressions/EXP_EmptyValue.h
index d23addb9f9f..e3be9f0c2c4 100644
--- a/source/gameengine/Expressions/EXP_EmptyValue.h
+++ b/source/gameengine/Expressions/EXP_EmptyValue.h
@@ -23,7 +23,7 @@
class CListValue;
-class CEmptyValue : public CPropValue
+class CEmptyValue : public CPropValue
{
//PLUGIN_DECLARE_SERIAL (CEmptyValue,CValue)
public:
diff --git a/source/gameengine/Expressions/EXP_ErrorValue.h b/source/gameengine/Expressions/EXP_ErrorValue.h
index a6f91ca200a..aa2b1a68241 100644
--- a/source/gameengine/Expressions/EXP_ErrorValue.h
+++ b/source/gameengine/Expressions/EXP_ErrorValue.h
@@ -21,7 +21,7 @@
#include "EXP_Value.h"
-class CErrorValue : public CPropValue
+class CErrorValue : public CPropValue
{
public:
diff --git a/source/gameengine/Expressions/EXP_Expression.h b/source/gameengine/Expressions/EXP_Expression.h
index 66a6e9476ff..0ed8c9503b3 100644
--- a/source/gameengine/Expressions/EXP_Expression.h
+++ b/source/gameengine/Expressions/EXP_Expression.h
@@ -56,7 +56,7 @@ class CBrokenLinkInfo
CBrokenLinkInfo(CExpression** pmemexpr,CExpression* expr)
:m_pmemExpr(pmemexpr),
m_pExpr(expr)
- {
+ {
assertd(pmemexpr);
m_bRestored=false;
};
@@ -64,15 +64,15 @@ class CBrokenLinkInfo
virtual ~CBrokenLinkInfo();
void RestoreLink();
void BreakLink();
-
-
+
+
// members vars
private:
CExpression** m_pmemExpr;
CExpression* m_pExpr;
bool m_bRestored;
-
-
+
+
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GE:CBrokenLinkInfo")
#endif
@@ -85,7 +85,7 @@ class CBrokenLinkInfo
-class CExpression
+class CExpression
{
public:
enum {
@@ -104,7 +104,7 @@ public:
virtual bool MergeExpression(CExpression* otherexpr) = 0;
CExpression();
-
+
virtual CValue* Calculate() = 0; //pure virtual
virtual unsigned char GetExpressionID() = 0;
//virtual bool IsInside(float x,float y,float z,bool bBorderInclude=true) = 0; //pure virtual
@@ -120,21 +120,21 @@ public:
//gRefCountExpr++;
assertd(m_refcount < 255);
#endif
- m_refcount++;
+ m_refcount++;
return this;
};
- virtual CExpression* Release(CExpression* complicatedtrick=NULL) {
+ virtual CExpression* Release(CExpression* complicatedtrick=NULL) {
#ifdef DEBUG
//gRefCountExpr--;
#endif
- if (--m_refcount < 1)
+ if (--m_refcount < 1)
{
delete this;
} //else
// return this;
return complicatedtrick;
};
-
+
protected:
diff --git a/source/gameengine/Expressions/EXP_FloatValue.h b/source/gameengine/Expressions/EXP_FloatValue.h
index 3c16c57d16d..5ec22d0fcb4 100644
--- a/source/gameengine/Expressions/EXP_FloatValue.h
+++ b/source/gameengine/Expressions/EXP_FloatValue.h
@@ -21,7 +21,7 @@
#include "EXP_Value.h"
-class CFloatValue : public CPropValue
+class CFloatValue : public CPropValue
{
//PLUGIN_DECLARE_SERIAL (CFloatValue,CValue)
public:
diff --git a/source/gameengine/Expressions/EXP_HashedPtr.h b/source/gameengine/Expressions/EXP_HashedPtr.h
index 7c7c5f6e5ec..fbb6762c351 100644
--- a/source/gameengine/Expressions/EXP_HashedPtr.h
+++ b/source/gameengine/Expressions/EXP_HashedPtr.h
@@ -49,8 +49,8 @@ public:
{
return rhs.m_valptr == lhs.m_valptr;
}
-
-
+
+
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GE:CHashedPtr")
#endif
diff --git a/source/gameengine/Expressions/EXP_IfExpr.h b/source/gameengine/Expressions/EXP_IfExpr.h
index 43b4b8faf53..929f3a3ada9 100644
--- a/source/gameengine/Expressions/EXP_IfExpr.h
+++ b/source/gameengine/Expressions/EXP_IfExpr.h
@@ -21,7 +21,7 @@
#include "EXP_Expression.h"
-class CIfExpr : public CExpression
+class CIfExpr : public CExpression
{
//PLUGIN_DECLARE_SERIAL_EXPRESSION (CIfExpr,CExpression)
@@ -32,11 +32,11 @@ public:
virtual bool MergeExpression(CExpression* otherexpr);
CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2);
CIfExpr();
-
+
virtual unsigned char GetExpressionID();
virtual ~CIfExpr();
virtual CValue* Calculate();
-
+
virtual bool IsInside(float x,float y,float z,bool bBorderInclude=true);
virtual bool NeedsRecalculated();
diff --git a/source/gameengine/Expressions/EXP_InputParser.h b/source/gameengine/Expressions/EXP_InputParser.h
index 80471009a16..a59ca433024 100644
--- a/source/gameengine/Expressions/EXP_InputParser.h
+++ b/source/gameengine/Expressions/EXP_InputParser.h
@@ -75,21 +75,21 @@ private:
floattype,
stringtype
}; // all kinds of constants
-
+
int sym, // current symbol
opkind, // kind of operator, if symbol is an operator
constkind; // kind of operator, if symbol is a constant
-
+
char ch; // current character
int chcount; // index to character in input string
CExpression *errmsg; // contains a errormessage, if scanner error
-
+
STR_String text, // contains a copy of the original text
const_as_string; // string representation of the symbol, if symbol is a constant
bool boolvalue; // value of the boolean, if symbol is a constant of type boolean
CValue* m_identifierContext;// context in which identifiers are looked up
-
-
+
+
void ScanError(const char *str);
CExpression* Error(const char *str);
void NextCh();
@@ -107,8 +107,8 @@ private:
int Priority(int optor);
CExpression *Ex(int i);
CExpression *Expr();
-
-
+
+
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GE:CParser")
#endif
diff --git a/source/gameengine/Expressions/EXP_IntValue.h b/source/gameengine/Expressions/EXP_IntValue.h
index a1cd96a888e..8c66ba7c3bf 100644
--- a/source/gameengine/Expressions/EXP_IntValue.h
+++ b/source/gameengine/Expressions/EXP_IntValue.h
@@ -22,9 +22,9 @@
#include "EXP_Value.h"
-typedef long long cInt;
+typedef long long cInt;
-class CIntValue : public CPropValue
+class CIntValue : public CPropValue
{
//PLUGIN_DECLARE_SERIAL (CIntValue,CValue)
@@ -32,14 +32,14 @@ public:
virtual const STR_String& GetText();
virtual double GetNumber();
virtual int GetValueType();
-
+
cInt GetInt();
CIntValue();
CIntValue(cInt innie);
CIntValue(cInt innie,
const char *name,
AllocationTYPE alloctype=CValue::HEAPVALUE);
-
+
virtual CValue* Calc(VALUE_OPERATOR op,
CValue *val);
diff --git a/source/gameengine/Expressions/EXP_ListValue.h b/source/gameengine/Expressions/EXP_ListValue.h
index f5421066f62..d5c14be8c37 100644
--- a/source/gameengine/Expressions/EXP_ListValue.h
+++ b/source/gameengine/Expressions/EXP_ListValue.h
@@ -21,7 +21,7 @@
#include "EXP_Value.h"
-class CListValue : public CPropValue
+class CListValue : public CPropValue
{
Py_Header
//PLUGIN_DECLARE_SERIAL (CListValue,CValue)
@@ -48,7 +48,7 @@ public:
bool RemoveValue(CValue* val);
void SetReleaseOnDestruct(bool bReleaseContents);
bool SearchValue(CValue* val);
-
+
CValue* FindValue(const STR_String & name);
CValue* FindValue(const char *name);
@@ -81,7 +81,7 @@ public:
KX_PYMETHOD_VARARGS(CListValue,get);
KX_PYMETHOD_O(CListValue,from_id);
#endif
-
+
private:
std::vector<CValue*> m_pValueArray;
diff --git a/source/gameengine/Expressions/EXP_ListWrapper.h b/source/gameengine/Expressions/EXP_ListWrapper.h
index e4c97691acb..c0f149aa1af 100644
--- a/source/gameengine/Expressions/EXP_ListWrapper.h
+++ b/source/gameengine/Expressions/EXP_ListWrapper.h
@@ -31,7 +31,7 @@
#include "EXP_Value.h"
-class CListWrapper : public CValue
+class CListWrapper : public CValue
{
Py_Header
private:
diff --git a/source/gameengine/Expressions/EXP_Operator1Expr.h b/source/gameengine/Expressions/EXP_Operator1Expr.h
index 9a05ce9c0c4..e8b5e07a03d 100644
--- a/source/gameengine/Expressions/EXP_Operator1Expr.h
+++ b/source/gameengine/Expressions/EXP_Operator1Expr.h
@@ -21,7 +21,7 @@
#include "EXP_Expression.h"
-class COperator1Expr : public CExpression
+class COperator1Expr : public CExpression
{
//PLUGIN_DECLARE_SERIAL_EXPRESSION (COperator1Expr,CExpression)
@@ -43,9 +43,9 @@ public:
COperator1Expr(VALUE_OPERATOR op, CExpression *lhs);
COperator1Expr();
virtual ~COperator1Expr();
-
-
-
+
+
+
private:
VALUE_OPERATOR m_op;
CExpression * m_lhs;
diff --git a/source/gameengine/Expressions/EXP_Operator2Expr.h b/source/gameengine/Expressions/EXP_Operator2Expr.h
index cd7a492fde0..da01bfacb87 100644
--- a/source/gameengine/Expressions/EXP_Operator2Expr.h
+++ b/source/gameengine/Expressions/EXP_Operator2Expr.h
@@ -23,7 +23,7 @@
#include "EXP_Expression.h"
#include "EXP_Value.h" // Added by ClassView
-class COperator2Expr : public CExpression
+class COperator2Expr : public CExpression
{
//PLUGIN_DECLARE_SERIAL_EXPRESSION (COperator2Expr,CExpression)
@@ -36,7 +36,7 @@ public:
//virtual bool IsLeftInside(float x,float y,float z,bool bBorderInclude);
//virtual bool IsRightInside(float x,float y,float z,bool bBorderInclude);
bool NeedsRecalculated();
- void ClearModified() {
+ void ClearModified() {
if (m_lhs)
m_lhs->ClearModified();
if (m_rhs)
@@ -47,12 +47,12 @@ public:
COperator2Expr();
virtual ~COperator2Expr();
-
+
protected:
CExpression * m_rhs;
CExpression * m_lhs;
CValue* m_cached_calculate; // cached result
-
+
private:
VALUE_OPERATOR m_op;
diff --git a/source/gameengine/Expressions/EXP_PyObjectPlus.h b/source/gameengine/Expressions/EXP_PyObjectPlus.h
index 32dc79cf6eb..308fae6e6af 100644
--- a/source/gameengine/Expressions/EXP_PyObjectPlus.h
+++ b/source/gameengine/Expressions/EXP_PyObjectPlus.h
@@ -115,9 +115,9 @@ typedef struct PyObjectPlus_Proxy {
#define BGE_PROXY_FROM_REF_BORROW(_self) _bge_proxy_from_ref_borrow((void *)_self)
-// This must be the first line of each
+// This must be the first line of each
// PyC++ class
-// AttributesPtr correspond to attributes of proxy generic pointer
+// AttributesPtr correspond to attributes of proxy generic pointer
// each PyC++ class must be registered in KX_PythonInitTypes.cpp
#define __Py_Header \
public: \
@@ -362,9 +362,9 @@ typedef struct KX_PYATTRIBUTE_DEF {
const char *m_name; // name of the python attribute
KX_PYATTRIBUTE_TYPE m_type; // type of value
KX_PYATTRIBUTE_ACCESS m_access; // read/write access or read-only
- int m_imin; // minimum value in case of integer attributes
+ int m_imin; // minimum value in case of integer attributes
// (for string: minimum string length, for flag: mask value, for float: matrix row size)
- int m_imax; // maximum value in case of integer attributes
+ int m_imax; // maximum value in case of integer attributes
// (for string: maximum string length, for flag: 1 if flag is negative, float: vector/matrix col size)
float m_fmin; // minimum value in case of float attributes
float m_fmax; // maximum value in case of float attributes
@@ -500,7 +500,7 @@ typedef struct KX_PYATTRIBUTE_DEF {
#define KX_PYATTRIBUTE_STRING_RO(name, object, field) \
{ name, KX_PYATTRIBUTE_TYPE_STRING, KX_PYATTRIBUTE_RO, 0, 0, 0.f, 0.f, false, false, offsetof(object, field), 0, 1 , NULL, NULL, NULL, {NULL, NULL, NULL, NULL, &((object *)0)->field, NULL, NULL} }
-// only for char [] array
+// only for char [] array
#define KX_PYATTRIBUTE_CHAR_RW(name, object, field) \
{ name, KX_PYATTRIBUTE_TYPE_CHAR, KX_PYATTRIBUTE_RW, 0, 0, 0.f, 0.f, true, false, offsetof(object, field), sizeof(((object *)0)->field), 1, NULL, NULL, NULL, {NULL, NULL, NULL, NULL, NULL, NULL, ((object *)0)->field} }
#define KX_PYATTRIBUTE_CHAR_RW_CHECK(name, object, field, function) \
@@ -558,7 +558,7 @@ public: \
// By making SG_QList the ultimate parent for PyObjectPlus objects, it
// allows to put them in 2 different dynamic lists at the same time
// The use of these links is interesting because they free of memory allocation
-// but it's very important not to mess up with them. If you decide that
+// but it's very important not to mess up with them. If you decide that
// the SG_QList or SG_DList component is used for something for a certain class,
// they cannot can be used for anything else at a parent level!
// What these lists are and what they are used for must be carefully documented
@@ -569,12 +569,12 @@ public: \
class PyObjectPlus : public SG_QList
{ // The PyObjectPlus abstract class
Py_Header // Always start with Py_Header
-
+
public:
PyObjectPlus();
-
+
virtual ~PyObjectPlus(); // destructor
-
+
#ifdef WITH_PYTHON
PyObject *m_proxy; /* actually a PyObjectPlus_Proxy */
@@ -595,7 +595,7 @@ public:
static PyObject* py_get_attrdef(PyObject *self_py, const PyAttributeDef *attrdef);
static int py_set_attrdef(PyObject *self_py, PyObject *value, const PyAttributeDef *attrdef);
-
+
/* Kindof dumb, always returns True, the false case is checked for, before this function gets accessed */
static PyObject* pyattr_get_invalid(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
@@ -612,13 +612,13 @@ public:
static void SetDeprecationWarningFirst(WarnLink* wlink);
static void SetDeprecationWarningLinkLast(WarnLink* wlink);
static void NullDeprecationWarning();
-
+
/** enable/disable display of deprecation warnings */
static void SetDeprecationWarnings(bool ignoreDeprecationWarnings);
/** Shows a deprecation warning */
static void ShowDeprecationWarning_func(const char *method, const char *prop);
static void ClearDeprecationWarning();
-
+
#endif
void InvalidateProxy();
diff --git a/source/gameengine/Expressions/EXP_StringValue.h b/source/gameengine/Expressions/EXP_StringValue.h
index ca59ebf1f82..57c5de2206b 100644
--- a/source/gameengine/Expressions/EXP_StringValue.h
+++ b/source/gameengine/Expressions/EXP_StringValue.h
@@ -21,10 +21,10 @@
#include "EXP_Value.h"
-class CStringValue : public CPropValue
+class CStringValue : public CPropValue
{
-
+
//PLUGIN_DECLARE_SERIAL(CStringValue,CValue)
public:
/// Construction / destruction
@@ -37,7 +37,7 @@ public:
virtual const STR_String & GetText();
virtual double GetNumber();
virtual int GetValueType();
-
+
virtual CValue* Calc(VALUE_OPERATOR op, CValue *val);
virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
virtual void SetValue(CValue* newval) { m_strString = newval->GetText(); SetModified(true); }
diff --git a/source/gameengine/Expressions/EXP_Value.h b/source/gameengine/Expressions/EXP_Value.h
index 014fc59405f..dd0cee3dbb8 100644
--- a/source/gameengine/Expressions/EXP_Value.h
+++ b/source/gameengine/Expressions/EXP_Value.h
@@ -54,7 +54,7 @@ using namespace std;
#endif
enum VALUE_OPERATOR {
-
+
VALUE_MOD_OPERATOR, // %
VALUE_ADD_OPERATOR, // +
VALUE_SUB_OPERATOR, // -
@@ -94,14 +94,14 @@ enum VALUE_DATA_TYPE {
//extern int gRefCountValue; // debugonly variable to check if all CValue Refences are Dereferenced at programexit
#endif
-struct HashableInt
+struct HashableInt
{
HashableInt(int id) : mData(id) { }
unsigned long Hash() const { return 0;} ////}gHash(&mData, sizeof(int));}
-
+
bool operator==(HashableInt rhs) { return mData == rhs.mData; }
-
+
int mData;
};
@@ -137,7 +137,7 @@ struct ValueFlags {
unsigned short CustomFlag1 : 1;
unsigned short CustomFlag2 : 1;
-
+
};
/**
@@ -151,8 +151,8 @@ public:
virtual ~CAction() {
};
virtual void Execute() const =0;
-
-
+
+
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GE:CAction")
#endif
@@ -169,11 +169,11 @@ public:
*
* Together with CExpression, CValue and it's derived classes can be used to
* parse expressions into a parsetree with error detecting/correcting capabilities
- * also expandable by a CFactory pluginsystem
+ * also expandable by a CFactory pluginsystem
*
* Base class for all editor functionality, flexible object type that allows
* calculations and uses reference counting for memory management.
- *
+ *
* Features:
* - Reference Counting (AddRef() / Release())
* - Calculations (Calc() / CalcFinal())
@@ -182,10 +182,10 @@ public:
* - Property system (SetProperty() / GetProperty() / FindIdentifier())
* - Replication (GetReplica())
* - Flags (IsSelected() / IsModified() / SetSelected()...)
- *
+ *
* - Some small editor-specific things added
* - A helperclass CompressorArchive handles the serialization
- *
+ *
*/
class CValue : public PyObjectPlus
@@ -196,7 +196,7 @@ public:
STACKVALUE = 0,
HEAPVALUE = 1
};
-
+
enum DrawTYPE {
STARTFRAME = 0,
ENDFRAME = 1,
@@ -219,20 +219,20 @@ public:
}
virtual CValue *ConvertPythonToValue(PyObject *pyobj, const bool do_type_exception, const char *error_prefix);
-
+
static PyObject *pyattr_get_name(void *self, const KX_PYATTRIBUTE_DEF *attrdef);
-
+
virtual PyObject *ConvertKeysToPython( void );
#endif /* WITH_PYTHON */
-
-
+
+
// Expression Calculation
virtual CValue* Calc(VALUE_OPERATOR op, CValue *val) = 0;
virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val) = 0;
virtual void SetOwnerExpression(class CExpression* expr);
-
+
void Execute(const CAction& a)
{
@@ -241,8 +241,8 @@ public:
/// Reference Counting
int GetRefCount()
- {
- return m_refcount;
+ {
+ return m_refcount;
}
// Add a reference to this value
@@ -254,7 +254,7 @@ public:
#ifdef DEBUG
//gRefCountValue++;
#endif
- m_refcount++;
+ m_refcount++;
return this;
}
@@ -277,7 +277,7 @@ public:
{
// Reference count reached 0, delete ourselves and return 0
// MT_assert(m_refcount==0, "Reference count reached sub-zero, object released too much");
-
+
delete this;
return 0;
}
@@ -321,9 +321,9 @@ public:
virtual CValue* GetReplica() =0;
virtual void ProcessReplica();
//virtual CValue* Copy() = 0;
-
+
STR_String op2str(VALUE_OPERATOR op);
-
+
// setting / getting flags
inline void SetSelected(bool bSelected) { m_ValFlags.Selected = bSelected; }
virtual void SetModified(bool bModified) { m_ValFlags.Modified = bModified; }
@@ -331,7 +331,7 @@ public:
inline void SetReleaseRequested(bool bReleaseRequested) { m_ValFlags.ReleaseRequested=bReleaseRequested; }
inline void SetError(bool err) { m_ValFlags.Error=err; }
inline void SetVisible (bool vis) { m_ValFlags.Visible=vis; }
-
+
virtual bool IsModified() { return m_ValFlags.Modified; }
inline bool IsError() { return m_ValFlags.Error; }
virtual bool IsAffected() { return m_ValFlags.Affected || m_ValFlags.Modified; }
@@ -392,7 +392,7 @@ public: \
////////////////////////////////////////////////////////////////////////////////
// CPropValue is a CValue derived class, that implements the identification (String name)
-// SetName() / GetName(),
+// SetName() / GetName(),
// normal classes should derive from CPropValue, real lightweight classes straight from CValue
@@ -405,22 +405,22 @@ public:
{
}
-
+
virtual ~CPropValue()
{
}
-
+
virtual void SetName(const char *name) {
m_strNewName = name;
}
-
+
virtual STR_String& GetName() {
//STR_String namefromprop = GetPropertyText("Name");
//if (namefromprop.Length() > 0)
// return namefromprop;
return m_strNewName;
} // name of Value
-
+
protected:
STR_String m_strNewName; // Identification
diff --git a/source/gameengine/Expressions/EXP_VectorValue.h b/source/gameengine/Expressions/EXP_VectorValue.h
index d87d5097156..8eda8f3ac6b 100644
--- a/source/gameengine/Expressions/EXP_VectorValue.h
+++ b/source/gameengine/Expressions/EXP_VectorValue.h
@@ -26,7 +26,7 @@
#define KX_Z 2
-class CVectorValue : public CPropValue
+class CVectorValue : public CPropValue
{
//PLUGIN_DECLARE_SERIAL(CVectorValue,CValue)
@@ -38,14 +38,14 @@ public:
virtual double* GetVector3(bool bGetTransformedVec=false);
virtual double GetNumber();
virtual int GetValueType();
-
+
CValue* Calc(VALUE_OPERATOR op, CValue *val) {
return val->CalcFinal(VALUE_VECTOR_TYPE, op, this);
}
-
+
CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
-
-
+
+
CVectorValue(double vec[3], const char *name,AllocationTYPE alloctype=CValue::HEAPVALUE);
CVectorValue() {};
@@ -54,7 +54,7 @@ public:
virtual ~CVectorValue();
//virtual bool ExportT3D(File *txtfile,bool bNoName=false);
void AddConfigurationData(CValue* menuvalue);
-
+
virtual CValue* GetReplica();
@@ -70,14 +70,14 @@ public:
void SnapPosition(const double snapvec[])
{
-
+
if (snapvec[KX_X] >= 1)
SnapPoint(m_vec[KX_X],snapvec[KX_X]);
if (snapvec[KX_Y] >= 1)
SnapPoint(m_vec[KX_Y],snapvec[KX_Y]);
if (snapvec[KX_Z] >= 1)
SnapPoint(m_vec[KX_Z],snapvec[KX_Z]);
-
+
}
#endif
diff --git a/source/gameengine/Expressions/EXP_VoidValue.h b/source/gameengine/Expressions/EXP_VoidValue.h
index 8b2c29488d7..ba7a383e911 100644
--- a/source/gameengine/Expressions/EXP_VoidValue.h
+++ b/source/gameengine/Expressions/EXP_VoidValue.h
@@ -39,7 +39,7 @@
//
// Void value, used to transport *any* type of data
//
-class CVoidValue : public CPropValue
+class CVoidValue : public CPropValue
{
//PLUGIN_DECLARE_SERIAL (CVoidValue,CValue)
@@ -67,12 +67,12 @@ public:
/// Value replication
virtual CValue* GetReplica();
-
+
/// Data members
bool m_bDeleteOnDestruct;
void* m_pAnything;
-
-
+
+
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GE:CVoidValue")
#endif
diff --git a/source/gameengine/Expressions/intern/BoolValue.cpp b/source/gameengine/Expressions/intern/BoolValue.cpp
index 1523a9212ba..6d29a07aada 100644
--- a/source/gameengine/Expressions/intern/BoolValue.cpp
+++ b/source/gameengine/Expressions/intern/BoolValue.cpp
@@ -103,7 +103,7 @@ this object
*/
{
CValue *ret;
-
+
switch (dtype) {
case VALUE_EMPTY_TYPE:
case VALUE_BOOL_TYPE:
@@ -204,7 +204,7 @@ CValue* CBoolValue::GetReplica()
{
CBoolValue* replica = new CBoolValue(*this);
replica->ProcessReplica();
-
+
return replica;
}
diff --git a/source/gameengine/Expressions/intern/ConstExpr.cpp b/source/gameengine/Expressions/intern/ConstExpr.cpp
index 597427ecfe5..f7853d2dfac 100644
--- a/source/gameengine/Expressions/intern/ConstExpr.cpp
+++ b/source/gameengine/Expressions/intern/ConstExpr.cpp
@@ -30,7 +30,7 @@ CConstExpr::CConstExpr()
-CConstExpr::CConstExpr(CValue* constval)
+CConstExpr::CConstExpr(CValue* constval)
/*
pre:
effect: constructs a CConstExpr cointing the value constval
@@ -73,7 +73,7 @@ ret: a new object containing the value of the stored CValue
void CConstExpr::ClearModified()
-{
+{
if (m_value)
{
m_value->SetModified(false);
diff --git a/source/gameengine/Expressions/intern/EmptyValue.cpp b/source/gameengine/Expressions/intern/EmptyValue.cpp
index 9227626777d..5083b50668f 100644
--- a/source/gameengine/Expressions/intern/EmptyValue.cpp
+++ b/source/gameengine/Expressions/intern/EmptyValue.cpp
@@ -58,7 +58,7 @@ CValue *CEmptyValue::Calc(VALUE_OPERATOR op, CValue *val)
*/
{
return val->CalcFinal(VALUE_EMPTY_TYPE, op, this);
-
+
}
@@ -107,7 +107,7 @@ bool CEmptyValue::IsInside(CValue* testpoint,bool bBorderInclude)
double* CEmptyValue::GetVector3(bool bGetTransformedVec)
-{
+{
assertd(false); // don't get vector from me
return ZeroVector();
}
@@ -125,7 +125,7 @@ const STR_String & CEmptyValue::GetText()
CValue* CEmptyValue::GetReplica()
-{
+{
CEmptyValue* replica = new CEmptyValue(*this);
replica->ProcessReplica();
return replica;
diff --git a/source/gameengine/Expressions/intern/ErrorValue.cpp b/source/gameengine/Expressions/intern/ErrorValue.cpp
index c03ceb88073..502608a6dcf 100644
--- a/source/gameengine/Expressions/intern/ErrorValue.cpp
+++ b/source/gameengine/Expressions/intern/ErrorValue.cpp
@@ -82,7 +82,7 @@ ret: a new object containing the result of applying operator op to this
break;
}
}
-
+
return errorval;
}
@@ -122,7 +122,7 @@ const STR_String & CErrorValue::GetText()
CValue* CErrorValue::GetReplica()
-{
+{
// who would want a copy of an error ?
trace ("Error: ErrorValue::GetReplica() not implemented yet");
assertd(false);
diff --git a/source/gameengine/Expressions/intern/Expression.cpp b/source/gameengine/Expressions/intern/Expression.cpp
index 6a98a15aa12..4eab64ab249 100644
--- a/source/gameengine/Expressions/intern/Expression.cpp
+++ b/source/gameengine/Expressions/intern/Expression.cpp
@@ -50,21 +50,21 @@ CBrokenLinkInfo::~CBrokenLinkInfo()
void CBrokenLinkInfo::RestoreLink()
{
-
+
assertd(m_pExpr);
if (m_pExpr)
{
if (!m_bRestored) {
m_bRestored=true;
-
+
}
if (*m_pmemExpr)
{
(*m_pmemExpr)->Release();
}
*m_pmemExpr = m_pExpr;
-
+
// m_pExpr=NULL;
}
}
diff --git a/source/gameengine/Expressions/intern/FloatValue.cpp b/source/gameengine/Expressions/intern/FloatValue.cpp
index 0f86a429d81..814d3d3b908 100644
--- a/source/gameengine/Expressions/intern/FloatValue.cpp
+++ b/source/gameengine/Expressions/intern/FloatValue.cpp
@@ -55,7 +55,7 @@ pre:
effect: constructs a new CFloatValue containing value fl
*/
{
-
+
m_float = fl;
SetName(name);
if (alloctype==CValue::STACKVALUE)
@@ -119,7 +119,7 @@ ret: a new object containing the result of applying operator op to val and
*/
{
CValue *ret;
-
+
switch (dtype) {
case VALUE_INT_TYPE:
{
@@ -293,8 +293,8 @@ int CFloatValue::GetValueType()
void CFloatValue::SetValue(CValue* newval)
-{
- m_float = (float)newval->GetNumber();
+{
+ m_float = (float)newval->GetNumber();
SetModified(true);
}
@@ -312,7 +312,7 @@ const STR_String & CFloatValue::GetText()
CValue* CFloatValue::GetReplica()
-{
+{
CFloatValue* replica = new CFloatValue(*this);
replica->m_pstrRep = NULL; /* should be in CFloatValue::ProcessReplica() but its not defined, no matter */
replica->ProcessReplica();
diff --git a/source/gameengine/Expressions/intern/IdentifierExpr.cpp b/source/gameengine/Expressions/intern/IdentifierExpr.cpp
index 8fbbf41cd63..3a1342815af 100644
--- a/source/gameengine/Expressions/intern/IdentifierExpr.cpp
+++ b/source/gameengine/Expressions/intern/IdentifierExpr.cpp
@@ -90,7 +90,7 @@ CExpression* CIdentifierExpr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlin
-void CIdentifierExpr::ClearModified()
+void CIdentifierExpr::ClearModified()
{
assertd(false); // not implemented yet
}
diff --git a/source/gameengine/Expressions/intern/IfExpr.cpp b/source/gameengine/Expressions/intern/IfExpr.cpp
index b4e2fe7315b..549f53749d6 100644
--- a/source/gameengine/Expressions/intern/IfExpr.cpp
+++ b/source/gameengine/Expressions/intern/IfExpr.cpp
@@ -104,10 +104,10 @@ bool CIfExpr::IsInside(float x,float y,float z,bool bBorderInclude)
assertd(false);
return false;
}
-
-bool CIfExpr::NeedsRecalculated()
+
+bool CIfExpr::NeedsRecalculated()
{
return (m_guard->NeedsRecalculated() ||
m_e1->NeedsRecalculated() ||
diff --git a/source/gameengine/Expressions/intern/InputParser.cpp b/source/gameengine/Expressions/intern/InputParser.cpp
index 583d8da63cb..1f5f9800a33 100644
--- a/source/gameengine/Expressions/intern/InputParser.cpp
+++ b/source/gameengine/Expressions/intern/InputParser.cpp
@@ -33,7 +33,7 @@
#include "EXP_IdentifierExpr.h"
// this is disable at the moment, I expected a memleak from it, but the error-cleanup was the reason
-// well, looks we don't need it anyway, until maybe the Curved Surfaces are integrated into CSG
+// well, looks we don't need it anyway, until maybe the Curved Surfaces are integrated into CSG
// cool things like (IF(LOD==1,CCurvedValue,IF(LOD==2,CCurvedValue2)) etc...
#include "EXP_IfExpr.h"
@@ -185,7 +185,7 @@ void CParser::NextSym()
// sets the global variable constkind to the kind of operator
// if it is a reference to a cell
// sets the global variable cellcoord to the kind of operator
-
+
errmsg = NULL;
while (ch == ' ' || ch == 0x9)
NextCh();
@@ -303,7 +303,7 @@ void CParser::NextSym()
} else if (((ch >= 'a') && (ch <= 'z'))
|| ((ch >= 'A') && (ch <= 'Z')))
{ // reserved word?
-
+
start = chcount;
CharRep();
GrabString(start);
@@ -421,7 +421,7 @@ CExpression *CParser::Ex(int i)
// returns an CExpression, containing the parsed input
CExpression *e1 = NULL, *e2 = NULL;
int opkind2;
-
+
if (i < NUM_PRIORITY) {
e1 = Ex(i + 1);
while ((sym == opsym) && (Priority(opkind) == i)) {
@@ -522,7 +522,7 @@ CExpression *CParser::Ex(int i)
{
e1 = new CIdentifierExpr(const_as_string,m_identifierContext);
NextSym();
-
+
break;
}
case errorsym:
@@ -536,7 +536,7 @@ CExpression *CParser::Ex(int i)
errmsgval->Release();
//e1 = Error(errmsg->Calculate()->GetText());//new CConstExpr(errmsg->Calculate());
-
+
if ( !(errmsg->Release()) )
{
errmsg=NULL;
@@ -569,19 +569,19 @@ CExpression *CParser::Expr()
CExpression* CParser::ProcessText
(const char *intext) {
-
+
// and parses the string in intext and returns it.
-
-
+
+
CExpression* expr;
text = intext;
-
-
+
+
chcount = 0;
if (text.Length() == 0) {
return NULL;
}
-
+
ch = text[0];
/* if (ch != '=') {
* expr = new CConstExpr(new CStringValue(text));
@@ -599,7 +599,7 @@ CExpression* CParser::ProcessText
}
if (errmsg)
errmsg->Release();
-
+
return expr;
}
@@ -609,7 +609,7 @@ float CParser::GetFloat(STR_String& txt)
{
// returns parsed text into a float
// empty string returns -1
-
+
// AfxMessageBox("parsed string="+txt);
CValue* val=NULL;
float result=-1;
@@ -619,9 +619,9 @@ float CParser::GetFloat(STR_String& txt)
if (expr) {
val = expr->Calculate();
result=(float)val->GetNumber();
-
-
-
+
+
+
val->Release();
expr->Release();
}
@@ -632,10 +632,10 @@ float CParser::GetFloat(STR_String& txt)
CValue* CParser::GetValue(STR_String& txt, bool bFallbackToText)
{
- // returns parsed text into a value,
+ // returns parsed text into a value,
// empty string returns NULL value !
// if bFallbackToText then unparsed stuff is put into text
-
+
CValue* result=NULL;
CExpression* expr = ProcessText(txt);
if (expr) {
diff --git a/source/gameengine/Expressions/intern/IntValue.cpp b/source/gameengine/Expressions/intern/IntValue.cpp
index 7b2e841f13f..3315b3a3e3c 100644
--- a/source/gameengine/Expressions/intern/IntValue.cpp
+++ b/source/gameengine/Expressions/intern/IntValue.cpp
@@ -34,7 +34,7 @@ pre: false
effect: constructs a new CIntValue
*/
{
-
+
#ifdef DEBUG_
m_textval = "Int illegal constructor";
#endif
@@ -59,13 +59,13 @@ CIntValue::CIntValue(cInt innie,const char *name,AllocationTYPE alloctype)
{
m_int = innie;
SetName(name);
-
+
if (alloctype==CValue::STACKVALUE)
{
CValue::DisableRefCount();
}
m_pstrRep=NULL;
-
+
}
@@ -118,7 +118,7 @@ object and val
CValue* CIntValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val)
{
CValue *ret;
-
+
switch (dtype) {
case VALUE_EMPTY_TYPE:
case VALUE_INT_TYPE:
@@ -312,7 +312,7 @@ const STR_String & CIntValue::GetText()
if (!m_pstrRep)
m_pstrRep=new STR_String();
m_pstrRep->Format("%lld",m_int);
-
+
return *m_pstrRep;
}
@@ -323,15 +323,15 @@ CValue* CIntValue::GetReplica()
CIntValue* replica = new CIntValue(*this);
replica->ProcessReplica();
replica->m_pstrRep = NULL;
-
+
return replica;
}
void CIntValue::SetValue(CValue* newval)
-{
- m_int = (cInt)newval->GetNumber();
+{
+ m_int = (cInt)newval->GetNumber();
SetModified(true);
}
diff --git a/source/gameengine/Expressions/intern/ListValue.cpp b/source/gameengine/Expressions/intern/ListValue.cpp
index 557ce7be300..ce45c6cf8f5 100644
--- a/source/gameengine/Expressions/intern/ListValue.cpp
+++ b/source/gameengine/Expressions/intern/ListValue.cpp
@@ -290,7 +290,7 @@ static Py_ssize_t listvalue_bufferlen(PyObject *self)
CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self));
if (list==NULL)
return 0;
-
+
return (Py_ssize_t)list->GetCount();
}
@@ -298,24 +298,24 @@ static PyObject *listvalue_buffer_item(PyObject *self, Py_ssize_t index)
{
CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self));
CValue *cval;
-
+
if (list==NULL) {
PyErr_SetString(PyExc_SystemError, "val = CList[i], " BGE_PROXY_ERROR_MSG);
return NULL;
}
-
+
int count = list->GetCount();
-
+
if (index < 0)
index = count+index;
-
+
if (index < 0 || index >= count) {
PyErr_SetString(PyExc_IndexError, "CList[i]: Python ListIndex out of range in CValueList");
return NULL;
}
-
+
cval= list->GetValue(index);
-
+
PyObject *pyobj = cval->ConvertValueToPython();
if (pyobj)
return pyobj;
@@ -360,7 +360,7 @@ static PyObject *listvalue_mapping_subscript(PyObject *self, PyObject *key)
PyErr_SetString(PyExc_SystemError, "value = CList[i], " BGE_PROXY_ERROR_MSG);
return NULL;
}
-
+
if (PyUnicode_Check(key)) {
CValue *item = ((CListValue*) list)->FindValue(_PyUnicode_AsString(key));
if (item) {
@@ -403,37 +403,37 @@ static PyObject *listvalue_buffer_concat(PyObject *self, PyObject *other)
{
CListValue *listval= static_cast<CListValue *>(BGE_PROXY_REF(self));
Py_ssize_t i, numitems, numitems_orig;
-
+
if (listval==NULL) {
PyErr_SetString(PyExc_SystemError, "CList+other, " BGE_PROXY_ERROR_MSG);
return NULL;
}
-
+
numitems_orig= listval->GetCount();
-
+
// for now, we support CListValue concatenated with items
// and CListValue concatenated to Python Lists
// and CListValue concatenated with another CListValue
-
+
/* Shallow copy, don't use listval->GetReplica(), it will screw up with KX_GameObjects */
CListValue* listval_new = new CListValue();
-
+
if (PyList_Check(other))
{
CValue* listitemval;
bool error = false;
-
+
numitems = PyList_GET_SIZE(other);
-
+
/* copy the first part of the list */
listval_new->Resize(numitems_orig + numitems);
for (i=0;i<numitems_orig;i++)
listval_new->SetValue(i, listval->GetValue(i)->AddRef());
-
+
for (i=0;i<numitems;i++)
{
listitemval = listval->ConvertPythonToValue(PyList_GET_ITEM(other, i), true, "cList + pyList: CListValue, ");
-
+
if (listitemval) {
listval_new->SetValue(i+numitems_orig, listitemval);
} else {
@@ -441,13 +441,13 @@ static PyObject *listvalue_buffer_concat(PyObject *self, PyObject *other)
break;
}
}
-
+
if (error) {
listval_new->Resize(numitems_orig+i); /* resize so we don't try release NULL pointers */
listval_new->Release();
- return NULL; /* ConvertPythonToValue above sets the error */
+ return NULL; /* ConvertPythonToValue above sets the error */
}
-
+
}
else if (PyObject_TypeCheck(other, &CListValue::Type)) {
// add items from otherlist to this list
@@ -457,18 +457,18 @@ static PyObject *listvalue_buffer_concat(PyObject *self, PyObject *other)
PyErr_SetString(PyExc_SystemError, "CList+other, " BGE_PROXY_ERROR_MSG);
return NULL;
}
-
+
numitems = otherval->GetCount();
-
+
/* copy the first part of the list */
listval_new->Resize(numitems_orig + numitems); /* resize so we don't try release NULL pointers */
for (i=0;i<numitems_orig;i++)
listval_new->SetValue(i, listval->GetValue(i)->AddRef());
-
+
/* now copy the other part of the list */
for (i=0;i<numitems;i++)
listval_new->SetValue(i+numitems_orig, otherval->GetValue(i)->AddRef());
-
+
}
return listval_new->NewProxy(true); /* python owns this list */
}
@@ -476,12 +476,12 @@ static PyObject *listvalue_buffer_concat(PyObject *self, PyObject *other)
static int listvalue_buffer_contains(PyObject *self_v, PyObject *value)
{
CListValue *self = static_cast<CListValue *>(BGE_PROXY_REF(self_v));
-
+
if (self == NULL) {
PyErr_SetString(PyExc_SystemError, "val in CList, " BGE_PROXY_ERROR_MSG);
return -1;
}
-
+
if (PyUnicode_Check(value)) {
if (self->FindValue((const char *)_PyUnicode_AsString(value))) {
return 1;
@@ -492,9 +492,9 @@ static int listvalue_buffer_contains(PyObject *self_v, PyObject *value)
for (int i=0; i < self->GetCount(); i++)
if (self->GetValue(i) == item) // Com
return 1;
-
+
} // not using CheckEqual
-
+
return 0;
}
diff --git a/source/gameengine/Expressions/intern/Operator1Expr.cpp b/source/gameengine/Expressions/intern/Operator1Expr.cpp
index add0376f487..11bb2c06caf 100644
--- a/source/gameengine/Expressions/intern/Operator1Expr.cpp
+++ b/source/gameengine/Expressions/intern/Operator1Expr.cpp
@@ -63,7 +63,7 @@ ret: a new object containing the result of applying the operator m_op to the
ret = empty->Calc(m_op, temp);
empty->Release();
temp->Release();
-
+
return ret;
}
@@ -74,10 +74,10 @@ bool COperator1Expr::IsInside(float x, float y, float z,bool bBorderInclude)
bool result = true;
switch (m_op)
{
-
+
case VALUE_ADD_OPERATOR:
{
-
+
if (m_lhs)
{
result = result || m_lhs->IsInside(x,y,z,bBorderInclude);
@@ -116,7 +116,7 @@ CExpression* COperator1Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlink
// changed
//numchanges++;
newlhs->AddRef();
-
+
//m_lhs->Release();
brokenlinks.push_back(new CBrokenLinkInfo(&m_lhs,m_lhs));
@@ -129,7 +129,7 @@ CExpression* COperator1Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlink
return Release();
}
-
+
}
void COperator1Expr::BroadcastOperators(VALUE_OPERATOR op)
@@ -145,7 +145,7 @@ bool COperator1Expr::MergeExpression(CExpression *otherexpr)
{
if (m_lhs)
return m_lhs->MergeExpression(otherexpr);
-
+
assertd(false); // should not get here, expression is not compatible for merge
return false;
}
diff --git a/source/gameengine/Expressions/intern/Operator2Expr.cpp b/source/gameengine/Expressions/intern/Operator2Expr.cpp
index 0a7f30b8cc8..aaf6f49943d 100644
--- a/source/gameengine/Expressions/intern/Operator2Expr.cpp
+++ b/source/gameengine/Expressions/intern/Operator2Expr.cpp
@@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////////////////
COperator2Expr::COperator2Expr(VALUE_OPERATOR op, CExpression *lhs, CExpression *rhs)
-:
+:
m_rhs(rhs),
m_lhs(lhs),
m_cached_calculate(NULL),
@@ -51,7 +51,7 @@ pre:
effect: constucts an empty COperator2Expr
*/
{
-
+
}
COperator2Expr::~COperator2Expr()
@@ -66,7 +66,7 @@ effect: deletes the object
m_rhs->Release();
if (m_cached_calculate)
m_cached_calculate->Release();
-
+
}
CValue* COperator2Expr::Calculate()
/*
@@ -75,11 +75,11 @@ ret: a new object containing the result of applying operator m_op to m_lhs
and m_rhs
*/
{
-
+
bool leftmodified,rightmodified;
leftmodified = m_lhs->NeedsRecalculated();
rightmodified = m_rhs->NeedsRecalculated();
-
+
// if no modifications on both left and right subtree, and result is already calculated
// then just return cached result...
if (!leftmodified && !rightmodified && (m_cached_calculate))
@@ -87,30 +87,30 @@ and m_rhs
// not modified, just return m_cached_calculate
} else {
// if not yet calculated, or modified...
-
-
+
+
if (m_cached_calculate) {
m_cached_calculate->Release();
m_cached_calculate=NULL;
}
-
+
CValue* ffleft = m_lhs->Calculate();
CValue* ffright = m_rhs->Calculate();
-
+
ffleft->SetOwnerExpression(this);//->m_pOwnerExpression=this;
ffright->SetOwnerExpression(this);//->m_pOwnerExpression=this;
-
+
m_cached_calculate = ffleft->Calc(m_op,ffright);
-
+
//if (m_cached_calculate)
// m_cached_calculate->Action(CValue::SETOWNEREXPR,&CVoidValue(this,false,CValue::STACKVALUE));
ffleft->Release();
ffright->Release();
}
-
+
return m_cached_calculate->AddRef();
-
+
}
#if 0
@@ -118,7 +118,7 @@ bool COperator2Expr::IsInside(float x, float y, float z,bool bBorderInclude)
{
bool inside;
inside = false;
-
+
switch (m_op) {
case VALUE_ADD_OPERATOR:
{
@@ -164,7 +164,7 @@ bool COperator2Expr::IsInside(float x, float y, float z,bool bBorderInclude)
// not yet implemented, only add or sub csg operations
}
}
-
+
return inside;
}
@@ -193,7 +193,7 @@ bool COperator2Expr::NeedsRecalculated()
return m_lhs->NeedsRecalculated();
//modleft = m_lhs->NeedsRecalculated();
//return (modleft || modright);
-
+
}
@@ -213,7 +213,7 @@ CExpression* COperator2Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlink
/*
if (m_cached_calculate)
m_cached_calculate->Action(CValue::REFRESH_CACHE);
-
+
CExpression* newlhs = m_lhs->CheckLink(brokenlinks);
CExpression* newrhs = m_rhs->CheckLink(brokenlinks);
@@ -235,11 +235,11 @@ CExpression* COperator2Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlink
if (m_lhs && m_rhs) {
return this;
}
-
+
AddRef();
- if (m_lhs)
+ if (m_lhs)
return Release(m_lhs->AddRef());
-
+
if (m_rhs)
return Release(m_rhs->AddRef());
/
diff --git a/source/gameengine/Expressions/intern/PyObjectPlus.cpp b/source/gameengine/Expressions/intern/PyObjectPlus.cpp
index 1e4a59aeb5c..317faac7fa9 100644
--- a/source/gameengine/Expressions/intern/PyObjectPlus.cpp
+++ b/source/gameengine/Expressions/intern/PyObjectPlus.cpp
@@ -38,9 +38,9 @@
* Derived from work by
* David Redish
* graduate student
- * Computer Science Department
+ * Computer Science Department
* Carnegie Mellon University (CMU)
- * Center for the Neural Basis of Cognition (CNBC)
+ * Center for the Neural Basis of Cognition (CNBC)
* http://www.python.org/doc/PyCPP.html
*
* ----------------------------- */
@@ -141,7 +141,7 @@ PyObject *PyObjectPlus::py_base_repr(PyObject *self) // This should be the ent
PyErr_SetString(PyExc_SystemError, BGE_PROXY_ERROR_MSG);
return NULL;
}
- return self_plus->py_repr();
+ return self_plus->py_repr();
}
@@ -420,7 +420,7 @@ PyObject *PyObjectPlus::py_get_attrdef(PyObject *self_py, const PyAttributeDef *
return PyFloat_FromDouble(*val);
} else {
// vector, verify size
- if (attrdef->m_size != attrdef->m_imax*sizeof(float))
+ if (attrdef->m_size != attrdef->m_imax*sizeof(float))
{
return NULL;
}
@@ -437,7 +437,7 @@ PyObject *PyObjectPlus::py_get_attrdef(PyObject *self_py, const PyAttributeDef *
}
} else {
// matrix case
- if (attrdef->m_size != attrdef->m_imax*attrdef->m_imin*sizeof(float))
+ if (attrdef->m_size != attrdef->m_imax*attrdef->m_imin*sizeof(float))
{
return NULL;
}
@@ -530,11 +530,11 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
size_t bufferSize = 0;
PyObject *item = NULL; // to store object that must be dereferenced in case of error
PyObject *list = NULL; // to store object that must be dereferenced in case of error
-
+
ptr += attrdef->m_offset;
if (attrdef->m_length > 1)
{
- if (!PySequence_Check(value))
+ if (!PySequence_Check(value))
{
PyErr_Format(PyExc_TypeError, "expected a sequence for attribute \"%s\"", attrdef->m_name);
return PY_SET_ATTR_FAIL;
@@ -544,10 +544,10 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
PyErr_Format(PyExc_TypeError, "incorrect number of elements in sequence for attribute \"%s\"", attrdef->m_name);
return PY_SET_ATTR_FAIL;
}
- switch (attrdef->m_type)
+ switch (attrdef->m_type)
{
case KX_PYATTRIBUTE_TYPE_FUNCTION:
- if (attrdef->m_setFunction == NULL)
+ if (attrdef->m_setFunction == NULL)
{
PyErr_Format(PyExc_AttributeError, "function attribute without function for attribute \"%s\", report to blender.org", attrdef->m_name);
return PY_SET_ATTR_FAIL;
@@ -582,16 +582,16 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
for (int i=0; i<attrdef->m_length; i++)
{
item = PySequence_GetItem(value, i); /* new ref */
- switch (attrdef->m_type)
+ switch (attrdef->m_type)
{
case KX_PYATTRIBUTE_TYPE_BOOL:
{
bool *var = reinterpret_cast<bool*>(ptr);
ptr += sizeof(bool);
- if (PyLong_Check(item))
+ if (PyLong_Check(item))
{
*var = (PyLong_AsLong(item) != 0);
- }
+ }
else if (PyBool_Check(item))
{
*var = (item == Py_True);
@@ -607,7 +607,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
{
short int *var = reinterpret_cast<short int*>(ptr);
ptr += sizeof(short int);
- if (PyLong_Check(item))
+ if (PyLong_Check(item))
{
int val = PyLong_AsLong(item);
if (attrdef->m_clamp)
@@ -643,7 +643,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
{
int *var = reinterpret_cast<int*>(ptr);
ptr += sizeof(int);
- if (PyLong_Check(item))
+ if (PyLong_Check(item))
{
int val = PyLong_AsLong(item);
if (attrdef->m_clamp)
@@ -709,7 +709,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
// if the checing function didnt set an error then set a generic one here so we don't set an error with no exception
if (PyErr_Occurred()==0)
PyErr_Format(PyExc_AttributeError, "type check error for attribute \"%s\", reasion unknown", attrdef->m_name);
-
+
// post check returned an error, restore values
UNDO_AND_ERROR:
if (undoBuffer)
@@ -741,7 +741,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
{
// post check function is provided, prepare undo buffer
sourceBuffer = ptr;
- switch (attrdef->m_type)
+ switch (attrdef->m_type)
{
case KX_PYATTRIBUTE_TYPE_BOOL:
bufferSize = sizeof(bool);
@@ -785,16 +785,16 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
}
}
}
-
- switch (attrdef->m_type)
+
+ switch (attrdef->m_type)
{
case KX_PYATTRIBUTE_TYPE_BOOL:
{
bool *var = reinterpret_cast<bool*>(ptr);
- if (PyLong_Check(value))
+ if (PyLong_Check(value))
{
*var = (PyLong_AsLong(value) != 0);
- }
+ }
else if (PyBool_Check(value))
{
*var = (value == Py_True);
@@ -809,10 +809,10 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
case KX_PYATTRIBUTE_TYPE_FLAG:
{
bool bval;
- if (PyLong_Check(value))
+ if (PyLong_Check(value))
{
bval = (PyLong_AsLong(value) != 0);
- }
+ }
else if (PyBool_Check(value))
{
bval = (value == Py_True);
@@ -852,7 +852,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
case KX_PYATTRIBUTE_TYPE_SHORT:
{
short int *var = reinterpret_cast<short int*>(ptr);
- if (PyLong_Check(value))
+ if (PyLong_Check(value))
{
int val = PyLong_AsLong(value);
if (attrdef->m_clamp)
@@ -887,7 +887,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
case KX_PYATTRIBUTE_TYPE_INT:
{
int *var = reinterpret_cast<int*>(ptr);
- if (PyLong_Check(value))
+ if (PyLong_Check(value))
{
int val = PyLong_AsLong(value);
if (attrdef->m_clamp)
@@ -914,14 +914,14 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
case KX_PYATTRIBUTE_TYPE_FLOAT:
{
float *var = reinterpret_cast<float*>(ptr);
- if (attrdef->m_imin != 0)
+ if (attrdef->m_imin != 0)
{
- if (attrdef->m_size != attrdef->m_imin*attrdef->m_imax*sizeof(float))
+ if (attrdef->m_size != attrdef->m_imin*attrdef->m_imax*sizeof(float))
{
PyErr_Format(PyExc_TypeError, "internal error: incorrect field size for attribute \"%s\"", attrdef->m_name);
goto FREE_AND_ERROR;
}
- if (!PySequence_Check(value) || PySequence_Size(value) != attrdef->m_imin)
+ if (!PySequence_Check(value) || PySequence_Size(value) != attrdef->m_imin)
{
PyErr_Format(PyExc_TypeError, "expected a sequence of [%d][%d] floats for attribute \"%s\"", attrdef->m_imin, attrdef->m_imax, attrdef->m_name);
goto FREE_AND_ERROR;
@@ -929,7 +929,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
for (int i=0; i<attrdef->m_imin; i++)
{
PyObject *list = PySequence_GetItem(value, i); /* new ref */
- if (!PySequence_Check(list) || PySequence_Size(list) != attrdef->m_imax)
+ if (!PySequence_Check(list) || PySequence_Size(list) != attrdef->m_imax)
{
PyErr_Format(PyExc_TypeError, "expected a sequence of [%d][%d] floats for attribute \"%s\"", attrdef->m_imin, attrdef->m_imax, attrdef->m_name);
goto RESTORE_AND_ERROR;
@@ -949,15 +949,15 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
Py_DECREF(list);
list = NULL;
}
- }
- else if (attrdef->m_imax != 0)
+ }
+ else if (attrdef->m_imax != 0)
{
- if (attrdef->m_size != attrdef->m_imax*sizeof(float))
+ if (attrdef->m_size != attrdef->m_imax*sizeof(float))
{
PyErr_Format(PyExc_TypeError, "internal error: incorrect field size for attribute \"%s\"", attrdef->m_name);
goto FREE_AND_ERROR;
}
- if (!PySequence_Check(value) || PySequence_Size(value) != attrdef->m_imax)
+ if (!PySequence_Check(value) || PySequence_Size(value) != attrdef->m_imax)
{
PyErr_Format(PyExc_TypeError, "expected a sequence of [%d] floats for attribute \"%s\"", attrdef->m_imax, attrdef->m_name);
goto FREE_AND_ERROR;
@@ -973,7 +973,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
item = NULL;
++var;
}
- }
+ }
else
{
if (!py_check_attr_float(var, value, attrdef))
@@ -983,7 +983,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
}
case KX_PYATTRIBUTE_TYPE_VECTOR:
{
- if (!PySequence_Check(value) || PySequence_Size(value) != 3)
+ if (!PySequence_Check(value) || PySequence_Size(value) != 3)
{
PyErr_Format(PyExc_TypeError, "expected a sequence of 3 floats for attribute \"%s\"", attrdef->m_name);
goto FREE_AND_ERROR;
@@ -1018,7 +1018,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
}
case KX_PYATTRIBUTE_TYPE_CHAR:
{
- if (PyUnicode_Check(value))
+ if (PyUnicode_Check(value))
{
Py_ssize_t val_size;
const char *val = _PyUnicode_AsStringAndSize(value, &val_size);
@@ -1035,7 +1035,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
case KX_PYATTRIBUTE_TYPE_STRING:
{
STR_String *var = reinterpret_cast<STR_String*>(ptr);
- if (PyUnicode_Check(value))
+ if (PyUnicode_Check(value))
{
Py_ssize_t val_len;
const char *val = _PyUnicode_AsStringAndSize(value, &val_len); /* XXX, should be 'const' but we do a silly trick to have a shorter string */
@@ -1134,7 +1134,7 @@ PyObject *PyObjectPlus::GetProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, v
}
//PyObject_Print(self->m_proxy, stdout, 0);
//printf("ref %d\n", self->m_proxy->ob_refcnt);
-
+
BGE_PROXY_REF(self->m_proxy) = self; /* Its possible this was set to NULL, so set it back here */
BGE_PROXY_PTR(self->m_proxy) = ptr;
Py_INCREF(self->m_proxy); /* we own one, thos ones fore the return */
@@ -1143,13 +1143,13 @@ PyObject *PyObjectPlus::GetProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, v
PyObject *PyObjectPlus::NewProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, void *ptr, bool py_owns)
{
- if (!self)
+ if (!self)
{
// in case of proxy without reference to game object
PyObject *proxy = reinterpret_cast<PyObject *>PyObject_NEW( PyObjectPlus_Proxy, tp);
BGE_PROXY_PYREF(proxy) = false;
BGE_PROXY_PYOWNS(proxy) = py_owns;
- BGE_PROXY_REF(proxy) = NULL;
+ BGE_PROXY_REF(proxy) = NULL;
BGE_PROXY_PTR(proxy) = ptr;
#ifdef USE_WEAKREFS
BGE_PROXY_WKREF(proxy) = NULL;
@@ -1168,9 +1168,9 @@ PyObject *PyObjectPlus::NewProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, v
Py_INCREF(self->m_proxy);
return self->m_proxy;
}
-
+
}
-
+
GetProxyPlus_Ext(self, tp, ptr);
if (py_owns) {
BGE_PROXY_PYOWNS(self->m_proxy) = py_owns;
@@ -1204,7 +1204,7 @@ void PyObjectPlus::ClearDeprecationWarning()
{
WarnLink *wlink_next;
WarnLink *wlink = GetDeprecationWarningLinkFirst();
-
+
while (wlink) {
wlink->warn_done= false; /* no need to NULL the link, its cleared before adding to the list next time round */
wlink_next= reinterpret_cast<WarnLink *>(wlink->link);
diff --git a/source/gameengine/Expressions/intern/StringValue.cpp b/source/gameengine/Expressions/intern/StringValue.cpp
index ddf61dc441c..8b979b2af0c 100644
--- a/source/gameengine/Expressions/intern/StringValue.cpp
+++ b/source/gameengine/Expressions/intern/StringValue.cpp
@@ -41,14 +41,14 @@ CStringValue::CStringValue(const char *txt,const char *name,AllocationTYPE alloc
{
m_strString = txt;
SetName(name);
-
+
if (alloctype==CValue::STACKVALUE)
{
CValue::DisableRefCount();
-
+
}
-
-
+
+
}
@@ -71,7 +71,7 @@ CValue* CStringValue::Calc(VALUE_OPERATOR op, CValue *val)
CValue* CStringValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val)
{
CValue *ret;
-
+
if (op == VALUE_ADD_OPERATOR) {
if (dtype == VALUE_ERROR_TYPE)
ret = new CErrorValue(val->GetText() + op2str(op) + GetText());
@@ -138,7 +138,7 @@ bool CStringValue::IsEqual(const STR_String & other)
}
CValue* CStringValue::GetReplica()
-{
+{
CStringValue* replica = new CStringValue(*this);
replica->ProcessReplica();
return replica;
diff --git a/source/gameengine/Expressions/intern/Value.cpp b/source/gameengine/Expressions/intern/Value.cpp
index f8796a76e76..9b42bdb7bff 100644
--- a/source/gameengine/Expressions/intern/Value.cpp
+++ b/source/gameengine/Expressions/intern/Value.cpp
@@ -70,7 +70,7 @@ PyMethodDef CValue::Methods[] = {
/*#define CVALUE_DEBUG*/
#ifdef CVALUE_DEBUG
int gRefCount;
-struct SmartCValueRef
+struct SmartCValueRef
{
CValue *m_ref;
int m_count;
@@ -92,7 +92,7 @@ std::vector<SmartCValueRef> gRefList;
CValue::CValue()
: PyObjectPlus(),
-
+
m_pNamedPropertyArray(NULL),
m_refcount(1)
/*
@@ -148,7 +148,7 @@ STR_String CValue::op2str(VALUE_OPERATOR op)
{
//pre:
//ret: the stringrepresentation of operator op
-
+
STR_String opmsg;
switch (op) {
case VALUE_MOD_OPERATOR:
@@ -225,7 +225,7 @@ void CValue::SetProperty(const STR_String & name,CValue* ioProperty)
else { // Make sure we have a property array
m_pNamedPropertyArray = new std::map<STR_String,CValue *>;
}
-
+
// Add property at end of array
(*m_pNamedPropertyArray)[name] = ioProperty->AddRef();//->Add(ioProperty);
}
@@ -247,7 +247,7 @@ void CValue::SetProperty(const char* name,CValue* ioProperty)
else { // Make sure we have a property array
m_pNamedPropertyArray = new std::map<STR_String,CValue *>;
}
-
+
// Add property at end of array
(*m_pNamedPropertyArray)[name] = ioProperty->AddRef();//->Add(ioProperty);
}
@@ -293,7 +293,7 @@ float CValue::GetPropertyNumber(const STR_String& inName,float defnumber)
{
CValue *property = GetProperty(inName);
if (property)
- return property->GetNumber();
+ return property->GetNumber();
else
return defnumber;
}
@@ -316,7 +316,7 @@ bool CValue::RemoveProperty(const char *inName)
return true;
}
}
-
+
return false;
}
@@ -328,7 +328,7 @@ vector<STR_String> CValue::GetPropertyNames()
vector<STR_String> result;
if (!m_pNamedPropertyArray) return result;
result.reserve(m_pNamedPropertyArray->size());
-
+
std::map<STR_String,CValue*>::iterator it;
for (it= m_pNamedPropertyArray->begin(); (it != m_pNamedPropertyArray->end()); it++)
{
@@ -369,7 +369,7 @@ void CValue::SetPropertiesModified(bool inModified)
{
if (!m_pNamedPropertyArray) return;
std::map<STR_String,CValue*>::iterator it;
-
+
for (it= m_pNamedPropertyArray->begin();(it != m_pNamedPropertyArray->end()); it++)
((*it).second)->SetModified(inModified);
}
@@ -383,11 +383,11 @@ bool CValue::IsAnyPropertyModified()
{
if (!m_pNamedPropertyArray) return false;
std::map<STR_String,CValue*>::iterator it;
-
+
for (it= m_pNamedPropertyArray->begin();(it != m_pNamedPropertyArray->end()); it++)
if (((*it).second)->IsModified())
return true;
-
+
return false;
}
@@ -471,7 +471,7 @@ void CValue::DisableRefCount()
void CValue::ProcessReplica() /* was AddDataToReplica in 2.48 */
{
m_refcount = 1;
-
+
#ifdef DEBUG
//gRefCountValue++;
#endif
@@ -518,7 +518,7 @@ CValue* CValue::FindIdentifier(const STR_String& identifiername)
if (tempresult)
{
result=tempresult->FindIdentifier(rightstring);
- }
+ }
} else
{
result = GetProperty(identifiername);
@@ -666,7 +666,7 @@ void CValue::SetColorOperator(VALUE_OPERATOR op)
/* intentionally empty */
}
void CValue::SetValue(CValue* newval)
-{
+{
// no one should get here
assertd(newval->GetNumber() == 10121969);
}
diff --git a/source/gameengine/Expressions/intern/VectorValue.cpp b/source/gameengine/Expressions/intern/VectorValue.cpp
index a3d44116317..dcb1f11ad1a 100644
--- a/source/gameengine/Expressions/intern/VectorValue.cpp
+++ b/source/gameengine/Expressions/intern/VectorValue.cpp
@@ -36,51 +36,51 @@
CVectorValue::CVectorValue(float x,float y,float z, AllocationTYPE alloctype)
{
SetCustomFlag1(false);//FancyOutput=false;
-
+
if (alloctype == STACKVALUE)
{
CValue::DisableRefCount();
};
-
+
m_vec[KX_X] = m_transformedvec[KX_X] = x;
m_vec[KX_Y] = m_transformedvec[KX_Y] = y;
m_vec[KX_Z] = m_transformedvec[KX_Z] = z;
-
+
}
CVectorValue::CVectorValue(double vec[3], const char *name,AllocationTYPE alloctype)
{
-
+
SetCustomFlag1(false);//FancyOutput=false;
-
+
m_vec[KX_X] = m_transformedvec[KX_X] = vec[KX_X];
m_vec[KX_Y] = m_transformedvec[KX_Y] = vec[KX_Y];
m_vec[KX_Z] = m_transformedvec[KX_Z] = vec[KX_Z];
-
+
if (alloctype == STACKVALUE)
{
CValue::DisableRefCount();
-
+
}
-
+
SetName(name);
}
CVectorValue::CVectorValue(double vec[3], AllocationTYPE alloctype)
{
-
+
SetCustomFlag1(false);//FancyOutput=false;
-
+
m_vec[KX_X] = m_transformedvec[KX_X] = vec[KX_X];
m_vec[KX_Y] = m_transformedvec[KX_Y] = vec[KX_Y];
m_vec[KX_Z] = m_transformedvec[KX_Z] = vec[KX_Z];
-
+
if (alloctype == STACKVALUE)
{
CValue::DisableRefCount();
-
+
}
-
-
+
+
}
CVectorValue::~CVectorValue()
{
@@ -95,7 +95,7 @@ CVectorValue::~CVectorValue()
CValue* CVectorValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val)
{
CValue *ret = NULL;
-
+
switch (op) {
case VALUE_ADD_OPERATOR:
{
@@ -122,7 +122,7 @@ CValue* CVectorValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue
{
switch (dtype)
{
-
+
case VALUE_EMPTY_TYPE:
case VALUE_VECTOR_TYPE:
{
@@ -152,7 +152,7 @@ CValue* CVectorValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue
ret = new CErrorValue(val->GetText() + op2str(op) + GetText());
}
-
+
return ret;
}
@@ -174,7 +174,7 @@ double* CVectorValue::GetVector3(bool bGetTransformedVec)
{
if (bGetTransformedVec)
return m_transformedvec;
- // else
+ // else
return m_vec;
}
@@ -187,19 +187,19 @@ void CVectorValue::SetVector(double newvec[])
m_vec[KX_X] = m_transformedvec[KX_X] = newvec[KX_X];
m_vec[KX_Y] = m_transformedvec[KX_Y] = newvec[KX_Y];
m_vec[KX_Z] = m_transformedvec[KX_Z] = newvec[KX_Z];
-
+
SetModified(true);
}
void CVectorValue::SetValue(CValue *newval)
{
-
+
double* newvec = ((CVectorValue*)newval)->GetVector3();
m_vec[KX_X] = m_transformedvec[KX_X] = newvec[KX_X];
m_vec[KX_Y] = m_transformedvec[KX_Y] = newvec[KX_Y];
m_vec[KX_Z] = m_transformedvec[KX_Z] = newvec[KX_Z];
-
+
SetModified(true);
}