CASConvert Class Reference
[Conversion]

CASConvert can be used to convert a CASObject to a different CASObject type. More...

#include <casconvert.h>

List of all members.

Public Member Functions

 CASConvert (const CASConvert &o)
 Copy constructor.
 CASConvert (const std::vector< const CASObject * > &v)
 Constructor for initializing the object with a vector.
 CASConvert (const CASObject *o)
 Constructor for initializing the object with a CASObject.
CASConvertoperator= (const CASConvert &o)
 Assignment operator.
virtual FractionToFraction () const throw ( EDoesNotApply )
 Returns a converted Fraction.
virtual LongIntToLongInt () const throw ( EDoesNotApply )
 Returns a converted LongInt.
virtual ProductToProduct () const throw ( EDoesNotApply )
 Returns a converted Product.
virtual SumToSum () const throw ( EDoesNotApply )
 Returns a converted Sum.
virtual VariableToVariable () const throw ( EDoesNotApply )
 Returns a converted Variable.
virtual ~CASConvert ()
 Destructor.

Protected Member Functions

virtual Fractioncasobject2fraction () const throw ( EDoesNotApply )
 Converts a CASObject to a Fraction.
virtual LongIntcasobject2longint () const throw ( EDoesNotApply )
 Converts a CASObject to a LongInt.
template<class T>
T * casobject2type () const throw ( EDoesNotApply )
 Converts the casobject to another type.
virtual Variablecasobject2variable () const throw ( EDoesNotApply )
 Converts a CASObject to a Variable.
virtual Fractionvector2fraction () const throw ( EDoesNotApply )
 Converts a vector to a Fraction.
virtual LongIntvector2longint () const throw ( EDoesNotApply )
 Converts a vector to a LongInt.
template<class T>
T * vector2type () const throw ( EDoesNotApply )
 Converts the vector vector to the specified type T.
virtual Variablevector2variable () const throw ( EDoesNotApply )
 Converts a vector to a Variable.

Private Attributes

CASObjectcasobject
 Holds the pointer to a CASObject which can be converted to another CASObject type.
std::vector< CASObject * > vector
 Takes an operand vector which can be converted to a certain CASObject type.


Detailed Description

Todo:
This class is a quick & dirty hack. Therefore it should be written more conscientiously.
Note:
This class needs to be a friend of all classes it is supposed to convert to.
Used to convert from one CASObject type to another CASObject type where applicable. If conversion cannot take place, a EDoesNotApply exception is thrown.

Definition at line 74 of file casconvert.h.


Member Data Documentation

CASObject* CASConvert::casobject [private]

This attribute holds a CASObject which can be converted to another CAS Type. See castype.h for all possible CAS Types.

During the lifetime of this object, that attribute cannot be changed once set.

Definition at line 87 of file casconvert.h.

std::vector<CASObject*> CASConvert::vector [private]

This attribute holds a vector which can be converted to a certain CASObject type.

During the lifetime of this object, that attribute cannot be changed once set.

Definition at line 99 of file casconvert.h.


The documentation for this class was generated from the following files:
Generated on Sun Dec 31 01:57:29 2006 for ECAS by  doxygen 1.4.7