#include <string>#include <sstream>#include "Constant.h"#include <math.h>Include dependency graph for Tools.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |||||||
| string | itos (int i) | ||||||
| Tool method to convert a int to a string. | |||||||
| string | ltos (long l) | ||||||
| Tool method to convert a long to a string. | |||||||
| string | dtos (double d) | ||||||
| Tool method to convert a double to a string. | |||||||
| double | RadiansToDegres (double dRadians) | ||||||
| Method to change an angle from radians to degres The equation used is
| |||||||
| double | DegresToRadians (double dDegres) | ||||||
| Method to change an angle from degres to radians The equation used is
| |||||||
| double | BrasSinus (double dL, double dAngle) | ||||||
| Method to convert an angle movement to a translation movement The angle must be in radians ! The equation used is :
with : | |||||||
| double | InverseBrasSinus (double dL, double dTranslation) | ||||||
| Method to convert a translation movement to a angle movement The angle computed is given in radians ! The equation used is :
with :
| |||||||
| double | BrasTangente (double dL, double dAngle) | ||||||
| Method to convert an angle movement to a translation movement The angle must be in radians ! The equation used is :
with : | |||||||
| double | InverseBrasTangente (double dL, double dTranslation) | ||||||
| Method to convert a translation movement to a angle movement The angle computed is given in radians ! The equation used is :
with :
| |||||||
| std::string | GetDeviceState (int iDeviceState) | ||||||
| template<class ObjectType> | |||||||
| void | DESTRUCTION (ObjectType *&objectName) | ||||||
| Method to make the destruction of a dynamic object. | |||||||
| template<class ObjectType> | |||||||
| ObjectType | Maximum (ObjectType &obj1, ObjectType &obj2) | ||||||
| Return the maximum object of obj1 and obj2. | |||||||
| template<class ObjectType> | |||||||
| ObjectType | Minimum (ObjectType &obj1, ObjectType &obj2) | ||||||
| Return the minimum object of obj1 and obj2. | |||||||
| template<class ObjectType> | |||||||
| bool | isGreaterThan (ObjectType &obj1, ObjectType &obj2) | ||||||
| Return true if the obj1 is greater than the obj2. | |||||||
| template<class ObjectType> | |||||||
| bool | isStrictlyGreaterThan (ObjectType &obj1, ObjectType &obj2) | ||||||
| Return true if the obj1 is stricktly greater than the obj2. | |||||||
| template<class ObjectType> | |||||||
| bool | isLessThan (ObjectType &obj1, ObjectType &obj2) | ||||||
| Return true if the obj1 is less than the obj2. | |||||||
| template<class ObjectType> | |||||||
| bool | isStrictlyLessThan (ObjectType &obj1, ObjectType &obj2) | ||||||
| Return true if the obj1 is stricktly less than the obj2. | |||||||
| template<class ObjectType> | |||||||
| bool | areEquals (ObjectType &obj1, ObjectType &obj2) | ||||||
| Return true if the obj1 is equal to obj2. | |||||||
|
||||||||||||||||
|
Return true if the obj1 is equal to obj2.
Definition at line 108 of file Tools.h.
|
|
||||||||||||
|
Method to convert an angle movement to a translation movement
with :
Definition at line 100 of file Tools.cpp.
|
|
||||||||||||
|
Method to convert an angle movement to a translation movement
with :
Definition at line 132 of file Tools.cpp.
|
|
|
Method to change an angle from degres to radians The equation used is
.
Definition at line 89 of file Tools.cpp. References MATH_CONSTANT::PI. 00090 { 00091 return dDegres * MATH_CONSTANT::PI / 180.0; 00092 }
|
|
||||||||||
|
Method to make the destruction of a dynamic object.
Definition at line 54 of file Tools.h.
|
|
|
Tool method to convert a double to a string.
Definition at line 75 of file Tools.cpp. References XString< T >::convertToString(). Referenced by ValueOutOfBoundException::makeDescription(), TrigonometricValueOutOfBoundException::makeDescription(), SquareRootException::makeDescription(), and IllegalArgumentException::makeDescription(). 00076 { 00077 return XString<double>::convertToString(d); 00078 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 8 of file Tools.cpp. 00009 { 00010 00011 switch (iDeviceState) 00012 { 00013 case 0: 00014 return "ON"; 00015 break; 00016 case 1: 00017 return "OFF"; 00018 break; 00019 case 2: 00020 return "CLOSE"; 00021 break; 00022 case 3: 00023 return "OPEN"; 00024 break; 00025 case 4: 00026 return "INSERT"; 00027 break; 00028 case 5: 00029 return "EXTRACT"; 00030 break; 00031 case 6: 00032 return "MOVING"; 00033 break; 00034 case 7: 00035 return "STANDBY"; 00036 break; 00037 case 8: 00038 return "FAULT"; 00039 break; 00040 case 9: 00041 return "INIT"; 00042 break; 00043 case 10: 00044 return "RUNNING"; 00045 break; 00046 case 11: 00047 return "ALARM"; 00048 break; 00049 case 12: 00050 return "DISABLE"; 00051 break; 00052 case 13: 00053 return "UNKNOW"; 00054 break; 00055 default: 00056 return "NO COMMUNICATION / UNDEFINED"; 00057 break; 00058 } 00059 }
|
|
||||||||||||
|
Method to convert a translation movement to a angle movement
with :
Definition at line 114 of file Tools.cpp. 00115 { 00116 // if (dL == 0.0) throw DivideByZeroException("Inverse Bras Sinus","L","InverseBrasSinus()",__FILE__,__LINE__); 00117 double dQuotient = dTranslation/dL; 00118 // if ((-1.0 > dQuotient) || (dQuotient > 1.0)) throw TrigonometricValueOutOfBoundException("Inverse Bras Sinus",dQuotient,-1.0,1.0,"Arcsin","InverseBrasSinus()",__FILE__,__LINE__); 00119 00120 return asin(dQuotient); 00121 }
|
|
||||||||||||
|
Method to convert a translation movement to a angle movement
with :
Definition at line 146 of file Tools.cpp. 00147 { 00148 // if (dL == 0.0) throw DivideByZeroException("Inverse Bras Sinus","L","InverseBrasSinus()",__FILE__,__LINE__); 00149 00150 // double dQuotient = dTranslation/dL; 00151 00152 // if ((-1.0 > dQuotient) || (dQuotient > 1.0)) throw TrigonometricValueOutOfBoundException("Inverse Bras Sinus",dQuotient,-1.0,1.0,"Arcsin","InverseBrasSinus()",__FILE__,__LINE__); 00153 00154 double dQuotient = dTranslation/dL; 00155 return atan(dQuotient); 00156 00157 // double dQuotient = dTranslation/dL; 00158 // return atan2(dTranslation,dL); 00159 00160 00161 }
|
|
||||||||||||||||
|
Return true if the obj1 is greater than the obj2.
Definition at line 80 of file Tools.h.
|
|
||||||||||||||||
|
Return true if the obj1 is less than the obj2.
Definition at line 94 of file Tools.h.
|
|
||||||||||||||||
|
Return true if the obj1 is stricktly greater than the obj2.
Definition at line 87 of file Tools.h.
|
|
||||||||||||||||
|
Return true if the obj1 is stricktly less than the obj2.
Definition at line 101 of file Tools.h.
|
|
|
Tool method to convert a int to a string.
Definition at line 63 of file Tools.cpp. References XString< T >::convertToString(). 00064 { 00065 return XString<int>::convertToString(i); 00066 }
Here is the call graph for this function: ![]() |
|
|
Tool method to convert a long to a string.
Definition at line 69 of file Tools.cpp. References XString< T >::convertToString(). Referenced by IndexOutOfBoundException::makeDescription(), ValueOutOfBoundException::makeOrigin(), TrigonometricValueOutOfBoundException::makeOrigin(), SquareRootException::makeOrigin(), ParseException::makeOrigin(), NullPointerException::makeOrigin(), NotAllowedOperationException::makeOrigin(), NoSuchElementException::makeOrigin(), InfinityException::makeOrigin(), IndexOutOfBoundException::makeOrigin(), IllegalArgumentException::makeOrigin(), FileNotFoundException::makeOrigin(), and DivideByZeroException::makeOrigin(). 00070 { 00071 return XString<long>::convertToString(l); 00072 }
Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Return the maximum object of obj1 and obj2.
Definition at line 65 of file Tools.h.
|
|
||||||||||||||||
|
Return the minimum object of obj1 and obj2.
Definition at line 72 of file Tools.h.
|
|
|
Method to change an angle from radians to degres The equation used is
.
Definition at line 82 of file Tools.cpp. References MATH_CONSTANT::PI. 00083 { 00084 return dRadians * 180.0 / MATH_CONSTANT::PI; 00085 }
|
1.4.5