vValue::Expr::Math::Multiply Class Reference

#include <veMath.h>

Inheritance diagram for vValue::Expr::Math::Multiply:

Inheritance graph
[legend]
Collaboration diagram for vValue::Expr::Math::Multiply:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Multiply (BasePtr lvalue, BasePtr rvalue)
 Multiply (BinaryOp const &other)
 Basic constructor.
virtual Variant GetValue (void) const
 Copy constructor.
virtual Basecopy (void) const
 Returns an exact copy of this object.


Detailed Description

Definition at line 62 of file veMath.h.


Constructor & Destructor Documentation

vValue::Expr::Math::Multiply::Multiply ( BasePtr  lvalue,
BasePtr  rvalue 
) [inline]

Definition at line 64 of file veMath.h.

Referenced by copy().

00064 : BinaryOp(lvalue, rvalue) {}; 

Here is the caller graph for this function:

vValue::Expr::Math::Multiply::Multiply ( BinaryOp const &  other  )  [inline]

Basic constructor.

Definition at line 65 of file veMath.h.

00065 : BinaryOp(other) {}; 


Member Function Documentation

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

Returns:
the result

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 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:05:57 2008 for Armagetron Advanced by  doxygen 1.5.4