vValue::Expr::Core::BinaryOp Class Reference

Base class for binary operators. More...

#include <vCore.h>

Inheritance diagram for vValue::Expr::Core::BinaryOp:

Inheritance graph
[legend]
Collaboration diagram for vValue::Expr::Core::BinaryOp:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Protected Attributes

BasePtr m_lvalue
 The lvalue for the operation.
BasePtr m_rvalue
 The rvalue for the operation.


Detailed Description

Base class for binary operators.

Definition at line 300 of file vCore.h.


Constructor & Destructor Documentation

vValue::Expr::Core::BinaryOp::BinaryOp ( BasePtr  lvalue,
BasePtr  rvalue 
)

Basic constructor.

Constructs a new binary operator object with the given parameters

Parameters:
lvalue the value to be on the left side of the operation
rvalue the value to be on the right side of the operation

Definition at line 245 of file vCore.cpp.

Referenced by copy().

00245                                                  :
00246         m_lvalue(lvalue    ),
00247         m_rvalue(rvalue    )
00248 { }

Here is the caller graph for this function:

vValue::Expr::Core::BinaryOp::BinaryOp ( BinaryOp const &  other  ) 

Copy constructor.

Initializes the binary operator object using the information from another one

Parameters:
other another binary operator object

Definition at line 252 of file vCore.cpp.

00252                                         :
00253         Base (other         ),
00254         m_lvalue(other.m_lvalue->copy()),
00255         m_rvalue(other.m_rvalue->copy())
00256 { }


Member Function Documentation

Base * vValue::Expr::Core::BinaryOp::copy ( void   )  const [virtual]

Returns an exact copy of this object.

Reimplemented from vValue::Expr::Core::Base.

Reimplemented in vValue::Expr::Math::Add, vValue::Expr::Math::Subtract, vValue::Expr::Math::Multiply, and vValue::Expr::Math::Divide.

Definition at line 258 of file vCore.cpp.

References BinaryOp().

00258                                {
00259     return new BinaryOp(*this);
00260 }

Here is the call graph for this function:


Member Data Documentation

BasePtr vValue::Expr::Core::BinaryOp::m_lvalue [protected]

The lvalue for the operation.

Definition at line 302 of file vCore.h.

Referenced by vValue::Expr::Math::Divide::GetValue(), vValue::Expr::Math::Multiply::GetValue(), vValue::Expr::Math::Subtract::GetValue(), and vValue::Expr::Math::Add::GetValue().

BasePtr vValue::Expr::Core::BinaryOp::m_rvalue [protected]

The rvalue for the operation.

Definition at line 303 of file vCore.h.

Referenced by vValue::Expr::Math::Divide::GetValue(), vValue::Expr::Math::Multiply::GetValue(), vValue::Expr::Math::Subtract::GetValue(), and vValue::Expr::Math::Add::GetValue().


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