Revision: 7732
http://playerstage.svn.sourceforge.net/playerstage/?rev=7732&view=rev
Author: asadat
Date: 2009-05-28 00:48:43 +0000 (Thu, 28 May 2009)
Log Message:
-----------
added GetNumberOfRobots() and GetSayString() methods
Modified Paths:
--------------
code/websim/src/websim.cc
code/websim/src/websim.hh
Modified: code/websim/src/websim.cc
===================================================================
--- code/websim/src/websim.cc 2009-05-28 00:47:31 UTC (rev 7731)
+++ code/websim/src/websim.cc 2009-05-28 00:48:43 UTC (rev 7732)
@@ -262,6 +262,21 @@
GetXMLModelExtent("sim", x, y, z, response);
}
+ else if(prop == "robots")
+ {
+ unsigned int n=0;
+ GetNumberOfRobots(n);
+ char tmp[256];
+ sprintf(tmp, "Number of Robots: %d",n);
+ response = tmp;
+ }
+ else if(prop == "sayings")
+ {
+ std::vector<std::string> says;
+ GetSayStrings(says);
+ for(int i=0;i<says.size();i++)
+ response += says.at(i) + "\n";
+ }
else if(prop == "greet") // action is the name of the greeting server
{
// TODO - check to see if this server was anticipated
Modified: code/websim/src/websim.hh
===================================================================
--- code/websim/src/websim.hh 2009-05-28 00:47:31 UTC (rev 7731)
+++ code/websim/src/websim.hh 2009-05-28 00:48:43 UTC (rev 7732)
@@ -160,6 +160,10 @@
double&
y,
double&
z,
std::string& response);
+ virtual bool GetNumberOfRobots(unsigned int& n) = 0;
+
+ virtual bool GetSayStrings(std::vector<std::string>& sayings) = 0;
+
/** Get the current simulation time */
virtual Time GetTime() = 0;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit