Author: JDM
Date: 2009-08-01 13:59:59 +0200 (Sat, 01 Aug 2009)
New Revision: 5265
Modified:
software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.c
software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.h
Log:
* Moved getStatus for getStatusStr (for status in string)
* Added getStatusInt for get the status directly in integer
* Added getStatusDbl for get the status directly in double
Modified: software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.c
===================================================================
--- software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.c 2009-08-01
11:58:11 UTC (rev 5264)
+++ software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.c 2009-08-01
11:59:59 UTC (rev 5265)
@@ -644,11 +644,21 @@
WavControl(CLIENT_LEVEL_FREE, WAV_STOP, "");
}
- string TuxAPI::getStatus(TuxAPI_STATUS_REQUESTED status)
+ string TuxAPI::getStatusStr(TuxAPI_STATUS_REQUESTED status)
{
return getRawStatus(CLIENT_LEVEL_FREE, status);
}
+ int TuxAPI::getStatusInt(TuxAPI_STATUS_REQUESTED status)
+ {
+ return atoi(getRawStatus(CLIENT_LEVEL_FREE, status).c_str());
+ }
+
+ double TuxAPI::getStatusDbl(TuxAPI_STATUS_REQUESTED status)
+ {
+ return strtodbl(getRawStatus(CLIENT_LEVEL_FREE, status));
+ }
+
double strtodbl( const std::string& s )
{
std::istringstream i(s);
Modified: software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.h
===================================================================
--- software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.h 2009-08-01
11:58:11 UTC (rev 5264)
+++ software_suite_v3/smart-core/smart-api/cpp/API/TuxAPI.h 2009-08-01
11:59:59 UTC (rev 5265)
@@ -246,6 +246,8 @@
void PlayWav(char *sound);
void StopWav(void);
- string getStatus(TuxAPI_STATUS_REQUESTED status);
+ string getStatusStr(TuxAPI_STATUS_REQUESTED status);
+ int getStatusInt(TuxAPI_STATUS_REQUESTED status);
+ double getStatusDbl(TuxAPI_STATUS_REQUESTED status);
};
}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn