CASConvert can be used to convert a CASObject to a different CASObject type.
More...
#include <casconvert.h>
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. | |
| CASConvert & | operator= (const CASConvert &o) |
| Assignment operator. | |
| virtual Fraction * | ToFraction () const throw ( EDoesNotApply ) |
Returns a converted Fraction. | |
| virtual LongInt * | ToLongInt () const throw ( EDoesNotApply ) |
Returns a converted LongInt. | |
| virtual Product * | ToProduct () const throw ( EDoesNotApply ) |
Returns a converted Product. | |
| virtual Sum * | ToSum () const throw ( EDoesNotApply ) |
Returns a converted Sum. | |
| virtual Variable * | ToVariable () const throw ( EDoesNotApply ) |
Returns a converted Variable. | |
| virtual | ~CASConvert () |
| Destructor. | |
Protected Member Functions | |
| virtual Fraction * | casobject2fraction () const throw ( EDoesNotApply ) |
Converts a CASObject to a Fraction. | |
| virtual LongInt * | casobject2longint () const throw ( EDoesNotApply ) |
Converts a CASObject to a LongInt. | |
| template<class T> | |
| T * | casobject2type () const throw ( EDoesNotApply ) |
Converts the casobject to another type. | |
| virtual Variable * | casobject2variable () const throw ( EDoesNotApply ) |
Converts a CASObject to a Variable. | |
| virtual Fraction * | vector2fraction () const throw ( EDoesNotApply ) |
Converts a vector to a Fraction. | |
| virtual LongInt * | vector2longint () 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 Variable * | vector2variable () const throw ( EDoesNotApply ) |
Converts a vector to a Variable. | |
Private Attributes | |
| CASObject * | casobject |
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. | |
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.
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.
1.4.7