From 89a963fb7fdff543b77de790355b9dac3019bd33 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 9 Mar 2012 18:28:30 +0000 Subject: style cleanup: comment blocks --- source/gameengine/Expressions/BoolValue.cpp | 6 ++--- source/gameengine/Expressions/BoolValue.h | 2 +- source/gameengine/Expressions/EmptyValue.h | 2 +- source/gameengine/Expressions/ErrorValue.h | 2 +- source/gameengine/Expressions/Expression.h | 2 +- source/gameengine/Expressions/FloatValue.h | 2 +- source/gameengine/Expressions/IfExpr.cpp | 28 ++++++++++----------- source/gameengine/Expressions/InputParser.cpp | 12 ++++----- source/gameengine/Expressions/IntValue.cpp | 9 +++---- source/gameengine/Expressions/IntValue.h | 2 +- source/gameengine/Expressions/ListValue.h | 2 +- source/gameengine/Expressions/Operator2Expr.h | 2 +- source/gameengine/Expressions/PyObjectPlus.h | 8 +++--- source/gameengine/Expressions/StringValue.cpp | 36 +++++++++++++-------------- source/gameengine/Expressions/Value.h | 2 +- source/gameengine/Expressions/VectorValue.cpp | 17 ++++++------- source/gameengine/Expressions/VectorValue.h | 8 +++--- 17 files changed, 70 insertions(+), 72 deletions(-) (limited to 'source/gameengine/Expressions') diff --git a/source/gameengine/Expressions/BoolValue.cpp b/source/gameengine/Expressions/BoolValue.cpp index 113d12b7d59..b3c4dc144df 100644 --- a/source/gameengine/Expressions/BoolValue.cpp +++ b/source/gameengine/Expressions/BoolValue.cpp @@ -30,9 +30,9 @@ const STR_String CBoolValue::sFalseString = "FALSE"; CBoolValue::CBoolValue() /* -pre: false -effect: constructs a new CBoolValue -*/ + * pre: false + * effect: constructs a new CBoolValue + */ { trace("Bool constructor error"); } diff --git a/source/gameengine/Expressions/BoolValue.h b/source/gameengine/Expressions/BoolValue.h index 00baeba0857..23c8ef5b0e9 100644 --- a/source/gameengine/Expressions/BoolValue.h +++ b/source/gameengine/Expressions/BoolValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _BOOLVALUE_H +#ifndef _BOOLVALUE_H #define _BOOLVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/EmptyValue.h b/source/gameengine/Expressions/EmptyValue.h index 1da0ee8e928..d7212c55adf 100644 --- a/source/gameengine/Expressions/EmptyValue.h +++ b/source/gameengine/Expressions/EmptyValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _EMPTYVALUE_H +#ifndef _EMPTYVALUE_H #define _EMPTYVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/ErrorValue.h b/source/gameengine/Expressions/ErrorValue.h index ec81fc2c82b..55d799cc5e4 100644 --- a/source/gameengine/Expressions/ErrorValue.h +++ b/source/gameengine/Expressions/ErrorValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _ERRORVALUE_H +#ifndef _ERRORVALUE_H #define _ERRORVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/Expression.h b/source/gameengine/Expressions/Expression.h index b9232477c34..b4d12e6328c 100644 --- a/source/gameengine/Expressions/Expression.h +++ b/source/gameengine/Expressions/Expression.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _EXPRESSION_H +#ifndef _EXPRESSION_H #define _EXPRESSION_H #include "Value.h" diff --git a/source/gameengine/Expressions/FloatValue.h b/source/gameengine/Expressions/FloatValue.h index 8dfb42d6b2e..6276e533547 100644 --- a/source/gameengine/Expressions/FloatValue.h +++ b/source/gameengine/Expressions/FloatValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _FLOATVALUE_H +#ifndef _FLOATVALUE_H #define _FLOATVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/IfExpr.cpp b/source/gameengine/Expressions/IfExpr.cpp index 9e6d80ab468..baf91e4a5c3 100644 --- a/source/gameengine/Expressions/IfExpr.cpp +++ b/source/gameengine/Expressions/IfExpr.cpp @@ -31,11 +31,11 @@ CIfExpr::CIfExpr() -CIfExpr::CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2) /* -pre: -effect: constructs an CifExpr-object corresponding to IF(guard, e1, e2) -*/ + * pre: + * effect: constructs an CifExpr-object corresponding to IF(guard, e1, e2) + */ +CIfExpr::CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2) { m_guard = guard; m_e1 = e1; @@ -44,11 +44,11 @@ effect: constructs an CifExpr-object corresponding to IF(guard, e1, e2) -CIfExpr::~CIfExpr() /* -pre: -effect: dereferences the object -*/ + * pre: + * effect: dereferences the object + */ +CIfExpr::~CIfExpr() { if (m_guard) m_guard->Release(); @@ -62,13 +62,13 @@ effect: dereferences the object +/** + * pre: + * ret: a new object containing the value of m_e1 if m_guard is a boolean TRUE + * a new object containing the value of m_e2 if m_guard is a boolean FALSE + * an new errorvalue if m_guard is not a boolean + */ CValue* CIfExpr::Calculate() -/* -pre: -ret: a new object containing the value of m_e1 if m_guard is a boolean TRUE - a new object containing the value of m_e2 if m_guard is a boolean FALSE - an new errorvalue if m_guard is not a boolean -*/ { CValue *guardval; guardval = m_guard->Calculate(); diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp index 9f0def6e866..e13cb8200b1 100644 --- a/source/gameengine/Expressions/InputParser.cpp +++ b/source/gameengine/Expressions/InputParser.cpp @@ -579,12 +579,12 @@ CExpression* CParser::ProcessText } ch = text[0]; - /*if (ch != '=') { - expr = new CConstExpr(new CStringValue(text)); - *dependent = deplist; - return expr; - } else - */ + /* if (ch != '=') { + * expr = new CConstExpr(new CStringValue(text)); + * *dependent = deplist; + * return expr; + * } else + */ // NextCh(); NextSym(); expr = Expr(); diff --git a/source/gameengine/Expressions/IntValue.cpp b/source/gameengine/Expressions/IntValue.cpp index c03c97311c7..20a4bbc0405 100644 --- a/source/gameengine/Expressions/IntValue.cpp +++ b/source/gameengine/Expressions/IntValue.cpp @@ -278,12 +278,11 @@ this object } - +/** + * pre: + * ret: the cInt stored in the object + */ cInt CIntValue::GetInt() -/* -pre: -ret: the cInt stored in the object -*/ { return m_int; } diff --git a/source/gameengine/Expressions/IntValue.h b/source/gameengine/Expressions/IntValue.h index e6802b6ad04..09cf910dbc3 100644 --- a/source/gameengine/Expressions/IntValue.h +++ b/source/gameengine/Expressions/IntValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _INTVALUE_H +#ifndef _INTVALUE_H #define _INTVALUE_H diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h index 4446b40af16..4d97c6cc29c 100644 --- a/source/gameengine/Expressions/ListValue.h +++ b/source/gameengine/Expressions/ListValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _LISTVALUE_H +#ifndef _LISTVALUE_H #define _LISTVALUE_H #include "Value.h" diff --git a/source/gameengine/Expressions/Operator2Expr.h b/source/gameengine/Expressions/Operator2Expr.h index f003696b580..261fef106df 100644 --- a/source/gameengine/Expressions/Operator2Expr.h +++ b/source/gameengine/Expressions/Operator2Expr.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _OPERATOR2EXPR_H +#ifndef _OPERATOR2EXPR_H #define _OPERATOR2EXPR_H diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index e3701b8793c..6de0f3fa8d5 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -609,10 +609,10 @@ public: static PyObject *GetProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, void *ptr); /* self=NULL => proxy to generic pointer detached from GE object - if py_owns is true, the memory pointed by ptr will be deleted automatically with MEM_freeN - self!=NULL=> proxy attached to GE object, ptr is optional and point to a struct from which attributes can be defined - if py_owns is true, the object will be deleted automatically, ptr will NOT be deleted - (assume object destructor takes care of it) */ + * if py_owns is true, the memory pointed by ptr will be deleted automatically with MEM_freeN + * self!=NULL=> proxy attached to GE object, ptr is optional and point to a struct from which attributes can be defined + * if py_owns is true, the object will be deleted automatically, ptr will NOT be deleted + * (assume object destructor takes care of it) */ static PyObject *NewProxyPlus_Ext(PyObjectPlus *self, PyTypeObject *tp, void *ptr, bool py_owns); static WarnLink* GetDeprecationWarningLinkFirst(void); diff --git a/source/gameengine/Expressions/StringValue.cpp b/source/gameengine/Expressions/StringValue.cpp index 29c72a29b71..2e29a39222b 100644 --- a/source/gameengine/Expressions/StringValue.cpp +++ b/source/gameengine/Expressions/StringValue.cpp @@ -24,20 +24,20 @@ // Construction/Destruction ////////////////////////////////////////////////////////////////////// +/** + * pre: false + * effect: constructs a new CStringValue + */ CStringValue::CStringValue() -/* -pre: false -effect: constructs a new CStringValue -*/ { m_strString = "[Illegal String constructor call]"; } +/** + * pre: + * effect: constructs a new CStringValue containing text txt + */ CStringValue::CStringValue(const char *txt,const char *name,AllocationTYPE alloctype) -/* -pre: -effect: constructs a new CStringValue containing text txt -*/ { m_strString = txt; SetName(name); @@ -52,23 +52,23 @@ effect: constructs a new CStringValue containing text txt } +/** + * pre: + * ret: a new object containing the result of applying operator op to this + * object and val + */ CValue* CStringValue::Calc(VALUE_OPERATOR op, CValue *val) -/* -pre: -ret: a new object containing the result of applying operator op to this -object and val -*/ { //return val->CalrcString(op, this); return val->CalcFinal(VALUE_STRING_TYPE, op, this); } +/** + * pre: the type of val is dtype + * ret: a new object containing the result of applying operator op to val and + * this object + */ CValue* CStringValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val) -/* -pre: the type of val is dtype -ret: a new object containing the result of applying operator op to val and -this object -*/ { CValue *ret; diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h index 3a81ec05d5b..00320ff9ed2 100644 --- a/source/gameengine/Expressions/Value.h +++ b/source/gameengine/Expressions/Value.h @@ -152,7 +152,7 @@ struct ValueFlags { /** * Base Class for all Actions performed on CValue's. Can be extended for undo/redo system in future. -*/ + */ class CAction { public: diff --git a/source/gameengine/Expressions/VectorValue.cpp b/source/gameengine/Expressions/VectorValue.cpp index 07a2743b19f..65f5d7d3d22 100644 --- a/source/gameengine/Expressions/VectorValue.cpp +++ b/source/gameengine/Expressions/VectorValue.cpp @@ -87,12 +87,12 @@ CVectorValue::~CVectorValue() } +/** + * pre: the type of val is dtype + * ret: a new object containing the result of applying operator op to val and + * this object + */ CValue* CVectorValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val) -/* -pre: the type of val is dtype -ret: a new object containing the result of applying operator op to val and -this object -*/ { CValue *ret = NULL; @@ -210,10 +210,9 @@ CValue* CVectorValue::GetReplica() return replica; }; -/*void CVectorValue::Transform(rcMatrix4x4 mat) +#if 0 +void CVectorValue::Transform(rcMatrix4x4 mat) { m_transformedvec = mat*m_vec; } -*/ - - +#endif diff --git a/source/gameengine/Expressions/VectorValue.h b/source/gameengine/Expressions/VectorValue.h index 6ff47843282..6158d6773ff 100644 --- a/source/gameengine/Expressions/VectorValue.h +++ b/source/gameengine/Expressions/VectorValue.h @@ -16,7 +16,7 @@ * \ingroup expressions */ -#if !defined _VECTORVALUE_H +#ifndef _VECTORVALUE_H #define _VECTORVALUE_H #include "Value.h" @@ -59,7 +59,7 @@ public: virtual CValue* GetReplica(); virtual const STR_String & GetText(); -/* +#if 0 void SnapPoint(float num,int snap) { if (num > 0) num += ((float)snap / 2); @@ -78,8 +78,8 @@ public: SnapPoint(m_vec[KX_Z],snapvec[KX_Z]); } -*/ - +#endif + protected: double m_vec[3]; double m_transformedvec[3]; -- cgit v1.2.3