#include <veMath.h>
Public Member Functions | |
Multiply (BasePtr lvalue, BasePtr rvalue) | |
Multiply (BinaryOp const &other) | |
Basic constructor. | |
virtual Variant | GetValue (void) const |
Copy constructor. | |
virtual Base * | copy (void) const |
Returns an exact copy of this object. |
Definition at line 62 of file veMath.h.
vValue::Expr::Math::Multiply::Multiply | ( | BasePtr | lvalue, | |
BasePtr | rvalue | |||
) | [inline] |
vValue::Expr::Math::Multiply::Multiply | ( | BinaryOp const & | other | ) | [inline] |
Variant vValue::Expr::Math::Multiply::GetValue | ( | void | ) | const [virtual] |
Copy constructor.
Returns the value in its native format
Returns the result of multiplying lvalue by rvalue
Reimplemented from vValue::Expr::Core::Base.
Definition at line 102 of file veMath.cpp.
References vValue::Expr::Core::BinaryOp::m_lvalue, and vValue::Expr::Core::BinaryOp::m_rvalue.
00102 { 00103 const Variant lvalue = m_lvalue->GetValue(); 00104 const Variant rvalue = m_rvalue->GetValue(); 00105 if (boost::get<int>(&lvalue) && boost::get<int>(&rvalue)) 00106 return boost::get<int>(lvalue) * boost::get<int>(rvalue); 00107 return m_lvalue->GetFloat() * m_rvalue->GetFloat(); 00108 }
Base * vValue::Expr::Math::Multiply::copy | ( | void | ) | const [virtual] |
Returns an exact copy of this object.
Reimplemented from vValue::Expr::Core::BinaryOp.
Definition at line 110 of file veMath.cpp.
References Multiply().
00110 { 00111 return new Multiply(*this); 00112 }