ParamR.cpp
Go to the documentation of this file.
00001 #include "ParamR.h"
00002 
00003 char* rrosGetParamType(NodeR* handle, char* param){
00004         bool            val_b;
00005         int             val_i;
00006         double          val_d;
00007         std::string val_s;
00008 
00009         if(handle->getHandle()->getParam(param, val_b))         return "logical";
00010         else if(handle->getHandle()->getParam(param, val_d))    return "double";
00011         else if(handle->getHandle()->getParam(param, val_i))    return "integer";
00012         else if(handle->getHandle()->getParam(param, val_s))    return "character";
00013         return "NULL";
00014 }
00015 
00016 bool rrosGetParamBoolean(NodeR* handle, char* param){
00017         bool val;
00018         handle->getHandle()->getParam(param, val);
00019 
00020         return val;
00021 }
00022 int rrosGetParamInteger(NodeR* handle, char* param){
00023         int val;
00024         handle->getHandle()->getParam(param, val);
00025 
00026         return val;
00027 }
00028 double rrosGetParamDouble(NodeR* handle, char* param){
00029         double val;
00030         handle->getHandle()->getParam(param, val);
00031 
00032         return val;
00033 }
00034 char* rrosGetParamString(NodeR* handle, char* param){
00035         std::string val;
00036         handle->getHandle()->getParam(param, val);
00037 
00038         return const_cast<char*>(val.c_str());
00039 }
00040 
00041 
00042 void rrosSetParamBoolean(NodeR* handle, char* param, bool val){
00043         handle->getHandle()->setParam(param, val);
00044 }
00045 void rrosSetParamInteger(NodeR* handle, char* param, int val){
00046         handle->getHandle()->setParam(param, val);
00047 }
00048 void rrosSetParamDouble (NodeR* handle, char* param, double val){
00049         handle->getHandle()->setParam(param, val);
00050 }
00051 void rrosSetParamString (NodeR* handle, char* param, char* val){
00052         std::string val_s = val;
00053         handle->getHandle()->setParam(param, val_s);
00054 }
00055 void rrosDeleteParam (NodeR* handle, char* param){
00056         handle->getHandle()->deleteParam(param);
00057 }


rosR
Author(s): André Dietrich, Sebastian Zug
autogenerated on Mon Oct 6 2014 07:10:08