Revision: 7002
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7002&view=rev
Author:   natepak
Date:     2008-09-02 01:21:56 +0000 (Tue, 02 Sep 2008)

Log Message:
-----------
Added Param.cc

Added Paths:
-----------
    code/gazebo/trunk/server/Param.cc

Added: code/gazebo/trunk/server/Param.cc
===================================================================
--- code/gazebo/trunk/server/Param.cc                           (rev 0)
+++ code/gazebo/trunk/server/Param.cc   2008-09-02 01:21:56 UTC (rev 7002)
@@ -0,0 +1,54 @@
+#include "GazeboError.hh"
+#include "Param.hh"
+
+using namespace gazebo;
+
+std::vector<Param*> *Param::params = NULL;
+
+////////////////////////////////////////////////////////////////////////////////
+// Constructor
+Param::Param(Param *newParam) 
+{
+  if (params == NULL)
+    gzthrow("Param vector is NULL\n");
+  params->push_back(newParam);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Destructor
+Param::~Param() 
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//  Begin a block of "new ParamT<>"
+void Param::Begin(std::vector<Param*> *_params)
+{
+  if (params != NULL)
+    gzthrow("Calling Begin before an End\n");
+  params = _params;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//  End a block of "new ParamT<>"
+void Param::End()
+{
+  if (params == NULL)
+    gzthrow("Calling End before a Begin\n");
+
+  params = NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// The name of the key
+std::string Param::GetKey() const
+{
+  return this->key;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Get the name of the param's data type
+std::string Param::GetTypename() const
+{
+  return this->typeName;
+}


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to