|
orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
orcaice/proputils.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp 00005 * 00006 * This copy of Orca is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef ORCAICE_PROPERTY_UTILITIES_H 00012 #define ORCAICE_PROPERTY_UTILITIES_H 00013 00014 #include <string> 00015 #include <Ice/Ice.h> 00016 #include <orca/common.h> 00017 #include <orca/bros1.h> 00018 00019 namespace orcaice 00020 { 00021 00026 00027 // 00028 // These guys are supposed to be simple wrappers for the Ice 'getPropertyXxxx' functions. 00029 // 00030 // In fact, things are a bit harder. Ice's 'getPropertAsInt' returns '0' for 'property not found'. 00031 // So everything goes through Ice's 'getProperty' instead, which returns an empty string on 'not found'. 00032 // 00033 00036 int getPropertyAsDouble( const Ice::PropertiesPtr &, const ::std::string& key, Ice::Double &value ); 00039 int getPropertyAsInt( const Ice::PropertiesPtr &, const ::std::string& key, int &value ); 00043 int getProperty( const Ice::PropertiesPtr &, const ::std::string& key, std::string &value ); 00050 int getPropertyAsIntVector( const Ice::PropertiesPtr &, const ::std::string& key, std::vector<int> &value ); 00057 int getPropertyAsDoubleVector( const Ice::PropertiesPtr &, const ::std::string& key, std::vector<double> &value ); 00058 00061 int getPropertyAsStringSeq( const Ice::PropertiesPtr &, const ::std::string& key, Ice::StringSeq &value, char delim=':' ); 00062 00065 Ice::Double getPropertyAsDoubleWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const Ice::Double defaultValue ); 00068 int getPropertyAsIntWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const int defaultValue ); 00070 std::string getPropertyWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const std::string &defaultValue ); 00072 std::vector<int> getPropertyAsIntVectorWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const std::vector<int> &defaultValue ); 00075 std::vector<double> getPropertyAsDoubleVectorWithDefault( const Ice::PropertiesPtr &, const ::std::string& key, const std::vector<double> &defaultValue ); 00076 00078 std::string warnMissingProperty( const std::string & prop ); 00081 std::string warnMissingPropertyWithDefault( const std::string & prop, const std::string & defaultValue ); 00082 00084 std::string warnMissingProperty( const std::string & info, const std::string & prop ); 00087 std::string warnMissingPropertyWithDefault( const std::string & info, const std::string & prop, const std::string & defaultValue ); 00088 00090 00091 } // namespace 00092 00093 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5